]> git.0d.be Git - empathy.git/blob - libempathy/empathy-client-factory.h
add empathy_client_factory_dup_contact_by_id_async()
[empathy.git] / libempathy / empathy-client-factory.h
1 /*
2  * Copyright (C) 2010 Collabora Ltd.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA  02110-1301  USA
18  *
19  * Authors: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
20  */
21
22 #ifndef __EMPATHY_CLIENT_FACTORY_H__
23 #define __EMPATHY_CLIENT_FACTORY_H__
24
25 #include <telepathy-glib/telepathy-glib.h>
26
27
28 #include "empathy-contact.h"
29
30 G_BEGIN_DECLS
31
32 #define EMPATHY_TYPE_CLIENT_FACTORY         (empathy_client_factory_get_type ())
33 #define EMPATHY_CLIENT_FACTORY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CLIENT_FACTORY, EmpathyClientFactory))
34 #define EMPATHY_CLIENT_FACTORY_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CLIENT_FACTORY, EmpathyClientFactoryClass))
35 #define EMPATHY_IS_CLIENT_FACTORY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CLIENT_FACTORY))
36 #define EMPATHY_IS_CLIENT_FACTORY_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CLIENT_FACTORY))
37 #define EMPATHY_CLIENT_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CLIENT_FACTORY, EmpathyClientFactoryClass))
38
39 typedef struct _EmpathyClientFactory EmpathyClientFactory;
40 typedef struct _EmpathyClientFactoryClass EmpathyClientFactoryClass;
41 typedef struct _EmpathyClientFactoryPrivate EmpathyClientFactoryPrivate;
42
43 struct _EmpathyClientFactory
44 {
45   TpAutomaticClientFactory parent;
46   EmpathyClientFactoryPrivate *priv;
47 };
48
49 struct _EmpathyClientFactoryClass
50 {
51   TpAutomaticClientFactoryClass parent_class;
52 };
53
54 GType empathy_client_factory_get_type (void) G_GNUC_CONST;
55
56 EmpathyClientFactory * empathy_client_factory_dup (void);
57
58 void empathy_client_factory_dup_contact_by_id_async (
59     EmpathyClientFactory *self,
60     TpConnection *connection,
61     const gchar *id,
62     GAsyncReadyCallback callback,
63     gpointer user_data);
64
65 EmpathyContact * empathy_client_factory_dup_contact_by_id_finish (
66     EmpathyClientFactory *self,
67     GAsyncResult *result,
68     GError **error) G_GNUC_WARN_UNUSED_RESULT;
69
70 G_END_DECLS
71 #endif /* __EMPATHY_CLIENT_FACTORY_H__ */