dcop Library API Documentation

DCOPClient Class Reference

Inter-process communication and remote procedure calls for KDE applications. More...

#include <dcopclient.h>

Inheritance diagram for DCOPClient:

Inheritance graph
[legend]
Collaboration diagram for DCOPClient:

Collaboration graph
[legend]
List of all members.

Signals

void applicationRegistered (const QCString &appId)
 Indicates that the application appId has been registered with the server we are attached to.

void applicationRemoved (const QCString &appId)
 Indicates that the formerly registered application appId has been removed.

void attachFailed (const QString &msg)
 Indicates that the process of establishing DCOP communications failed in some manner.

void blockUserInput (bool block)
 Indicates that user input shall be blocked or released, depending on the argument.


Public Member Functions

 DCOPClient ()
 Constructs a new DCOP client, but does not attach to any server.

virtual ~DCOPClient ()
 Cleans up any open connections and dynamic data.

bool attach ()
 Attaches to the DCOP server.

void bindToApp ()
bool detach ()
 Detaches from the DCOP server.

bool isAttached () const
 Returns whether or not the client is attached to the server.

bool isAttachedToForeignServer () const
 Returns whether the client is attached to a server owned by another user.

bool acceptCalls () const
 Returns whether the client handles incoming calls.

void setAcceptCalls (bool b)
 Specify whether the client should accept incoming calls.

bool qtBridgeEnabled ()
 Returns whether the DCOP - Qt bridge is enabled.

void setQtBridgeEnabled (bool b)
 Specify whether Qt objects of the application should be accessible via DCOP.

QCString registerAs (const QCString &appId, bool addPID=true)
 Registers at the DCOP server.

bool isRegistered () const
 Returns whether or not the client is registered at the server.

QCString appId () const
 Returns the current app id or a null string if the application hasn't yet been registered.

int socket () const
 Returns the socket fd that is used for communication with the server.

void suspend ()
 Temporarily suspends processing of DCOP events.

void resume ()
 Resumes the processing of DCOP events.

bool isSuspended () const
 Returns whether DCOP events are being processed.

bool send (const QCString &remApp, const QCString &remObj, const QCString &remFun, const QByteArray &data)
 Sends a data block to the server.

bool send (const QCString &remApp, const QCString &remObj, const QCString &remFun, const QString &data)
 This function acts exactly the same as the above, but the data parameter can be specified as a QString for convenience.

bool call (const QCString &remApp, const QCString &remObj, const QCString &remFun, const QByteArray &data, QCString &replyType, QByteArray &replyData, bool useEventLoop=false)
 Performs a synchronous send and receive.

bool findObject (const QCString &remApp, const QCString &remObj, const QCString &remFun, const QByteArray &data, QCString &foundApp, QCString &foundObj, bool useEventLoop=false)
 Searches for an object which matches a criteria.

void emitDCOPSignal (const QCString &object, const QCString &signal, const QByteArray &data)
 Emits signal as DCOP signal from object object with data as arguments.

void emitDCOPSignal (const QCString &signal, const QByteArray &data)
bool connectDCOPSignal (const QCString &sender, const QCString &senderObj, const QCString &signal, const QCString &receiverObj, const QCString &slot, bool Volatile)
 Connects to a DCOP signal.

bool connectDCOPSignal (const QCString &sender, const QCString &signal, const QCString &receiverObj, const QCString &slot, bool Volatile)
 This class or method is obsolete, it is provided for compatibility only. For backwards compatibility

bool disconnectDCOPSignal (const QCString &sender, const QCString &senderObj, const QCString &signal, const QCString &receiverObj, const QCString &slot)
 Disconnects a DCOP signal.

bool disconnectDCOPSignal (const QCString &sender, const QCString &signal, const QCString &receiverObj, const QCString &slot)
 This class or method is obsolete, it is provided for compatibility only. For backwards compatibility

virtual bool process (const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)
 Reimplement this function to handle app-wide function calls unassociated w/an object.

