dcop Globals

# dcop Globals |
Annotated List
Files
Globals
Hierarchy
Index
Main

## dcopc.h

- typedef void (*dcop_callback_t)( const char * object_id, const char * function, const char * data, unsigned int data_length )
- Bool dcop_attach (void)
- char * dcop_register (const char * app_name, Bool add_pid)
- Bool dcop_detach (void)
- Bool dcop_register_callback (const char * object_id, dcop_callback_t callback)
- Bool dcop_send_signal ( const char * receiving_app, const char * object, const char * function, char * data, int data_length )
- 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 )

## dcopclient.h

- typedef QCStringList

## dcopglobal.h

- extern IcePoAuthStatus _IcePoMagicCookie1Proc (IceConn, void **, int, int, int, void *, int *, void **, char **)
- extern IcePaAuthStatus _IcePaMagicCookie1Proc (IceConn, void **, int, int, void *, int *, void **, char **)

## dcopobject.h

- typedef QCStringList

## dcopref.h

- QDataStream& operator<< ( QDataStream&, const DCOPRef& ref )
- QDataStream& operator>> ( QDataStream&, DCOPRef& ref )

## dcopserver.h

- typedef QCStringList

Bool dcop_attach (void)

`#include <dcopc.h>`

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

char * dcop_register (const char * app_name, Bool add_pid)

`#include <dcopc.h>`

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.

Bool dcop_detach (void)

`#include <dcopc.h>`

Detach from the DCOP server.

Bool dcop_register_callback (const char * object_id, dcop_callback_t callback)

`#include <dcopc.h>`

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.

Bool dcop_send_signal ( const char * receiving_app, const char * object, const char * function, char * data, int data_length )

`#include <dcopc.h>`

Send a signal to a DCOP object.

`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.

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 )

`#include <dcopc.h>`

Call a function of a DCOP object.

`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.

extern IcePoAuthStatus _IcePoMagicCookie1Proc (IceConn, void **, int, int, int, void *, int *, void **, char **)

`#include <dcopglobal.h>`

DCOP Protocol description ================

A DCOPSend message does not expect any reply. data: << fromId << toId << objId << fun << dataSize + data[dataSize]

A DCOPCall message can get a DCOPReply, a DCOPReplyFailed or a DCOPReplyWait message in response. data: << fromId << toId << objId << fun << dataSize + data[dataSize]

DCOPReply is the successfull reply to a DCOPCall message data: << fromId << toId << replyType << replyDataSize + replyData[replyDataSize]

DCOPReplyFailed indicates failure of a DCOPCall message data: << fromId << toId

DCOPReplyWait indicates that a DCOPCall message is succesfully being processed but that response will come later. data: << fromId << toId << transactionId

DCOPReplyDelayed is the successfull reply to a DCOPCall message after a DCOPReplyWait message. data: << fromId << toId << transactionId << replyType << replyData

DCOPFind is a message much like a "call" message. It can however be send to multiple objects within a client. If a function in a object that is being called returns a boolean with the value "true", a DCOPReply will be send back containing the DCOPRef of the object who returned "true".

All c-strings (fromId, toId, objId, fun and replyType), are marshalled with their respective length as 32 bit unsigned integer first: data: length + string[length] Note: This happens automatically when using QCString on a QDataStream.

QDataStream& operator<< ( QDataStream&, const DCOPRef& ref )

`#include <dcopref.h>`

Writes the reference (NOT the object itself) to the stream.

QDataStream& operator>> ( QDataStream&, DCOPRef& ref )

`#include <dcopref.h>`

Reads a reference from the stream.