1 /* Map containing registered Telepathy clients
2  *
3  * Copyright (C) 2007-2009 Nokia Corporation.
4  * Copyright (C) 2009 Collabora Ltd.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * version 2.1 as published by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18  * 02110-1301 USA
19  *
20  */
21 
22 #ifndef MCD_CLIENT_REGISTRY_H
23 #define MCD_CLIENT_REGISTRY_H
24 
25 #include <glib-object.h>
26 
27 #include <telepathy-glib/telepathy-glib.h>
28 
29 #include "mcd-client-priv.h"
30 
31 G_BEGIN_DECLS
32 
33 typedef struct _McdClientRegistry McdClientRegistry;
34 typedef struct _McdClientRegistryClass McdClientRegistryClass;
35 typedef struct _McdClientRegistryPrivate McdClientRegistryPrivate;
36 
37 struct _McdClientRegistry
38 {
39   GObject parent;
40   McdClientRegistryPrivate *priv;
41 };
42 
43 struct _McdClientRegistryClass
44 {
45   GObjectClass parent;
46 };
47 
48 GType _mcd_client_registry_get_type (void);
49 
50 #define MCD_TYPE_CLIENT_REGISTRY \
51   (_mcd_client_registry_get_type ())
52 #define MCD_CLIENT_REGISTRY(obj) \
53   (G_TYPE_CHECK_INSTANCE_CAST ((obj), MCD_TYPE_CLIENT_REGISTRY, \
54                                McdClientRegistry))
55 #define MCD_CLIENT_REGISTRY_CLASS(klass) \
56   (G_TYPE_CHECK_CLASS_CAST ((klass), MCD_TYPE_CLIENT_REGISTRY, \
57                             McdClientRegistryClass))
58 #define MCD_IS_CLIENT_REGISTRY(obj) \
59   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MCD_TYPE_CLIENT_REGISTRY))
60 #define MCD_IS_CLIENT_REGISTRY_CLASS(klass) \
61   (G_TYPE_CHECK_CLASS_TYPE ((klass), MCD_TYPE_CLIENT_REGISTRY))
62 #define MCD_CLIENT_REGISTRY_GET_CLASS(obj) \
63   (G_TYPE_INSTANCE_GET_CLASS ((obj), MCD_TYPE_CLIENT_REGISTRY, \
64                               McdClientRegistryClass))
65 
66 G_GNUC_INTERNAL McdClientRegistry *_mcd_client_registry_new (
67     TpDBusDaemon *dbus_daemon);
68 
69 TpDBusDaemon *_mcd_client_registry_get_dbus_daemon (McdClientRegistry *self);
70 
71 G_GNUC_INTERNAL McdClientProxy *_mcd_client_registry_lookup (
72     McdClientRegistry *self, const gchar *well_known_name);
73 
74 G_GNUC_INTERNAL GPtrArray *_mcd_client_registry_dup_client_caps (
75     McdClientRegistry *self);
76 
77 G_GNUC_INTERNAL gboolean _mcd_client_registry_is_ready (
78     McdClientRegistry *self);
79 
80 G_GNUC_INTERNAL void _mcd_client_registry_init_hash_iter (
81     McdClientRegistry *self, GHashTableIter *iter);
82 
83 G_GNUC_INTERNAL GList *_mcd_client_registry_list_possible_handlers (
84     McdClientRegistry *self, const gchar *preferred_handler,
85     GVariant *request_props, TpChannel *channel,
86     const gchar *must_have_unique_name);
87 
88 G_END_DECLS
89 
90 #endif
91