libmsrpc for Samba 3
Gerald (Jerry) Carter
jerry at samba.org
Wed Jul 20 16:53:49 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
tridge at samba.org wrote:
| btw, a good example of the wire/structure separation
| is strings. In Samba4 all strings in the IDL files appear
| as "const char *" in the generated interface structures,
| no matter what form they take on the wire.
True, and we don't have this in Samba 3 currently so the
structures in include/rpc_*h are not a good choice for
building control block parameters.
|> The make_spoolss_q_open_printer_ex() call does what you
|> do by assigning the structure elements necessary for
|> the outgoing call. So what you call the client interface
|> the the CLI_DO_RPC macro I've used above.
| I can see similarities, but they are really only skin
| deep. The skin does matter though :-)
Po-TA-to, Po-TAH-to. The intent is the same. I'm
saying they are the same, but the programming paradigm
is. I won't be pedantic about it if you disagree
over the high level view of the interface. Agreed that
at a closer view differences are there.
| I'm not sure it really is any more 'low level'
| than the win32 style interface.
I probably meant this in the context of looking at
Samba 3. I was thinking of exposing UNISTR to users
which was low level.
| It certainly is more verbose, and leads to a higher
| line count in the code, but I think the code is vastly
| more readable, and requires much less of "go and lookup
| the docs for this function to see what parameter
| 7 is".
See my comments in another post about optimal number of formal
parameters. That is from my same book about optimum number
of lines ina function (i.e. it should fit on one printed
page if possible). In many ways, it is the same design
| One thing to consider is scripting languages. I found
| it _much_ easier to generate the js bindings for the
| Samba4 rpc code by following the same pattern as the
| C interface. The only concession I had to make was
| to use io.input.* instead of io.in.* as 'in' is a
| reserved word in js.
Just out of curiosity, what is the demographic you are
marketing ejs for? System administrators? or programmers?
| See scripting/libjs/samr.js for more examples.
Yup. I've looked.
Alleviating the pain of Windows(tm) ------- http://www.samba.org
GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc
"I never saved anything for the swim back." Ethan Hawk in Gattaca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the samba-technical