dcopstub.cpp Source File (dcop Library)

| # dcop Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# dcopstub.cpp

    00001 /*****************************************************************
    00002
    00003 Copyright (c) 1999 Preston Brown <pbrown@kde.org>
    00004 Copyright (c) 1999 Matthias Ettrich <ettrich@kde.org>
    00005
    00006 Permission is hereby granted, free of charge, to any person obtaining a copy
    00007 of this software and associated documentation files (the "Software"), to deal
    00008 in the Software without restriction, including without limitation the rights
    00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    00010 copies of the Software, and to permit persons to whom the Software is
    00011 furnished to do so, subject to the following conditions:
    00012
    00013 The above copyright notice and this permission notice shall be included in
    00014 all copies or substantial portions of the Software.
    00015
    00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    00019 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
    00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    00022
    00023 ******************************************************************/
    00024
    00025 #include "dcopstub.h"
    00026 #include "dcopclient.h"
    00027
    00028 class DCOPStubPrivate
    00029 {
    00030 public:
    00031     DCOPStubPrivate():dcopClient(0){}
    00032     DCOPClient* dcopClient;
    00033 };
    00034
    00035 DCOPStub::DCOPStub( const QCString& app, const QCString& obj )
    00036     : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
    00037 {
    00038 }
    00039
    00040 DCOPStub::DCOPStub( DCOPClient* client, const QCString& app, const QCString& obj )
    00041     : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
    00042 {
    00043     if ( client ) {
    00044         d = new DCOPStubPrivate;
    00045         d->dcopClient = client;
    00046     }
    00047 }
    00048
    00049 DCOPStub::~DCOPStub()
    00050 {
    00051     delete d;
    00052 }
    00053
    00054 DCOPClient* DCOPStub::dcopClient()
    00055 {
    00056     if ( d )
    00057         return d->dcopClient;
    00058     return DCOPClient::mainClient();
    00059 }
    00060
    00061 DCOPStub::Status DCOPStub::status() const
    00062 {
    00063     return m_status;
    00064 }
    00065
    00066 void DCOPStub::setStatus( Status _status )
    00067 {
    00068     m_status = _status;
    00069 }
    00070
    00071 bool DCOPStub::ok() const
    00072 {
    00073     return m_status != CallFailed;
    00074 }
    00075
    00076 void DCOPStub::callFailed()
    00077 {
    00078     setStatus( CallFailed );
    00079 }
    00080
    00081 QCString DCOPStub::app() const
    00082 {
    00083     return m_app;
    00084 }
    00085
    00086 QCString DCOPStub::obj() const
    00087 {
    00088     return m_obj;
    00089 }
    00090
    00091 void DCOPStub::virtual_hook( int, void* )
    00092 { /*BASE::virtual_hook( id, data );*/ }

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:41 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001