dcop
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) |
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) |
Bool | DCOPClient::dcop_detach (void) |
char * | DCOPClient::dcop_register (const char *app_name, Bool add_pid) |
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) |
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, inherited] |
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, inherited] |
Call a function of a DCOP object.
- Parameters:
-
app_name Name this application is registered under. remote_app_name Name the target application is registered under. remote_object_id Name of the remote object. remote_function Name of the function to call. data Marshalled arguments to pass to function. data_length Number of octets in data. reply_type Will be set to type of retval, represented as a string. reply_data Will be set to retval (marshalled). reply_data_length Will be set to number of octets in retval.
- Returns:
- true if successful, false otherwise
Bool dcop_detach | ( | void | ) | [related, inherited] |
Detach from the DCOP server.
- Returns:
- true if successful, false otherwise
char * dcop_register | ( | const char * | app_name, | |
Bool | add_pid | |||
) | [related, inherited] |
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_name the name of the application. add_pid the 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, inherited] |
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_id the object id to register callback the 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, inherited] |
Send a signal to a DCOP object.
- Parameters:
-
receiving_app Name 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-*". object Name of the remote object. function Name of the function to call. data Marshalled arguments to pass to function. data_length Number of octets in data.
- Returns:
- true if successful, false otherwise