Talk:Summer of Code 2007 Service Clients Details - nesciens/xmms2-wiki GitHub Wiki

Here's how I envision service client initialization:

  1. Service client connects.

  2. Service client sends over interface names. (Named according to convention, we hope!)

  3. If a service of the same name is already loaded, an error is returned, otherwise, success. On an error, the service quits now.

  4. The client registers descriptions for its services.

    • Another error is returned if this service got an error on the last step.
  5. The client registers methods for its services. Something like xmmsc_service_register_method("service", "method_name", callback, RETURN_TYPE_INT, ARG_TYPE_INT, ARG_TYPE_STR).

    • Another error is returned if the service got an error on the last step.
    • Return an error if a method of the same name, return type, and arguments is defined.
  6. The client tells the server it's ready to start receiving commands.

  7. The server creates a hash of the name, description, and methods registered to each service.

    • This step is controversial.
    • This hash allows clients to easily verify that they are working against a known interface so things won't be buggy.

-Puzzles Tue Jun 12 03:54:50 EDT 2007