• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • dcop
 

dcop

Public Types | Public Member Functions | List of all members
DCOPRef Class Reference

#include <dcopref.h>

Public Types

enum  EventLoopFlag { NoEventLoop , UseEventLoop }
 

Public Member Functions

 DCOPRef ()
 
 DCOPRef (const DCOPRef &ref)
 
 DCOPRef (const TQCString &app, const TQCString &obj="")
 
 DCOPRef (DCOPObject *object)
 
 DCOPRef (const TQCString &app, const TQCString &obj, const TQCString &type)
 
bool isNull () const
 
TQCString app () const
 
TQCString obj () const
 
TQCString object () const
 
TQCString type () const
 
DCOPRef & operator= (const DCOPRef &)
 
void setRef (const TQCString &app, const TQCString &obj="")
 
void setRef (const TQCString &app, const TQCString &obj, const TQCString &type)
 
void clear ()
 
DCOPClient * dcopClient () const
 
void setDCOPClient (DCOPClient *client)
 
DCOPReply call (const TQCString &fun)
 
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop=NoEventLoop, int timeout=-1)
 
template<class T1 >
DCOPReply call (const TQCString &fun, const T1 &t1)
 
template<class T1 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1)
 
template<class T1 , class T2 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2)
 
template<class T1 , class T2 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2)
 
template<class T1 , class T2 , class T3 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3)
 
template<class T1 , class T2 , class T3 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3)
 
template<class T1 , class T2 , class T3 , class T4 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
 
template<class T1 , class T2 , class T3 , class T4 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
DCOPReply call (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
DCOPReply callExt (const TQCString &fun, EventLoopFlag useEventLoop, int timeout, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
 
bool send (const TQCString &fun)
 
template<class T1 >
bool send (const TQCString &fun, const T1 &t1)
 
template<class T1 , class T2 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2)
 
template<class T1 , class T2 , class T3 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3)
 
template<class T1 , class T2 , class T3 , class T4 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7)
 
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
bool send (const TQCString &fun, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8)
 

Detailed Description

A DCOPRef(erence) encapsulates a remote DCOP object as a triple <app,obj,type> where type is optional.

It allows for calling and passing DCOP objects.

A DCOP reference makes it possible to return references to other DCOP objects in a DCOP interface, for example in the method giveMeAnotherObject() in an interface like this:

class Example : public DCOPObject
{
K_DCOP
...
k_dcop:
DCOPRef giveMeAnotherObject();
int doSomething( TQString, float, bool );
ASYNC pingMe( TQCString message );
UserType userFunction( UserType );
};
DCOPObject
Provides an interface for receiving DCOP messages.
Definition: dcopobject.h:68
DCOPRef
A DCOPRef(erence) encapsulates a remote DCOP object as a triple <app,obj,type> where type is optional...
Definition: dcopref.h:279

In addition, the reference can operate as a comfortable generic stub to call remote DCOP objects in cases where no DCOPStub is available. The advantage of using DCOPRef instead of the low-level functions DCOPClient::call() and DCOPClient::send() are the nicer syntax and the implicit runtime error checking.

Say you want to call the method "doSomething" from the above interface on an object called "example" that lives in application "foo". Using DCOPRef, you would write

DCOPRef example( "foo", "example" );
int result = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );

If it is important for you to know whether the call succeeded or not, you can use the slightly more elaborate pattern:

DCOPRef example( "foo", "example" );
DCOPReply reply = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );
if ( reply.isValid() ) {
int result = reply;
// ...
}
DCOPReply
Represents the return value of a DCOPRef:call() or DCOPRef:send() invocation.
Definition: dcopref.h:45
DCOPReply::isValid
bool isValid() const
Checks whether the type is valid.
Definition: dcopref.h:99

Note that you must pass a TQString for the first argument. If you use a regular char pointer, it will be converted to a TQCString.

For curiosity, here is how you would achieve the exactly same functionality by using DCOPClient::call() directly:

