~ubuntu-branches/ubuntu/trusty/geis/trusty

« back to all changes in this revision

Viewing changes to libs/geis-dbus/geis_dbus_subscription.h

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-07-30 08:51:42 UTC
  • Revision ID: package-import@ubuntu.com-20120730085142-jrc33ygjvt0ob1wl
Tags: upstream-2.2.11
ImportĀ upstreamĀ versionĀ 2.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file geis_dbus_subscription.h
 
3
 * @brief Interface for the GEIS DBus subscription transport.
 
4
 */
 
5
 
 
6
/*
 
7
 * Copyright 2011 Canonical Ltd.
 
8
 *
 
9
 * This library is free software; you can redistribute it and/or modify it under
 
10
 * the terms of the GNU Lesser General Public License as published by the Free
 
11
 * Software Foundation; either version 3 of the License, or (at your option) any
 
12
 * later version.
 
13
 *
 
14
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
15
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
16
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 
17
 * details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
 */
 
22
#ifndef GEIS_DBUS_SUBSCRIPTION_H_
 
23
#define GEIS_DBUS_SUBSCRIPTION_H_
 
24
 
 
25
#include <dbus/dbus.h>
 
26
#include "geis/geis.h"
 
27
 
 
28
 
 
29
/**
 
30
 * Indicates if a DBus message is a GEIS_DBUS_SUBSCRIPTION_CREATE method call.
 
31
 *
 
32
 * @param[in] message  A DBus message.
 
33
 *
 
34
 * This function is used on the server side to identify if a received message is
 
35
 * a GEIS_DBUS_SUBSCRIPTION_CREATE method call.
 
36
 *
 
37
 * @returns GEIS_TRUE if the message is GEIS_DBUS_SUBSCRIPTION_CREATE,
 
38
 *          GEIS_FALSE otherwise.
 
39
 */
 
40
GeisBoolean
 
41
geis_dbus_message_is_subscription_create_call(DBusMessage *message);
 
42
 
 
43
/**
 
44
 * Creates a GEIS_DBUS_SUBSCRIPTION_CREATE method call message.
 
45
 *
 
46
 * @param[in] subscription  A GEIS subscription.
 
47
 *
 
48
 * This function is used on the client side to create a
 
49
 * GEIS_DBUS_SUBSCRIPTION_CREATE method call message from a local
 
50
 * %GeisSubscription object.
 
51
 *
 
52
 * @returns A DBus message object.
 
53
 */
 
54
DBusMessage *
 
55
geis_dbus_subscription_create_call_message(GeisSubscription subscription);
 
56
 
 
57
/**
 
58
 * Creates a %GeisSubscription from a GEIS_DBUS_SUBSCRIPTION_CREATE method call
 
59
 * message.
 
60
 *
 
61
 * @param[in] geis     A %Geis instance.
 
62
 * @param[in] message  A DBus message.
 
63
 *
 
64
 * This function is used on the server side to create a subscription object to
 
65
 * proxy the client-side subscription object.
 
66
 *
 
67
 * @returns a %GeisSubscription or NULL on failure.
 
68
 */
 
69
GeisSubscription
 
70
geis_dbus_subscription_from_create_call_message(Geis geis, DBusMessage *message);
 
71
 
 
72
/**
 
73
 * Creates a GEIS_DBUS_SUBSCRIPTION_CREATE method return message.
 
74
 *
 
75
 * @param[in] message       The DBUs method_call message to reply to.
 
76
 * @param[in] subscription  A GEIS subscription.
 
77
 *
 
78
 * This function is used on the server side to create a response to a received
 
79
 * GEIS_DBUS_SUBSCRIPTION_CREATE method call message.
 
80
 *
 
81
 * @returns A DBus message object.
 
82
 */
 
83
DBusMessage *
 
84
geis_dbus_subscription_create_return_message(DBusMessage      *message,
 
85
                                             GeisSubscription  subscription);
 
86
 
 
87
/**
 
88
 * Indicates if a DBus message is a GEIS_DBUS_SUBSCRIPTION_ACTIVATE message.
 
89
 *
 
90
 * @param[in] message  A DBus message.
 
91
 *
 
92
 * @returns GEIS_TRUE if the message is GEIS_DBUS_SUBSCRIPTION_ACTIVATE,
 
93
 *          GEIS_FALSE otherwise.
 
94
 */
 
95
GeisBoolean
 
96
geis_dbus_message_is_subscription_activate_call(DBusMessage *message);
 
97
 
 
98
/**
 
99
 * Creates a GEIS_DBUS_SUBSCRIPTION_ACTIVATE method call message.
 
100
 *
 
101
 * @param[in] subscription  A GEIS subscription.
 
102
 *
 
103
 * This function is used on the client side to create a
 
104
 * GEIS_DBUS_SUBSCRIPTION_ACTIVATE method call message from a local
 
105
 * %GeisSubscription object.
 
106
 *
 
107
 * @returns A DBus message object.
 
108
 */
 