DCOPClientTransaction * beginTransaction ()
 Delays the reply of the current function call until endTransaction() is called.

void endTransaction (DCOPClientTransaction *t, QCString &replyType, QByteArray &replyData)
 Sends the delayed reply of a function call.

Q_INT32 transactionId () const
 Test whether the current function call is delayed.

bool isApplicationRegistered (const QCString &remApp)
 Checks whether remApp is registered with the DCOP server.

QCStringList registeredApplications ()
 Retrieves the list of all currently registered applications from dcopserver.

QCStringList remoteObjects (const QCString &remApp, bool *ok=0)
 Retrieves the list of objects of the remote application remApp.

QCStringList remoteInterfaces (const QCString &remApp, const QCString &remObj, bool *ok=0)
 Retrieves the list of interfaces of the remote object remObj of application remApp.

QCStringList remoteFunctions (const QCString &remApp, const QCString &remObj, bool *ok=0)
 Retrieves the list of functions of the remote object remObj of application remApp.

bool receive (const QCString &app, const QCString &obj, const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)
bool find (const QCString &app, const QCString &obj, const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)
QCString senderId () const
 Returns the appId of the last application that talked to us.

void setDefaultObject (const QCString &objId)
 Installs object objId as application-wide default object.

QCString defaultObject () const
 Returns the current default object or an empty string if no object is installed as default object.

void setNotifications (bool enabled)
 Enables / disables the applicationRegistered() / applicationRemoved() signals.

void setDaemonMode (bool daemonMode)
 Tells the dcopserver to treat the client as daemon client, not as regular client.


Static Public Member Functions

void setServerAddress (const QCString &addr)
 Sets the address of a server to use upon attaching.

QCString normalizeFunctionSignature (const QCString &fun)
 Normalizes the function signature fun.

DCOPClientmainClient ()
 Returns the application's main dcop client.

void setMainClient (DCOPClient *mainClient)
 Sets the application's main dcop client.

void emergencyClose ()
const char * postMortemSender ()
const char * postMortemObject ()
const char * postMortemFunction ()
QCString dcopServerFile (const QCString &hostname=0)
 File with information how to reach the dcopserver.

QCString dcopServerFileOld (const QCString &hostname=0)
 This class or method is obsolete, it is provided for compatibility only. For backwards compatibility with KDE 2.x


Protected Slots

void processSocketData (int socknum)
 Process data from the socket.


Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

Inter-process communication and remote procedure calls for KDE applications.

This class provides IPC and RPC for KDE applications. Usually you will not have to instantiate one yourself because KApplication contains a method to return a pointer to a DCOPClient object which can be used for your whole application.

Before being able to send or receive any DCOP messages, you will have to attach your client object to the DCOP server, and then register your application with a specific name. See attach() and registerAs() for more information.

Data to be sent should be serialized into a QDataStream which was initialized with the QByteArray that you actually intend to send the data in. An example of how you might do this:

QByteArray data; QDataStream arg(data, IO_WriteOnly); arg << QString("This is text I am serializing"); client->send("someApp", "someObject", "someFunction", arg);

See also:
KApplication::dcopClient()
Author:
Preston Brown <pbrown@kde.org>, Matthias Ettrich <ettrich@kde.org>

Definition at line 67 of file dcopclient.h.


Constructor & Destructor Documentation

DCOPClient::DCOPClient  ) 
 

Constructs a new DCOP client, but does not attach to any server.

Definition at line 490 of file dcopclient.cpp.

References QObject::connect(), mainClient(), and setMainClient().

DCOPClient::~DCOPClient  )  [virtual]
 

Cleans up any open connections and dynamic data.

Definition at line 514 of file dcopclient.cpp.

References detach(), mainClient(), and setMainClient().


Member Function Documentation

void DCOPClient::setServerAddress const QCString addr  )  [static]
 

Sets the address of a server to use upon attaching.

If no server address is ever specified, attach will try its best to find the server anyway.

Parameters:
addr the new address of the server

