pendingcall.h
Go to the documentation of this file.
1/*
2 *
3 * D-Bus++ - C++ bindings for D-Bus
4 *
5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
6 *
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24
25#ifndef __DBUSXX_PENDING_CALL_H
26#define __DBUSXX_PENDING_CALL_H
27
28#include "api.h"
29#include "util.h"
30#include "message.h"
31
32namespace DBus
33{
34
35class Connection;
36
38{
39public:
40
41 struct Private;
42
44
45 PendingCall(const PendingCall &);
46
47 virtual ~PendingCall();
48
49 PendingCall &operator = (const PendingCall &);
50
56 bool completed();
57
72 void cancel();
73
83 void block();
84
95 void data(void *data);
96
104 void *data();
105
110
122
123private:
124
126
127 friend struct Private;
128 friend class Connection;
129};
130
131} /* namespace DBus */
132
133#endif//__DBUSXX_PENDING_CALL_H
#define DXXAPI
Definition api.h:36
void cancel()
Cancels the pending call, such that any reply or error received will just be ignored.
Slot< void, PendingCall & > & slot()
Message steal_reply()
Gets the reply.
bool completed()
Checks whether the pending call has received a reply yet, or not.
PendingCall(Private *)
friend class Connection
void data(void *data)
Stores a pointer on a PendingCall, along with an optional function to be used for freeing the data wh...
void block()
Block until the pending call is completed.
RefPtrI< Private > _pvt