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

dcop

  • dcop
dcopstub.cpp
1/*****************************************************************
2
3Copyright (c) 1999 Preston Brown <pbrown@kde.org>
4Copyright (c) 1999 Matthias Ettrich <ettrich@kde.org>
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23******************************************************************/
24
25#include "dcopstub.h"
26#include "dcopclient.h"
27#include "dcopref.h"
28
29class DCOPStubPrivate
30{
31public:
32 DCOPStubPrivate():dcopClient(0){}
33 DCOPClient* dcopClient;
34};
35
36DCOPStub::DCOPStub( const TQCString& app, const TQCString& obj )
37 : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
38{
39}
40
41DCOPStub::DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj )
42 : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
43{
44 if ( client ) {
45 d = new DCOPStubPrivate;
46 d->dcopClient = client;
47 }
48}
49
50DCOPStub::DCOPStub( const DCOPRef& ref )
51 : m_app( ref.app() ), m_obj( ref.obj() ), m_status( CallSucceeded ),d(0)
52{
53}
54
55DCOPStub::~DCOPStub()
56{
57 delete d;
58}
59
60DCOPClient* DCOPStub::dcopClient()
61{
62 if ( d )
63 return d->dcopClient;
64 return DCOPClient::mainClient();
65}
66
67DCOPStub::Status DCOPStub::status() const
68{
69 return m_status;
70}
71
72void DCOPStub::setStatus( Status _status )
73{
74 m_status = _status;
75}
76
77bool DCOPStub::ok() const
78{
79 return m_status != CallFailed;
80}
81
82void DCOPStub::callFailed()
83{
84 setStatus( CallFailed );
85}
86
87TQCString DCOPStub::app() const
88{
89 return m_app;
90}
91
92TQCString DCOPStub::obj() const
93{
94 return m_obj;
95}
96
97void DCOPStub::virtual_hook( int, void* )
98{ /*BASE::virtual_hook( id, data );*/ }
DCOPClient
Inter-process communication and remote procedure calls for KDE applications.
Definition: dcopclient.h:69
DCOPClient::mainClient
static DCOPClient * mainClient()
Returns the application's main dcop client.
Definition: dcopclient.cpp:599
DCOPRef
A DCOPRef(erence) encapsulates a remote DCOP object as a triple <app,obj,type> where type is optional...
Definition: dcopref.h:279
DCOPStub::setStatus
void setStatus(Status _status)
Sets the status to status.
Definition: dcopstub.cpp:72
DCOPStub::status
Status status() const
Return the status of the last call, either CallSucceeded or CallFailed.
Definition: dcopstub.cpp:67
DCOPStub::callFailed
virtual void callFailed()
Invoked whenever a call fails.
Definition: dcopstub.cpp:82
DCOPStub::DCOPStub
DCOPStub(const TQCString &app, const TQCString &obj)
Creates a DCOPStub for application app and object obj.
Definition: dcopstub.cpp:36
DCOPStub::app
TQCString app() const
Return the application id.
Definition: dcopstub.cpp:87
DCOPStub::dcopClient
DCOPClient * dcopClient()
The dcopClient this stub operates on.
Definition: dcopstub.cpp:60
DCOPStub::obj
TQCString obj() const
Return the object id.
Definition: dcopstub.cpp:92
DCOPStub::ok
bool ok() const
Return whether no error occurred,.
Definition: dcopstub.cpp:77

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.