Definition at line 531 of file dcopclient.cpp.

bool DCOPClient::attach  ) 
 

Attaches to the DCOP server.

If the connection was already attached, the connection will be re-established with the current server address.

Naturally, only attached application can use DCOP services.

If a QApplication object exists then client registers itself as QApplication::name() + "-" + <pid>. If no QApplication object exists the client registers itself as "anonymous".

If you want to register differently, you should use registerAs() instead.

Returns:
true if attaching was successful.

Definition at line 539 of file dcopclient.cpp.

bool DCOPClient::detach  ) 
 

Detaches from the DCOP server.

Returns:
true if successful, false otherwise

Definition at line 752 of file dcopclient.cpp.

Referenced by processSocketData(), registerAs(), and ~DCOPClient().

bool DCOPClient::isAttached  )  const
 

Returns whether or not the client is attached to the server.

Returns:
true if attached, false if not

Definition at line 775 of file dcopclient.cpp.

Referenced by acceptCalls(), endTransaction(), isAttachedToForeignServer(), registerAs(), and send().

bool DCOPClient::isAttachedToForeignServer  )  const
 

Returns whether the client is attached to a server owned by another user.

Returns:
true if attached to a foreign server, false if not

Definition at line 783 of file dcopclient.cpp.

References isAttached().

bool DCOPClient::acceptCalls  )  const
 

Returns whether the client handles incoming calls.

Returns:
true if the client accepts calls

Definition at line 788 of file dcopclient.cpp.

References isAttached().

void DCOPClient::setAcceptCalls bool  b  ) 
 

Specify whether the client should accept incoming calls.

By default clients accept incoming calls, but not when connected to a foreign server.

Parameters:
b true to accept calls, false to reject them

Definition at line 793 of file dcopclient.cpp.

bool DCOPClient::qtBridgeEnabled  ) 
 

Returns whether the DCOP - Qt bridge is enabled.

By default the DCOP - Qt bridge is enabled.

Returns:
true if Qt objects are accessible over DCOP
Since:
3.1

Definition at line 799 of file dcopclient.cpp.

void DCOPClient::setQtBridgeEnabled bool  b  ) 
 

Specify whether Qt objects of the application should be accessible via DCOP.

By default the DCOP - Qt bridge is enabled.

Parameters:
b true to make Qt objects accessible over DCOP
Since:
3.1

Definition at line 804 of file dcopclient.cpp.

QCString DCOPClient::registerAs const QCString appId,
bool  addPID = true
 

Registers at the DCOP server.

If the application was already registered, the registration will be re-done with the new appId.

appId is a unique application/program id that the server will use to associate requests with. If there is already an application registered with the same name, the server will add a number to the id to unify it. If addPID is true, the PID of the current process will be added to id.

Registration is necessary if you want to allow other clients to talk to you. They can do so using your appId as first parameter for send() or call(). If you just want to talk to other clients, you do not need to register at the server. In that case attach() is enough. It will implicitly register you as "anonymous".

Parameters:
appId the id of the application
addPID true to add the process id
Returns:
The actual appId used for the registration or a null string if the registration wasn't successful.

Definition at line 809 of file dcopclient.cpp.

References call(), detach(), isAttached(), QCString::isNull(), isRegistered(), and QCString::sprintf().

bool DCOPClient::isRegistered  )  const
 

Returns whether or not the client is registered at the server.

Returns:
true if registered at the server

Definition at line 856 of file dcopclient.cpp.

Referenced by registerAs().

QCString DCOPClient::appId  )  const
 

Returns the current app id or a null string if the application hasn't yet been registered.

Returns:
the application id, or QString::null if not registered

Definition at line 862 of file dcopclient.cpp.

int DCOPClient::socket  )  const
 

Returns the socket fd that is used for communication with the server.

Returns:
The socket over which DCOP is communicating with the server.

Definition at line 868 of file dcopclient.cpp.

void DCOPClient::suspend  ) 
 

