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

dcop

  • dcop
dcopclient.h
1/*
2Copyright (c) 1999 Preston Brown <pbrown@kde.org>
3Copyright (c) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef _DCOPCLIENT_H
24#define _DCOPCLIENT_H
25
26#include <tqobject.h>
27#include <tqcstring.h>
28#include <tqvaluelist.h>
29#include <tqstring.h>
30#include <kdatastream.h> // needed for proper bool marshalling
31#include <tdelibs_export.h>
32
33class DCOPObjectProxy;
34class DCOPClientPrivate;
35class DCOPClientTransaction;
36
37typedef TQValueList<TQCString> QCStringList;
38
68class DCOP_EXPORT DCOPClient : public TQObject
69{
70 TQ_OBJECT
71
72
73 public:
76 DCOPClient();
77
81 virtual ~DCOPClient();
82
90 static void setServerAddress(const TQCString &addr);
91
110 bool attach();
111
118 void bindToApp();
119
124 bool detach();
125
130 bool isAttached() const;
131
137 bool isAttachedToForeignServer() const;
138
143 bool acceptCalls() const;
144
151 void setAcceptCalls(bool b);
152
159 bool qtBridgeEnabled(); // ### KDE 4.0: make const
160
168 void setQtBridgeEnabled(bool b);
169
195 TQCString registerAs( const TQCString &appId, bool addPID = true );
196
201 bool isRegistered() const;
202
208 TQCString appId() const;
209
214 int socket() const;
215
228 void suspend();
229
235 void resume();
236
243 bool isSuspended() const;
244
255 bool send(const TQCString &remApp, const TQCString &remObj,
256 const TQCString &remFun, const TQByteArray &data);
257
269 bool send(const TQCString &remApp, const TQCString &remObj,
270 const TQCString &remFun, const TQString &data);
271
304 bool call(const TQCString &remApp, const TQCString &remObj,
305 const TQCString &remFun, const TQByteArray &data,
306 TQCString& replyType, TQByteArray &replyData,
307 bool useEventLoop/*=false*/, int timeout/*=-1*/,
308 bool forceRemote/*=false*/);
309
313 // KDE4 merge with above
314 bool call(const TQCString &remApp, const TQCString &remObj,
315 const TQCString &remFun, const TQByteArray &data,
316 TQCString& replyType, TQByteArray &replyData,
317 bool useEventLoop/*=false*/, int timeout/*=-1*/);
321 // KDE4 merge with above
322 bool call(const TQCString &remApp, const TQCString &remObj,
323 const TQCString &remFun, const TQByteArray &data,
324 TQCString& replyType, TQByteArray &replyData,
325 bool useEventLoop=false);
326
355 int callAsync(const TQCString &remApp, const TQCString &remObj,
356 const TQCString &remFun, const TQByteArray &data,
357 TQObject *callBackObj, const char *callBackSlot);
358
395 bool findObject(const TQCString &remApp, const TQCString &remObj,
396 const TQCString &remFun, const TQByteArray &data,
397 TQCString &foundApp, TQCString &foundObj,
398 bool useEventLoop/*=false*/, int timeout/*=-1*/);
399
403 // KDE4 merge with above
404 bool findObject(const TQCString &remApp, const TQCString &remObj,
405 const TQCString &remFun, const TQByteArray &data,
406 TQCString &foundApp, TQCString &foundObj,
407 bool useEventLoop=false);
408
409
414 void emitDCOPSignal( const TQCString &object, const TQCString &signal,
415 const TQByteArray &data);
416
417 /* For backwards compatibility */
418 void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
419
440 bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
441 const TQCString &signal,
442 const TQCString &receiverObj, const TQCString &slot,
443 bool Volatile);
444
449 bool connectDCOPSignal( const TQCString &sender, const TQCString &signal,
450 const TQCString &receiverObj, const TQCString &slot,
451 bool Volatile) TDE_DEPRECATED;
452
470 bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
471 const TQCString &signal,
472 const TQCString &receiverObj, const TQCString &slot);
473
478 bool disconnectDCOPSignal( const TQCString &sender, const TQCString &signal,
479 const TQCString &receiverObj, const TQCString &slot) TDE_DEPRECATED;
480
496 virtual bool process(const TQCString &fun, const TQByteArray &data,
497 TQCString& replyType, TQByteArray &replyData);
498
508 DCOPClientTransaction *beginTransaction( );
509
517 void endTransaction( DCOPClientTransaction *t, TQCString& replyType, TQByteArray &replyData);
518
528 TQ_INT32 transactionId() const;
529
535 bool isApplicationRegistered( const TQCString& remApp);
536
542 QCStringList registeredApplications();
543
551 QCStringList remoteObjects( const TQCString& remApp, bool *ok = 0 );
552
562 QCStringList remoteInterfaces( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
563
573 QCStringList remoteFunctions( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
574
589 bool receive(const TQCString &app, const TQCString &obj,
590 const TQCString &fun, const TQByteArray& data,
591 TQCString& replyType, TQByteArray &replyData);
592
606 bool find(const TQCString &app, const TQCString &obj,
607 const TQCString &fun, const TQByteArray& data,
608 TQCString& replyType, TQByteArray &replyData);
609
627 static TQCString normalizeFunctionSignature( const TQCString& fun );
628
629
635 TQCString senderId() const;
636
637
645 void setDefaultObject( const TQCString& objId );
646
655 TQCString defaultObject() const;
656
668 void setNotifications( bool enabled );
669
678 void setDaemonMode( bool daemonMode );
679
685 void setPriorityCall(bool);
686
694 static DCOPClient* mainClient();
695
703 static void setMainClient( DCOPClient* mainClient);
704
710 static DCOPClient* findLocalClient( const TQCString &_appId );
711
715 static void emergencyClose();
716
722 static const char *postMortemSender();
724 static const char *postMortemObject();
726 static const char *postMortemFunction();
727
735 static TQCString dcopServerFile(const TQCString &hostname=0);
736
742 static TQCString dcopServerFileOld(const TQCString &hostname=0) TDE_DEPRECATED;
743
747 static TQCString iceauthPath();
748
749signals:
758 void applicationRegistered( const TQCString& appId );
767 void applicationRemoved( const TQCString& appId );
768
777 void attachFailed(const TQString &msg);
778
796 void blockUserInput( bool block );
797
807 void callBack(int, const TQCString&, const TQByteArray &);
808
809public slots:
814 void processSocketData(int socknum);
815
816protected slots:
817
818private slots:
819 void processPostedMessagesInternal();
820 void asyncReplyReady();
821 void eventLoopTimeout();
822
823public:
824 class ReplyStruct;
825
829 void handleAsyncReply(ReplyStruct *replyStruct);
830
831private:
832
833 bool isLocalTransactionFinished(TQ_INT32 id, TQCString &replyType, TQByteArray &replyData);
834
835 bool attachInternal( bool registerAsAnonymous = true );
836
837 bool callInternal(const TQCString &remApp, const TQCString &remObj,
838 const TQCString &remFun, const TQByteArray &data,
839 TQCString& replyType, TQByteArray &replyData,
840 bool useEventLoop, int timeout, int minor_opcode);
841
842
843 bool callInternal(const TQCString &remApp, const TQCString &remObjId,
844 const TQCString &remFun, const TQByteArray &data,
845 ReplyStruct *replyStruct,
846 bool useEventLoop, int timeout, int minor_opcode);
847
848protected:
849 virtual void virtual_hook( int id, void* data );
850private:
851 DCOPClientPrivate *d;
852};
853
854#endif
DCOPClient
Inter-process communication and remote procedure calls for KDE applications.
Definition: dcopclient.h:69
DCOPClient::blockUserInput
void blockUserInput(bool block)
Indicates that user input shall be blocked or released, depending on the argument.
DCOPClient::applicationRegistered
void applicationRegistered(const TQCString &appId)
Indicates that the application appId has been registered with the server we are attached to.
DCOPClient::applicationRemoved
void applicationRemoved(const TQCString &appId)
Indicates that the formerly registered application appId has been removed.
DCOPClient::attachFailed
void attachFailed(const TQString &msg)
Indicates that the process of establishing DCOP communications failed in some manner.
DCOPObjectProxy
You must use a proxy if you want to dispatch method calls for object IDs which don't have (yet) a cor...
Definition: dcopobject.h:353

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.