adbus_Server Struct Reference

Bus server. More...

Related Functions

(Note that these are not member functions.)



int adbus_remote_dispatch (adbus_Remote *r, adbus_Message *m)
 Dispatches a message from the given remote.
int adbus_remote_parse (adbus_Remote *r, adbus_Buffer *b)
 Dispatches all complete messages in the provided buffer from the given remote.
adbus_Serveradbus_serv_new (adbus_Interface *bus)
 Creates a new server using the provided fresh "org.freedesktop.DBus" interface.
void adbus_serv_free (adbus_Server *s)
 Frees the server.
adbus_Remoteadbus_serv_connect (adbus_Server *s, adbus_SendMsgCallback send, void *data)
 Adds a new remote to the server.
void adbus_remote_disconnect (adbus_Remote *r)
 Removes a remote from the server.

Detailed Description

Bus server.

The provided bus server is a minimal single threaded server. The server by default provides the following members of the "org.freedesktop.DBus" interface on the "/" and "/org/freedesktop/DBus" paths:

The call to adbus_serv_new() takes a fresh "org.freedesktop.DBus" adbus_Interface, so that the user API can add application specific or platform specific members.

The overall workflow is:

  1. Remote connects to server.
  2. Run the server side of the auth protocol (perhaps using the adbus_Auth module).
  3. Call adbus_serv_connect() to get an adbus_Remote for that remote.
  4. Receive incoming data on the remote and call adbus_remote_dispatch() or adbus_remote_parse() to dispatch.
  5. When the remote disconnects call adbus_remote_disconnect() to cleanup.

Friends And Related Function Documentation

int adbus_remote_dispatch ( adbus_Remote r,
adbus_Message m 
) [related]

Dispatches a message from the given remote.

Returns:
non-zero on error at which point the remote should be kicked
int adbus_remote_parse ( adbus_Remote r,
adbus_Buffer b 
) [related]

Dispatches all complete messages in the provided buffer from the given remote.

Returns:
non-zero on error at which point the remote should be kicked
adbus_Remote * adbus_serv_connect ( adbus_Server s,
adbus_SendMsgCallback  send,
void *  data 
) [related]

Adds a new remote to the server.

Note:
This should be called after the remote has successfully authenticated.

The documentation for this struct was generated from the following files:
 All Data Structures Files Functions Variables Friends Defines

Generated on Mon Mar 22 00:10:02 2010 for adbus by  doxygen 1.6.1