Temporarily suspends processing of DCOP events.

This can be usefull if you need to show e.g. a dialog before your application is ready to accept DCOP requests. Normally the dialog would start an event loop and in this event loop DCOP requests will be handled.

Be aware that not responding to DCOP requests may cause other programs that want to communicate with your application, to hang.

See also:
resume()

isSuspended()

Definition at line 561 of file dcopclient.cpp.

void DCOPClient::resume  ) 
 

Resumes the processing of DCOP events.

See also:
suspend().

isSuspended()

Definition at line 567 of file dcopclient.cpp.

bool DCOPClient::isSuspended  )  const
 

Returns whether DCOP events are being processed.

See also:
suspend()

resume().

Since:
3.1

Definition at line 573 of file dcopclient.cpp.

bool DCOPClient::send const QCString remApp,
const QCString remObj,
const QCString remFun,
const QByteArray data
 

Sends a data block to the server.

Parameters:
remApp The remote application id.
remObj The name of the remote object.
remFun The remote function in the specified object to call.
data The data to provide to the remote function.
Returns:
Whether or not the server was able to accept the send.

Definition at line 916 of file dcopclient.cpp.

References isAttached(), QCString::isEmpty(), normalizeFunctionSignature(), and receive().

Referenced by emitDCOPSignal(), and send().

bool DCOPClient::send const QCString remApp,
const QCString remObj,
const QCString remFun,
const QString data
 

This function acts exactly the same as the above, but the data parameter can be specified as a QString for convenience.

Parameters:
remApp The remote application id.
remObj The name of the remote object.
remFun The remote function in the specified object to call.
data The data to provide to the remote function.
Returns:
Whether or not the server was able to accept the send.

Definition at line 963 of file dcopclient.cpp.

References send().

bool DCOPClient::call const QCString remApp,
const QCString remObj,
const QCString remFun,
const QByteArray data,
QCString replyType,
QByteArray replyData,
bool  useEventLoop = false
 

Performs a synchronous send and receive.

The parameters are the same as for send, with the exception of another QByteArray being provided for results to be (optionally) returned in.

A call blocks the application until the process receives the answer.

If useEventLoop is true, a local event loop will be started after 1/10th of a second in order to keep the user interface updated (by processing paint events and such) until an answer is received.

Parameters:
remApp the remote application's id
remObj the remote object id
remFun the remote function id
data the data to send
replyType the type of the reply will be written here
replyData the data of the reply will be written here
useEventLoop if true the event loop will be started when the call blocks too long
Returns:
true if successful, false otherwise
See also:
send()

Definition at line 1543 of file dcopclient.cpp.

References QCString::isEmpty(), and receive().

Referenced by connectDCOPSignal(), disconnectDCOPSignal(), isApplicationRegistered(), registerAs(), registeredApplications(), remoteFunctions(), remoteInterfaces(), remoteObjects(), setDaemonMode(), and setNotifications().

bool DCOPClient::findObject const QCString remApp,
const QCString remObj,
const QCString remFun,
const QByteArray data,
QCString foundApp,
QCString foundObj,
bool  useEventLoop = false
 

Searches for an object which matches a criteria.

findObject calls remFun in the applications and objects identified by remApp and remObj until remFun returns true. The name of the application and object that returned true are returned in foundApp and foundObj respectively.

If remFun is empty a default function is called in the object which always returns true.

A findObject blocks the application until the process receives the answer.

If useEventLoop is true, a local event loop will be started after 1/10th of a second in order to keep the user interface updated (by processing paint events and such) until an answer is received.

Parameters:
remApp The remote application id.
remObj The name of the remote object.
remFun The remote function in the specified object to call. This function should return a bool and is used as criteria.
data The data to provide to the remote function.
foundApp The remote application id that matched the criteria.
foundObj The remote object that matched the criteria.
useEventLoop if true the event loop will be started when the call blocks too long
Returns:
true is returned when an object was found for which remFun returned true. If no such object is the function returns false.
See also:
send()

