2 * Copyright (C) 2006-2007 Imendio AB
3 * Copyright (C) 2007-2008 Collabora Ltd.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program 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 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301 USA
20 * Authors: Xavier Claessens <xclaesse@gmail.com>
21 * Martyn Russell <martyn@imendio.com>
24 #ifndef __EMPATHY_ACCOUNT_WIDGET_H__
25 #define __EMPATHY_ACCOUNT_WIDGET_H__
29 #include <libempathy/empathy-account-settings.h>
33 #define EMPATHY_TYPE_ACCOUNT_WIDGET empathy_account_widget_get_type()
34 #define EMPATHY_ACCOUNT_WIDGET(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidget))
36 #define EMPATHY_ACCOUNT_WIDGET_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidgetClass))
38 #define EMPATHY_IS_ACCOUNT_WIDGET(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET))
40 #define EMPATHY_IS_ACCOUNT_WIDGET_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_ACCOUNT_WIDGET))
42 #define EMPATHY_ACCOUNT_WIDGET_GET_CLASS(obj) \
43 (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidgetClass))
45 typedef struct _EmpathyAccountWidgetPriv EmpathyAccountWidgetPriv
;
46 typedef struct _EmpathyAccountWidgetUIDetails EmpathyAccountWidgetUIDetails
;
51 EmpathyAccountWidgetUIDetails
*ui_details
;
53 EmpathyAccountWidgetPriv
*priv
;
54 } EmpathyAccountWidget
;
57 GObjectClass parent_class
;
58 } EmpathyAccountWidgetClass
;
60 GType
empathy_account_widget_get_type (void);
62 GtkWidget
*empathy_account_widget_get_widget (EmpathyAccountWidget
*widget
);
64 EmpathyAccountWidget
* empathy_account_widget_new_for_protocol (
65 EmpathyAccountSettings
*settings
,
68 gboolean empathy_account_widget_contains_pending_changes
69 (EmpathyAccountWidget
*widget
);
70 void empathy_account_widget_discard_pending_changes
71 (EmpathyAccountWidget
*widget
);
73 gchar
* empathy_account_widget_get_default_display_name (
74 EmpathyAccountWidget
*widget
);
76 void empathy_account_widget_set_account_param (EmpathyAccountWidget
*widget
,
77 const gchar
*account
);
79 void empathy_account_widget_set_password_param (EmpathyAccountWidget
*self
,
80 const gchar
*password
);
82 void empathy_account_widget_set_other_accounts_exist (
83 EmpathyAccountWidget
*self
, gboolean others_exist
);
85 void empathy_account_widget_hide_buttons (EmpathyAccountWidget
*self
);
87 /* protected methods */
88 void empathy_account_widget_changed (EmpathyAccountWidget
*widget
);
90 EmpathyAccountSettings
* empathy_account_widget_get_settings (
91 EmpathyAccountWidget
*self
);
95 #endif /* __EMPATHY_ACCOUNT_WIDGET_H__ */