]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-protocol-chooser.h
include telepathy-glib.h
[empathy.git] / libempathy-gtk / empathy-protocol-chooser.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
2 /*
3  * Copyright (C) 2007-2009 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but 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  02110-1301  USA
18  *
19  * Authors: Xavier Claessens <xclaesse@gmail.com>
20  *          Jonny Lamb <jonny.lamb@collabora.co.uk
21  */
22
23 #ifndef __EMPATHY_PROTOCOL_CHOOSER_H__
24 #define __EMPATHY_PROTOCOL_CHOOSER_H__
25
26 #include <glib-object.h>
27 #include <gtk/gtk.h>
28
29 #include <telepathy-glib/telepathy-glib.h>
30
31 #include <libempathy/empathy-account-settings.h>
32
33 G_BEGIN_DECLS
34
35 #define EMPATHY_TYPE_PROTOCOL_CHOOSER (empathy_protocol_chooser_get_type ())
36 #define EMPATHY_PROTOCOL_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
37     EMPATHY_TYPE_PROTOCOL_CHOOSER, EmpathyProtocolChooser))
38 #define EMPATHY_PROTOCOL_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
39     EMPATHY_TYPE_PROTOCOL_CHOOSER, EmpathyProtocolChooserClass))
40 #define EMPATHY_IS_PROTOCOL_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
41     EMPATHY_TYPE_PROTOCOL_CHOOSER))
42 #define EMPATHY_IS_PROTOCOL_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
43     EMPATHY_TYPE_PROTOCOL_CHOOSER))
44 #define EMPATHY_PROTOCOL_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),\
45     EMPATHY_TYPE_PROTOCOL_CHOOSER, EmpathyProtocolChooserClass))
46
47 typedef struct _EmpathyProtocolChooser EmpathyProtocolChooser;
48 typedef struct _EmpathyProtocolChooserClass EmpathyProtocolChooserClass;
49
50 struct _EmpathyProtocolChooser
51 {
52   GtkComboBox parent;
53
54   /*<private>*/
55   gpointer priv;
56 };
57
58 struct _EmpathyProtocolChooserClass
59 {
60   GtkComboBoxClass parent_class;
61 };
62
63 typedef gboolean (*EmpathyProtocolChooserFilterFunc) (TpConnectionManager *cm,
64     TpProtocol *protocol,
65     const gchar *service,
66     gpointer user_data);
67
68 GType empathy_protocol_chooser_get_type (void) G_GNUC_CONST;
69 GtkWidget * empathy_protocol_chooser_new (void);
70 TpConnectionManager *empathy_protocol_chooser_dup_selected (
71     EmpathyProtocolChooser *protocol_chooser,
72     TpProtocol **protocol,
73     gchar **service);
74
75 void empathy_protocol_chooser_set_visible (
76     EmpathyProtocolChooser *protocol_chooser,
77     EmpathyProtocolChooserFilterFunc func,
78     gpointer user_data);
79
80 EmpathyAccountSettings * empathy_protocol_chooser_create_account_settings (
81     EmpathyProtocolChooser *self);
82
83 G_END_DECLS
84 #endif /*  __EMPATHY_PROTOCOL_CHOOSER_H__ */