Definition at line 972 of file dcopclient.cpp.

References QValueList::append(), QValueList::begin(), QValueList::end(), QCString::isEmpty(), QCString::length(), and registeredApplications().

void DCOPClient::emitDCOPSignal const QCString object,
const QCString signal,
const QByteArray data
 

Emits signal as DCOP signal from object object with data as arguments.

Definition at line 1762 of file dcopclient.cpp.

References normalizeFunctionSignature(), and send().

Referenced by DCOPObject::emitDCOPSignal().

bool DCOPClient::connectDCOPSignal const QCString sender,
const QCString senderObj,
const QCString signal,
const QCString receiverObj,
const QCString slot,
bool  Volatile
 

Connects to a DCOP signal.

Parameters:
sender the name of the client that emits the signal. When empty the signal will be passed from any client.
senderObj the name of the sending object that emits the signal.
signal the name of the signal. The arguments should match with slot.
receiverObj The name of the object to call
slot The name of the slot to call. Its arguments should match with signal.
Volatile If true, the connection will not be reestablished when sender unregisters and reregisters with DCOP. In this case the sender must be registered when the connection is made. If false, the connection will be reestablished when sender reregisters. In this case the connection can be made even if sender is not registered at that time.
Returns:
false if a connection could not be established. This will be the case when
  • Volatile is true and sender does not exist.
  • signal and slot do not have matching arguments.

Definition at line 1775 of file dcopclient.cpp.

References call(), and normalizeFunctionSignature().

Referenced by DCOPObject::connectDCOPSignal(), and connectDCOPSignal().

bool DCOPClient::connectDCOPSignal const QCString sender,
const QCString signal,
const QCString receiverObj,
const QCString slot,
bool  Volatile
 

This class or method is obsolete, it is provided for compatibility only. For backwards compatibility

Definition at line 1801 of file dcopclient.cpp.

References connectDCOPSignal().

bool DCOPClient::disconnectDCOPSignal const QCString sender,
const QCString senderObj,
const QCString signal,
const QCString receiverObj,
const QCString slot
 

Disconnects a DCOP signal.

A special case is when both sender & signal are empty. In this case all connections related to receiverObj in the current client are disconnected. (Both connections from as well as to this object!)

Parameters:
sender the name of the client that emits the signal.
senderObj the name of the object that emits the signal. If empty all objects will be disconnected.
signal the name of the signal. The arguments should match with slot.
receiverObj The name of the object the signal is connected to. If empty all objects will be disconnected.
slot The name of the slot the signal is connected to. If empty all slots will be disconnected.
Returns:
false if no connection(s) where removed.

Definition at line 1808 of file dcopclient.cpp.

References call(), and normalizeFunctionSignature().

Referenced by DCOPObject::disconnectDCOPSignal(), disconnectDCOPSignal(), DCOPObject::setObjId(), and DCOPObject::~DCOPObject().

bool DCOPClient::disconnectDCOPSignal const QCString sender,
const QCString signal,
const QCString receiverObj,
const QCString slot
 

This class or method is obsolete, it is provided for compatibility only. For backwards compatibility

Definition at line 1833 of file dcopclient.cpp.

References disconnectDCOPSignal().

bool DCOPClient::process const QCString fun,
const QByteArray data,
QCString replyType,
QByteArray replyData
[virtual]
 

Reimplement this function to handle app-wide function calls unassociated w/an object.

Note that fun is normalized. See normalizeFunctionSignature().

If you do not want to reimplement this function for whatever reason, you can also use a default object or a DCOPObjectProxy.

Parameters:
fun the normalized function signature
data the received data
replyType write the reply type in this string
replyData write the reply data in this array
Returns:
true if successful, false otherwise
See also:
setDefaultObject()

Definition at line 1033 of file dcopclient.cpp.

DCOPClientTransaction * DCOPClient::beginTransaction  ) 
 

Delays the reply of the current function call until endTransaction() is called.

This allows a server to queue requests.

