C interface to DCOP

dcop_attach, dcop_register, dcop_detach, dcop_register_callback, dcop_send_signal, and dcop_call make up the C interface to DCOP. More...

Functions

Bool DCOPClient::dcop_attach (void)
char * DCOPClient::dcop_register (const char *app_name, Bool add_pid)
Bool DCOPClient::dcop_detach (void)
Bool DCOPClient::dcop_register_callback (const char *object_id, dcop_callback_t callback)
Bool DCOPClient::dcop_send_signal (const char *receiving_app, const char *object, const char *function, char *data, int data_length)
Bool DCOPClient::dcop_call (const char *app_name, const char *remote_app_name, const char *remote_object_id, const char *remote_function, const char *data, int data_length, char **reply_type, char **reply_data, int *reply_data_length)

Detailed Description

dcop_attach, dcop_register, dcop_detach, dcop_register_callback, dcop_send_signal, and dcop_call make up the C interface to DCOP.


Function Documentation

Bool dcop_attach ( void  ) [related]

Attach to the DCOP server. This registers you as anonymous-pid - you may then register with a 'real' name with dcop_register().

Bool dcop_call ( const char *  app_name,
const char *  remote_app_name,
const char *  remote_object_id,
const char *  remote_function,
const char *  data,
int  data_length,
char **  reply_type,
char **  reply_data,
int *  reply_data_length 
) [related]

Call a function of a DCOP object.

Parameters:
app_nameName this application is registered under.
remote_app_nameName the target application is registered under.
remote_object_idName of the remote object.
remote_functionName of the function to call.
dataMarshalled arguments to pass to function.
data_lengthNumber of octets in data.
reply_typeWill be set to type of retval, represented as a string.
reply_dataWill be set to retval (marshalled).
reply_data_lengthWill be set to number of octets in retval.
Returns:
true if successful, false otherwise
Bool dcop_detach ( void  ) [related]

Detach from the DCOP server.

Returns:
true if successful, false otherwise
char * dcop_register ( const char *  app_name,
Bool  add_pid 
) [related]

Register as app 'app_name'. If add_pid is true, you will be registered as app_name-pid.

It might not be possible to give you the exact name you requested. In this case, the retval will be different to what you expect, so you should not rely on getting 'app_name'.

If it was not possible to register, retval is 0.

Parameters:
app_namethe name of the application.
add_pidthe process id of the application
Returns:
the registered name, or 0 when the registration failed
Bool dcop_register_callback ( const char *  object_id,
dcop_callback_t  callback 
) [related]

Register the callback function for an object id. This function should have signature dcop_callback_t. The name of the actual function that should be called is passed in the struct.

Parameters:
object_idthe object id to register
callbackthe callback for the object id
Returns:
true if successful, false otherwise
Bool dcop_send_signal ( const char *  receiving_app,
const char *  object,
const char *  function,
char *  data,
int  data_length 
) [related]

Send a signal to a DCOP object.

Parameters:
receiving_appName the target application is registered under. Note that you may use wildcards here. For example, you could send to all 'konsole' objects that are registered using the '-pid' extension with "konsole-*".
objectName of the remote object.
functionName of the function to call.
dataMarshalled arguments to pass to function.
data_lengthNumber of octets in data.
Returns:
true if successful, false otherwise
KDE Home | KDE Accessibility Home | Description of Access Keys