2
* @file geis_dbus_proxy_box.h
3
* @brief Interface for a storage facility for GEIS DBus server client proxies.
5
* This header is for internal GEIS use only and contains no client
6
* (externally-visible) symbols.
10
* Copyright 2011 Canonical Ltd.
12
* This library is free software; you can redistribute it and/or modify it under
13
* the terms of the GNU Lesser General Public License as published by the Free
14
* Software Foundation; either version 3 of the License, or (at your option) any
17
* This library is distributed in the hope that it will be useful, but WITHOUT
18
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
22
* You should have received a copy of the GNU General Public License
23
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#ifndef GEIS_DBUS_CLIENT_BOX_H_
26
#define GEIS_DBUS_CLIENT_BOX_H_
28
#include "geis_dbus_client_proxy.h"
32
* A Container for GeisDBusProxy objects.
34
typedef struct GeisDBusProxyBox *GeisDBusProxyBox;
37
* An iterator for traversing and accessing client proxies contained in a box.
39
* Client proxy box iterators are not threadsafe and should be conidered
40
* invalidated if the box is updated during a traversal.
42
typedef struct GeisDBusProxyBoxNode *GeisDBusProxyBoxIterator;
46
* Constructs a %GeisDBusProxyBox.
48
* @returns a valid %GeisDBusProxyBox or NULL on failure.
51
geis_dbus_proxy_box_new();
54
* Destroys a %GeisDBusProxyBox.
56
* @param[in] box A %GeisDBusProxyBox.
59
geis_dbus_proxy_box_delete(GeisDBusProxyBox box);
62
* Inserts a %GeisDBusClientProxy in to a %GeisDBusProxyBox.
64
* @param[in] box A %GeisDBusProxyBox.
65
* @param[in] proxy The %GeisDBusClientProxy to insert.
68
geis_dbus_proxy_box_insert(GeisDBusProxyBox box, GeisDBusClientProxy proxy);
71
* Removes a %GeisDBusClientProxy from a %GeisDBusProxyBox.
73
* @param[in] box A %GeisDBusProxyBox.
74
* @param[in] proxy The %GeisDBusClientProxy to remove.
77
geis_dbus_proxy_box_remove(GeisDBusProxyBox box, GeisDBusClientProxy proxy);
80
* Gets an iterator initialized to the first client proxy in a box.
82
* @param[in] box A %GeisDBusProxyBox.
84
GeisDBusProxyBoxIterator
85
geis_dbus_proxy_box_begin(GeisDBusProxyBox box);
88
* Gets an iterator initialized to one-past-the-end of a client proxy box.
90
* @param[in] box A %GeisDBusProxyBox.
92
GeisDBusProxyBoxIterator
93
geis_dbus_proxy_box_end(GeisDBusProxyBox box);
96
* Gets the current client proxy from a client proxy box iterator.
98
* @param[in] iter The iterator.
101
geis_dbus_proxy_box_iter_value(GeisDBusProxyBoxIterator iter);
104
* Advances a client proxy box iterator.
106
* @param[in] box A %GeisDBusProxyBox.
107
* @param[in] iter The iterator.
109
* @returns the next iterator in sequence.
111
GeisDBusProxyBoxIterator
112
geis_dbus_proxy_box_iter_next(GeisDBusProxyBox box,
113
GeisDBusProxyBoxIterator iter);
115
#endif /* GEIS_DBUS_CLIENT_BOX_H_ */