Note: Should be called from inside process() only!

See also:
endTransaction()

Definition at line 1696 of file dcopclient.cpp.

void DCOPClient::endTransaction DCOPClientTransaction *  t,
QCString replyType,
QByteArray replyData
 

Sends the delayed reply of a function call.

Parameters:
t the transaction as received from beginTransaction()
replyType write the reply type in this string
replyData write the reply data in this array
See also:
beginTransaction()

Definition at line 1725 of file dcopclient.cpp.

References isAttached().

Q_INT32 DCOPClient::transactionId  )  const
 

Test whether the current function call is delayed.

Note: Should be called from inside process() only!

Returns:
The ID of the current transaction or 0 if no transaction is going on.
See also:
process()

beginTransaction()

Definition at line 1716 of file dcopclient.cpp.

bool DCOPClient::isApplicationRegistered const QCString remApp  ) 
 

Checks whether remApp is registered with the DCOP server.

Parameters:
remApp the id of the remote application
Returns:
true if the remote application is registered, otherwise false.

Definition at line 1039 of file dcopclient.cpp.

References call().

QCStringList DCOPClient::registeredApplications  ) 
 

Retrieves the list of all currently registered applications from dcopserver.

Returns:
a list of all regietered applications

Definition at line 1053 of file dcopclient.cpp.

References call().

Referenced by findObject().

QCStringList DCOPClient::remoteObjects const QCString remApp,
bool *  ok = 0
 

Retrieves the list of objects of the remote application remApp.

Parameters:
remApp the id of the application
ok if not null, the function sets ok to true if successful and false if an error occurred
Returns:
the list of object ids

Definition at line 1065 of file dcopclient.cpp.

References call().

QCStringList DCOPClient::remoteInterfaces const QCString remApp,
const QCString remObj,
bool *  ok = 0
 

Retrieves the list of interfaces of the remote object remObj of application remApp.

Parameters:
remApp the id of the application
remObj the id of the object
ok if not null, the function sets ok to true if successful and false if an error occurred
Returns:
the list of interfaces

Definition at line 1081 of file dcopclient.cpp.

References call().

QCStringList DCOPClient::remoteFunctions const QCString remApp,
const QCString remObj,
bool *  ok = 0
 

Retrieves the list of functions of the remote object remObj of application remApp.

Parameters:
remApp the id of the application
remObj the id of the object
ok if not null, the function sets ok to true if successful and false if an error occurred
Returns:
the list of function ids

Definition at line 1097 of file dcopclient.cpp.

References call().

QCString DCOPClient::normalizeFunctionSignature const QCString fun  )  [static]
 

Normalizes the function signature fun.

A normalized signature doesn't contain any unnecessary whitespace anymore. The remaining whitespace consists of single blanks only (0x20).

Example for a normalized signature:

"someFunction(QString,int)"

When using send() or call(), normalization is done automatically for you.

Parameters:
fun the function signature to normalize
Returns:
the normalized function

Definition at line 882 of file dcopclient.cpp.

References QCString::copy(), QCString::isEmpty(), and QCString::resize().

Referenced by connectDCOPSignal(), disconnectDCOPSignal(), emitDCOPSignal(), and send().

QCString DCOPClient::senderId  )  const
 

Returns the appId of the last application that talked to us.

Returns:
the application id of the last application that send a message to this client

Definition at line 910 of file dcopclient.cpp.

void DCOPClient::setDefaultObject const QCString objId  ) 
 

Installs object objId as application-wide default object.

All app-wide messages that have not been processed by the dcopclient will be send further to objId.

Parameters:
objId the id of the new default object

Definition at line 1684 of file dcopclient.cpp.

QCString DCOPClient::defaultObject  )  const
 

Returns the current default object or an empty string if no object is installed as default object.

A default object receives application-wide messages that have not been processed by the DCOPClient itself.

Returns:
the id of the new default object

Definition at line 1690 of file dcopclient.cpp.

void DCOPClient::setNotifications bool  enabled  ) 
 

