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

« back to all changes in this revision

Viewing changes to libgeis/server/geis_dbus_proxy_box.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_proxy_box.h
 
3
 * @brief Interface for a storage facility for GEIS DBus server client proxies.
 
4
 *
 
5
 * This header is for internal GEIS use only and contains no client
 
6
 * (externally-visible) symbols.
 
7
 */
 
8
 
 
9
/*
 
10
 * Copyright 2011 Canonical Ltd.
 
11
 *
 
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
 
15
 * later version.
 
16
 *
 
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
 
20
 * details.
 
21
 *
 
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/>.
 
24
 */
 
25
#ifndef GEIS_DBUS_CLIENT_BOX_H_
 
26
#define GEIS_DBUS_CLIENT_BOX_H_
 
27
 
 
28
#include "geis_dbus_client_proxy.h"
 
29
 
 
30
 
 
31
/**
 
32
 * A Container for GeisDBusProxy objects.
 
33
 */
 
34
typedef struct GeisDBusProxyBox *GeisDBusProxyBox;
 
35
 
 
36
/**
 
37
 * An iterator for traversing and accessing client proxies contained in a box.
 
38
 *
 
39
 * Client proxy box iterators are not threadsafe and should be conidered
 
40
 * invalidated if the box is updated during a traversal.
 
41
 */
 
42
typedef struct GeisDBusProxyBoxNode *GeisDBusProxyBoxIterator;
 
43
 
 
44
 
 
45
/**
 
46
 * Constructs a %GeisDBusProxyBox.
 
47
 *
 
48
 * @returns a valid %GeisDBusProxyBox or NULL on failure.
 
49
 */
 
50
GeisDBusProxyBox
 
51
geis_dbus_proxy_box_new();
 
52
 
 
53
/**
 
54
 * Destroys a %GeisDBusProxyBox.
 
55
 *
 
56
 * @param[in] box  A %GeisDBusProxyBox.
 
57
 */
 
58
void
 
59
geis_dbus_proxy_box_delete(GeisDBusProxyBox box);
 
60
 
 
61
/**
 
62
 * Inserts a %GeisDBusClientProxy in to a %GeisDBusProxyBox.
 
63
 *
 
64
 * @param[in] box    A %GeisDBusProxyBox.
 
65
 * @param[in] proxy  The %GeisDBusClientProxy to insert.
 
66
 */
 
67
void
 
68
geis_dbus_proxy_box_insert(GeisDBusProxyBox box, GeisDBusClientProxy proxy);
 
69
 
 
70
/**
 
71
 * Removes a %GeisDBusClientProxy from a %GeisDBusProxyBox.
 
72
 *
 
73
 * @param[in] box    A %GeisDBusProxyBox.
 
74
 * @param[in] proxy  The %GeisDBusClientProxy to remove.
 
75
 */
 
76
void
 
77
geis_dbus_proxy_box_remove(GeisDBusProxyBox box, GeisDBusClientProxy proxy);
 
78
 
 
79
/**
 
80
 * Gets an iterator initialized to the first client proxy in a box.
 
81
 *
 
82
 * @param[in] box    A %GeisDBusProxyBox.
 
83
 */
 
84
GeisDBusProxyBoxIterator
 
85
geis_dbus_proxy_box_begin(GeisDBusProxyBox box);
 
86
 
 
87
/**
 
88
 * Gets an iterator initialized to one-past-the-end of a client proxy box.
 
89
 *
 
90
 * @param[in] box    A %GeisDBusProxyBox.
 
91
 */
 
92
GeisDBusProxyBoxIterator
 
93
geis_dbus_proxy_box_end(GeisDBusProxyBox box);
 
94
 
 
95
/**
 
96
 * Gets the current client proxy from a client proxy box iterator.
 
97
 *
 
98
 * @param[in] iter The iterator.
 
99
 */
 
100
GeisDBusClientProxy
 
101
geis_dbus_proxy_box_iter_value(GeisDBusProxyBoxIterator iter);
 
102
 
 
103
/**
 
104
 * Advances a client proxy box iterator.
 
105
 *
 
106
 * @param[in] box   A %GeisDBusProxyBox.
 
107
 * @param[in] iter  The iterator.
 
108
 *
 
109
 * @returns the next iterator in sequence.
 
110
 */
 
111
GeisDBusProxyBoxIterator
 
112
geis_dbus_proxy_box_iter_next(GeisDBusProxyBox         box,
 
113
                              GeisDBusProxyBoxIterator iter);
 
114
 
 
115
#endif /* GEIS_DBUS_CLIENT_BOX_H_ */