TQByteArray data, replyData;
TQCString replyType;
TQDataStream arg( data, IO_WriteOnly );
arg << TQString("hello world" ), (float) 2.5 << true;
if ( DCOPClient::mainClient()->call( app, obj,
"doSomething(TQString,float,bool)",
data, replyType, replyData ) ) {
if ( replyType == "int" ) {
int result;
TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
// ...
}
}
DCOPClient::call
bool call(const TQCString &remApp, const TQCString &remObj, const TQCString &remFun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData, bool useEventLoop, int timeout, bool forceRemote)
Performs a synchronous send and receive.
Definition: dcopclient.cpp:1786
DCOPClient::mainClient
static DCOPClient * mainClient()
Returns the application's main dcop client.
Definition: dcopclient.cpp:599
DCOPRef::obj
TQCString obj() const
Object ID of the referenced object.
Definition: dcopref.cpp:145
DCOPRef::app
TQCString app() const
Name of the application in which the object resides.
Definition: dcopref.cpp:140

As you might see from the code snippet, the DCOPRef has to "guess" the names of the datatypes of the arguments to construct a dcop call. This is done through global inline overloads of the dcopTypeName function, for example

inline const char* dcopTypeName( const TQString& ) { return "TQString"; }

If you use custom data types that do support TQDataStream but have no corresponding dcopTypeName overload, you can either provide such an overload or use a DCOPArg wrapper that allows you to specify the type.

UserType userType;
DCOPReply reply = example.call( "userFunction", DCOPArg( userType, "UserType" ) );
DCOPArg
A generic DCOP argument.
Definition: dcopref.h:120

Similar, when you retrieve such a data type, you can use an explicit call to DCOPReply::get():

UserType userType;
reply.get( userType, "UserType" );
DCOPReply::get
bool get(T &t, const char *tname)
Retrieves the value from the type T.
Definition: dcopref.h:70

The function send() works very similar to call(), only that it returns a simple bool on whether the signal could be sent or not:

if ( example.send( "pingMe", "message" ) == false )
tqWarning("could not ping example" );

A DCOP reference operates on DCOPClient::mainClient(), unless you explicitly specify another client with setDCOPClient().

See also
DCOPArg
DCOPReply
DCOPObject
Author
Matthias Ettrich ettri.nosp@m.ch@k.nosp@m.de.or.nosp@m.g, Torben Weis weis@.nosp@m.kde..nosp@m.org

Definition at line 278 of file dcopref.h.

Member Enumeration Documentation

◆ EventLoopFlag

enum DCOPRef::EventLoopFlag

Flag for allowing entering the event loop if the call blocks too long.

NoEventLoop disables entering the event loop. UseEventLoop allows entering the event loop while waiting for long blocking DCOP call, thus making the GUI repaint if needed, and possibly allowing also other code in the application to be executed.

See also
DCOPClient::call()

Definition at line 403 of file dcopref.h.

Constructor & Destructor Documentation

◆ DCOPRef() [1/5]

DCOPRef::DCOPRef ( )

Creates a null reference.

See also
isNull()

Definition at line 105 of file dcopref.cpp.

◆ DCOPRef() [2/5]

DCOPRef::DCOPRef ( const DCOPRef &  ref)

Copy constructor.

Definition at line 110 of file dcopref.cpp.

◆ DCOPRef() [3/5]

DCOPRef::DCOPRef ( const TQCString &  app,
const TQCString &  obj = "" 
)

Creates a reference for application app and object obj.

Parameters
appThe name of an application as registered by the dcopserver.
objThe name of the dcop object.

Definition at line 125 of file dcopref.cpp.

◆ DCOPRef() [4/5]

DCOPRef::DCOPRef ( DCOPObject *  object)

Creates a reference to an existing dcop object.

Parameters
objectThe dcop object to create the ref to.

Definition at line 118 of file dcopref.cpp.

◆ DCOPRef() [5/5]

DCOPRef::DCOPRef ( const TQCString &  app,
const TQCString &  obj,
const TQCString &  type 
)

Creates a reference for application app and object obj with a specified type type.

