pendingcall.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *  D-Bus++ - C++ bindings for D-Bus
00004  *
00005  *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
00006  *
00007  *
00008  *  This library is free software; you can redistribute it and/or
00009  *  modify it under the terms of the GNU Lesser General Public
00010  *  License as published by the Free Software Foundation; either
00011  *  version 2.1 of the License, or (at your option) any later version.
00012  *
00013  *  This library is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  *  Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public
00019  *  License along with this library; if not, write to the Free Software
00020  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00024 
00025 #ifndef __DBUSXX_PENDING_CALL_H
00026 #define __DBUSXX_PENDING_CALL_H
00027 
00028 #include "api.h"
00029 #include "util.h"
00030 #include "message.h"
00031 
00032 namespace DBus
00033 {
00034 
00035 class Connection;
00036 
00037 class DXXAPI PendingCall
00038 {
00039 public:
00040 
00041   struct Private;
00042 
00043   PendingCall(Private *);
00044 
00045   PendingCall(const PendingCall &);
00046 
00047   virtual ~PendingCall();
00048 
00049   PendingCall &operator = (const PendingCall &);
00050 
00056   bool completed();
00057 
00072   void cancel();
00073 
00083   void block();
00084 
00095   void data(void *data);
00096 
00104   void *data();
00105 
00109   Slot<void, PendingCall &>& slot();
00110 
00121   Message steal_reply();
00122 
00123 private:
00124 
00125   RefPtrI<Private> _pvt;
00126 
00127   friend struct Private;
00128   friend class Connection;
00129 };
00130 
00131 } /* namespace DBus */
00132 
00133 #endif//__DBUSXX_PENDING_CALL_H