109
DBusMessage *
 
110
geis_dbus_subscription_activate_call_message(GeisSubscription subscription);
 
111
 
 
112
/**
 
113
 * Creates a GEIS_DBUS_SUBSCRIPTION_ACTIVATE method return message.
 
114
 *
 
115
 * @param[in] message       The DBUs method_call message to reply to.
 
116
 * @param[in] subscription  A GEIS subscription.
 
117
 *
 
118
 * This function is used on the server side to create a response to a received
 
119
 * GEIS_DBUS_SUBSCRIPTION_ACTIVATE method call message.
 
120
 *
 
121
 * @returns A DBus message object.
 
122
 */
 
123
DBusMessage *
 
124
geis_dbus_subscription_activate_return_message(DBusMessage      *message,
 
125
                                               GeisSubscription  subscription);
 
126
 
 
127
/**
 
128
 * Indicates if a DBus message is a GEIS_DBUS_SUBSCRIPTION_DEACTIVATE message.
 
129
 *
 
130
 * @param[in] message  A DBus message.
 
131
 *
 
132
 * @returns GEIS_TRUE if the message is GEIS_DBUS_SUBSCRIPTION_DEACTIVATE,
 
133
 *          GEIS_FALSE otherwise.
 
134
 */
 
135
GeisBoolean
 
136
geis_dbus_message_is_subscription_deactivate_call(DBusMessage *message);
 
137
 
 
138
/**
 
139
 * Creates a GEIS_DBUS_SUBSCRIPTION_DEACTIVATE method return message.
 
140
 *
 
141
 * @param[in] message       The DBUs method_call message to reply to.
 
142
 * @param[in] subscription  A GEIS subscription.
 
143
 *
 
144
 * This function is used on the server side to create a response to a received
 
145
 * GEIS_DBUS_SUBSCRIPTION_DEACTIVATE method call message.
 
146
 *
 
147
 * @returns A DBus message object.
 
148
 */
 
149
DBusMessage *
 
150
geis_dbus_subscription_deactivate_return_message(DBusMessage      *message,
 
151
                                                 GeisSubscription  subscription);
 
152
 
 
153
/**
 
154
 * Creates a GEIS_DBUS_SUBSCRIPTION_DEACTIVATE method call message.
 
155
 *
 
156
 * @param[in] subscription  A GEIS subscription.
 
157
 *
 
158
 * This function is used on the client side to create a
 
159
 * GEIS_DBUS_SUBSCRIPTION_DEACTIVATE method call message from a local
 
160
 * %GeisSubscription object.
 
161
 *
 
162
 * @returns A DBus message object.
 
163
 */
 
164
DBusMessage *
 
165
geis_dbus_subscription_deactivate_call_message(GeisSubscription subscription);
 
166
 
 
167
/**
 
168
 * Indicates if a DBus message is a GEIS_DBUS_SUBSCRIPTION_DESTROY message.
 
169
 *
 
170
 * @param[in] message  A DBus message.
 
171
 *
 
172
 * @returns GEIS_TRUE if the message is GEIS_DBUS_SUBSCRIPTION_DESTROY,
 
173
 *          GEIS_FALSE otherwise.
 
174
 */
 
175
GeisBoolean
 
176
geis_dbus_message_is_subscription_destroy_call(DBusMessage *message);
 
177
 
 
178
/**
 
179
 * Creates a GEIS_DBUS_SUBSCRIPTION_DESTROY method call message.
 
180
 *
 
181
 * @param[in] subscription  A GEIS subscription.
 
182
 *
 
183
 * This function is used on the client side to create a
 
184
 * GEIS_DBUS_SUBSCRIPTION_DESTROY method call message from a local
 
185
 * %GeisSubscription object.
 
186
 *
 
187
 * @returns A DBus message object.
 
188
 */
 
189
DBusMessage *
 
190
geis_dbus_subscription_destroy_call_message(GeisSubscription subscription);
 
191
 
 
192
/**
 
193
 * Creates a GEIS_DBUS_SUBSCRIPTION_DESTROY method return message.
 
194
 *
 
195
 * @param[in] message       The DBUs method_call message to reply to.
 
196
 *
 
197
 * This function is used on the server side to create a response to a received
 
198
 * GEIS_DBUS_SUBSCRIPTION_DESTROY method call message.
 
199
 *
 
200
 * @returns A DBus message object.
 
201
 */
 
202
DBusMessage *
 
203
geis_dbus_subscription_destroy_return_message(DBusMessage *message);
 
204
 
 
205
 
 
206
#endif /* GEIS_DBUS_SUBSCRIPTION_H_ */