Enables / disables the applicationRegistered() / applicationRemoved() signals.

Note that a counter is maintained about how often this method was called. If this method is called twice with enabled set to true, notifications will be enabled until it was called with enabled set to false as often.

They are disabled by default.

Parameters:
enabled true to enable notifications, false to disable

Definition at line 1113 of file dcopclient.cpp.

References call().

void DCOPClient::setDaemonMode bool  daemonMode  ) 
 

Tells the dcopserver to treat the client as daemon client, not as regular client.

If the number of regular clients drops down to zero, the dcopserver will emit a KDE termination signal after 10 seconds.

Parameters:
daemonMode true to enable daemon mode, false to disable

Definition at line 1125 of file dcopclient.cpp.

References call().

DCOPClient * DCOPClient::mainClient  )  [static]
 

Returns the application's main dcop client.

The main client can be used by objects that do not have any specific access to a dcop client. In KDE applications, the main client usually is the same as KAppliction::dcopClient().

Returns:
the application's main dcop client

Definition at line 479 of file dcopclient.cpp.

Referenced by DCOPObject::connectDCOPSignal(), DCOPStub::dcopClient(), DCOPRef::dcopClient(), DCOPClient(), DCOPObject::disconnectDCOPSignal(), DCOPObject::emitDCOPSignal(), DCOPObject::setObjId(), ~DCOPClient(), and DCOPObject::~DCOPObject().

void DCOPClient::setMainClient DCOPClient mainClient  )  [static]
 

Sets the application's main dcop client.

The main client can be used by objects that do not have any specific access to a dcop client. In KDE applications, the main client usually is the same as KAppliction::dcopClient().

Parameters:
mainClient the new main dcop client

Definition at line 484 of file dcopclient.cpp.

Referenced by DCOPClient(), and ~DCOPClient().

QCString DCOPClient::dcopServerFile const QCString hostname = 0  )  [static]
 

File with information how to reach the dcopserver.

Parameters:
hostname Hostname to use, if empty current hostname of the system is used.
Returns:
Filename that contains information how to contact the DCOPserver.

Definition at line 232 of file dcopclient.cpp.

QCString DCOPClient::dcopServerFileOld const QCString hostname = 0  )  [static]
 

This class or method is obsolete, it is provided for compatibility only. For backwards compatibility with KDE 2.x

Definition at line 239 of file dcopclient.cpp.

void DCOPClient::applicationRegistered const QCString appId  )  [signal]
 

Indicates that the application appId has been registered with the server we are attached to.

You need to call setNotifications() first, to tell the DCOP server that you want to get these events.

Parameters:
appId the id of the new application

void DCOPClient::applicationRemoved const QCString appId  )  [signal]
 

Indicates that the formerly registered application appId has been removed.

You need to call setNotifications() first, to tell the DCOP server that you want to get these events.

Parameters:
appId the id of the removed application

void DCOPClient::attachFailed const QString msg  )  [signal]
 

Indicates that the process of establishing DCOP communications failed in some manner.

Usually attached to a dialog box or some other visual aid.

Parameters:
msg the message tha contains further information

void DCOPClient::blockUserInput bool  block  )  [signal]
 

Indicates that user input shall be blocked or released, depending on the argument.

The signal is emitted whenever the client has to wait too long (i.e. more than 1/10 of a second) for an answer to a synchronous call. In that case, it will enter a local event loop to keep the GUI updated until finally an answer arrives.

In KDE, the KApplication object connects to this signal to be able to block any user input (i.e. mouse and key events) while we are waiting for an answer. If we did not do this, the application might end up in an illegal state, as a keyboard shortcut or a mouse action might cause another dcop call to be issued.

Parameters:
block true to block user input, false otherwise

void DCOPClient::processSocketData int  socknum  )  [protected, slot]
 

Process data from the socket.

Parameters:
socknum the fd of the socket

Definition at line 1650 of file dcopclient.cpp.

References detach().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:42:46 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001