Hi Sam,
Sam Thursfield wrote:
>Hi
>I understand that we need to make a C library for Moonshot client
>applications, which will abstract the platform differences and expose a
>simple API that corresponds with the RPC interface.
>
>On Linux, the simplest design is to build on top of dbus-glib (or GDBus,
>if running on squeeze is unimportant for this). This means the client
>library will depend on GLib, and clients will need to use the GLib main
>loop.
>
>On Windows, there are more options. A client library is useful for all
>Moonshot clients because it can handle launching of the moonshot-ui
>program cleanly. The simplest port would match the Linux version, but
>not all Windows apps are GLib-based. Would a callback API be useful
>here? eg:
>
> void identity_callback (char *nai, char *password, ...) {
> /* We have got the identity, and can push the event to
> * our app's main loop in whatever way is appropriate
> */
> }
>
> void start_login () {
> IdentityRequest r;
>
> r = identity_request_new ("user@domain", ..., identity_callback);
> }
>
>(The benefit of returning an IdentityRequest handle is that the client
>can potentially cancel it). This API could coexist with the GLib-based
>one on Windows only.
>
>
I generally like having this kind of callback, so this looks good to me.
>Additionally, do you need MSVC support in this library?
>
Can you elaborate on what you mean by "MSVC support"?
>This will take
>some extra testing and #ifdefs.
>
>I appreciate your feedback and also some information on the use cases
>you have for this library.
>
>
|