Parameters
appThe name of an application as registered by the dcopserver.
objThe name of the dcop object
typeThe object's type

Definition at line 130 of file dcopref.cpp.

Member Function Documentation

◆ app()

TQCString DCOPRef::app ( ) const

Name of the application in which the object resides.

Returns
the application's id. Can be null or empty if not set.

Definition at line 140 of file dcopref.cpp.

◆ call() [1/9]

DCOPReply DCOPRef::call ( const TQCString &  fun)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 417 of file dcopref.h.

◆ call() [2/9]

template<class T1 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 457 of file dcopref.h.

◆ call() [3/9]

template<class T1 , class T2 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 513 of file dcopref.h.

◆ call() [4/9]

template<class T1 , class T2 , class T3 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 578 of file dcopref.h.

◆ call() [5/9]

template<class T1 , class T2 , class T3 , class T4 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 651 of file dcopref.h.

◆ call() [6/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 732 of file dcopref.h.

◆ call() [7/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 821 of file dcopref.h.

◆ call() [8/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 917 of file dcopref.h.

◆ call() [9/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
DCOPReply DCOPRef::call ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7,
const T8 &  t8 
)
inline

Calls the function fun on the object referenced by this reference.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
t8the eigth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
send()
DCOPArg
Since
3.1

Definition at line 1022 of file dcopref.h.

◆ callExt() [1/9]

template<class T1 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
timeouttimeout for the call in miliseconds, or -1 for no timeout
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 483 of file dcopref.h.

◆ callExt() [2/9]

template<class T1 , class T2 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
timeouttimeout for the call in miliseconds, or -1 for no timeout
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 544 of file dcopref.h.

◆ callExt() [3/9]

template<class T1 , class T2 , class T3 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
timeouttimeout for the call in miliseconds, or -1 for no timeout
Since
3.2

Definition at line 613 of file dcopref.h.

◆ callExt() [4/9]

template<class T1 , class T2 , class T3 , class T4 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
timeouttimeout for the call in miliseconds, or -1 for no timeout
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 690 of file dcopref.h.

◆ callExt() [5/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
timeouttimeout for the call in miliseconds, or -1 for no timeout
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 775 of file dcopref.h.

◆ callExt() [6/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
timeouttimeout for the call in miliseconds, or -1 for no timeout
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 868 of file dcopref.h.

◆ callExt() [7/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
timeouttimeout for the call in miliseconds, or -1 for no timeout
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
Since
3.2

Definition at line 968 of file dcopref.h.

◆ callExt() [8/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop,
int  timeout,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7,
const T8 &  t8 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
timeouttimeout for the call in miliseconds, or -1 for no timeout
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
t8the eigth argument of the function. This can be a supported base type or a DCOPArg object.
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
Since
3.2

Definition at line 1077 of file dcopref.h.

◆ callExt() [9/9]

DCOPReply DCOPRef::callExt ( const TQCString &  fun,
EventLoopFlag  useEventLoop = NoEventLoop,
int  timeout = -1 
)
inline

Like call(), with additional arguments allowing entering the event loop and specifying timeout.

Parameters
useEventLoopif UseEventLoop, the event loop will be started when the call blocks too long
timeouttimeout for the call in miliseconds, or -1 for no timeout
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
Since
3.2

Definition at line 435 of file dcopref.h.

◆ clear()

void DCOPRef::clear ( )

Makes this a null reference.

See also
isNull()

Definition at line 194 of file dcopref.cpp.

◆ dcopClient()

DCOPClient * DCOPRef::dcopClient ( ) const

Returns the dcop client the reference operates on.

If no client has been set, this is the DCOPClient::mainClient().

Returns
the DCOPClient of this object
Since
3.1

Definition at line 166 of file dcopref.cpp.

◆ isNull()

bool DCOPRef::isNull ( ) const

Tests whether this is a null reference.

Returns
true if this object is a null reference
See also
clear()

Definition at line 135 of file dcopref.cpp.

◆ obj()

TQCString DCOPRef::obj ( ) const

Object ID of the referenced object.

Returns
the id of the referenced object. Can be null or empty if not set.
Since
3.1

Definition at line 145 of file dcopref.cpp.

◆ object()

TQCString DCOPRef::object ( ) const
Deprecated:

Definition at line 150 of file dcopref.cpp.

◆ operator=()

DCOPRef & DCOPRef::operator= ( const DCOPRef &  ref)

Assignment operator.

Copies the references data.

Definition at line 171 of file dcopref.cpp.

◆ send() [1/9]

bool DCOPRef::send ( const TQCString &  fun)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
Since
3.1

Definition at line 1116 of file dcopref.h.

◆ send() [2/9]

template<class T1 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1138 of file dcopref.h.

◆ send() [3/9]

template<class T1 , class T2 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1166 of file dcopref.h.

◆ send() [4/9]

template<class T1 , class T2 , class T3 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1199 of file dcopref.h.

◆ send() [5/9]

template<class T1 , class T2 , class T3 , class T4 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1236 of file dcopref.h.

◆ send() [6/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1277 of file dcopref.h.

◆ send() [7/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1322 of file dcopref.h.

◆ send() [8/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1371 of file dcopref.h.

◆ send() [9/9]

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
bool DCOPRef::send ( const TQCString &  fun,
const T1 &  t1,
const T2 &  t2,
const T3 &  t3,
const T4 &  t4,
const T5 &  t5,
const T6 &  t6,
const T7 &  t7,
const T8 &  t8 
)
inline

Calls the function fun on the object referenced by this reference.

Unlike call() this method does not expect a return value.

Parameters
funthe name of the DCOP function. This can be either the full function signature (e.g. "setName(TQString)") or only the function's name (e.g. "setName"). In the latter case the exact signature will be guessed from the arguments
t1the first argument of the function. This can be a supported base type or a DCOPArg object.
t2the second argument of the function. This can be a supported base type or a DCOPArg object.
t3the third argument of the function. This can be a supported base type or a DCOPArg object.
t4the fourth argument of the function. This can be a supported base type or a DCOPArg object.
t5the fifth argument of the function. This can be a supported base type or a DCOPArg object.
t6the sixth argument of the function. This can be a supported base type or a DCOPArg object.
t7the seventh argument of the function. This can be a supported base type or a DCOPArg object.
t8the eigth argument of the function. This can be a supported base type or a DCOPArg object.
Returns
the DCOPReply object. Is invalid ( DCOPReply::isValid()) when an error occurred.
See also
call()
DCOPArg
Since
3.1

Definition at line 1424 of file dcopref.h.

◆ setDCOPClient()

void DCOPRef::setDCOPClient ( DCOPClient *  client)

Sets a specific dcop client for this reference.

Otherwise DCOPClient::mainClient() is used.

Parameters
clientthe new DCOPClient of this object
Since
3.1

Definition at line 161 of file dcopref.cpp.

◆ setRef() [1/2]

void DCOPRef::setRef ( const TQCString &  app,
const TQCString &  obj,
const TQCString &  type 
)

Changes the referenced object.

Parameters
appthe application id.
objthe object id
typethe object's type

Definition at line 187 of file dcopref.cpp.

◆ setRef() [2/2]

void DCOPRef::setRef ( const TQCString &  app,
const TQCString &  obj = "" 
)

Changes the referenced object.

Resets the type to unknown (null). The type is not needed for call() and send().

Parameters
appthe application id.
objthe object id

Definition at line 180 of file dcopref.cpp.

◆ type()

TQCString DCOPRef::type ( ) const

Type of the referenced object.

May be null (i.e. unknown).

Returns
the type of the referenced object, or null if unknown

Definition at line 156 of file dcopref.cpp.


The documentation for this class was generated from the following files:
  • dcopref.h
  • dcopref.cpp

dcop

Skip menu "dcop"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

dcop

Skip menu "dcop"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dcop by doxygen 1.9.4
This website is maintained by Timothy Pearson.