2
/* GnomeMeeting -- A Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (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
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* GnomeMeeting is licensed under the GPL license and as a special exception,
21
* you have permission to link or otherwise combine this program with the
22
* programs OpenH323 and Pwlib, and distribute the combination, without
23
* applying the requirements of the GNU GPL to the OpenH323 program, as long
24
* as you do follow the requirements of the GNU GPL for all the rest of the
25
* software thus combined.
30
* accounts.h - description
31
* --------------------------
32
* begin : Sun Feb 13 2005
33
* copyright : (C) 2000-2006 by Damien Sandras
34
* description : This file contains all the functions needed to
35
* manipulate H.323/SIP/... provider accounts.
47
/* An account is uniquely identified by its Account ID */
50
gchar *aid; /* Account ID */
51
gchar *account_name; /* Account Name */
52
gchar *protocol_name; /* Protocol for the account */
53
gchar *host; /* Host to register to */
54
gchar *domain; /* Registration domain/realm */
55
gchar *username; /* Username */
56
gchar *auth_username; /* Authentication username */
57
gchar *password; /* Password */
58
gboolean enabled; /* Account active or not */
59
gboolean default_account; /* Default account or not */
60
int timeout; /* Registration timeout */
61
int method; /* Registration method */
64
typedef GmAccount_ GmAccount;
67
#define GM_ACCOUNT(x) (GmAccount *) (x)
74
* BEHAVIOR : Returns an empty GmAccount. Only the UID field has a unique
78
GmAccount *gm_account_new ();
82
* BEHAVIOR : Deletes the given account and frees the associated memory.
85
void gm_account_delete (GmAccount *account);
89
* BEHAVIOR : Makes a copy of the given account, keeps the same ID.
92
GmAccount *gm_account_copy (GmAccount *account);
96
* BEHAVIOR : Adds the given account to the accounts list. The given
97
* account and its ID must not exist yet in the list.
98
* Returns TRUE on success, FALSE on failure.
99
* If there is no default account for that protocol yet,
100
* then the added account becomes the new default.
103
gboolean gnomemeeting_account_add (GmAccount *account);
107
* BEHAVIOR : Deletes the given account from the accounts list.
108
* Returns TRUE on success, FALSE on failure.
109
* If that account was the default account for that protocol,
110
* then the first account of the same protocol will become
111
* the new default account.
114
gboolean gnomemeeting_account_delete (GmAccount *account);
118
* BEHAVIOR : Modifies the given account in the accounts list.
119
* Returns TRUE on success, FALSE on failure.
122
gboolean gnomemeeting_account_modify (GmAccount *account);
126
* BEHAVIOR : Returns the list of configured GmAccounts.
129
GSList *gnomemeeting_get_accounts_list ();
133
* BEHAVIOR : Returns the account for the given domain or host.
136
GmAccount *gnomemeeting_get_account (const char *);
140
* BEHAVIOR : Returns the default account for the given protocol (if any).
143
GmAccount *gnomemeeting_get_default_account (gchar *protocol);
147
* BEHAVIOR : Toggles the active state of the given account.
148
* Returns TRUE on success, FALSE on failure.
151
gboolean gnomemeeting_account_toggle_active (GmAccount *account);
155
* BEHAVIOR : Sets the account as default or not.
156
* Returns TRUE on success, FALSE on failure.
159
gboolean gnomemeeting_account_set_default (GmAccount *account,
160
gboolean default_account);
164
* BEHAVIOR : Builds the GMAccounts window GMObject.
167
GtkWidget *gm_accounts_window_new ();
171
* BEHAVIOR : Update the account corresponding to the given domain, and
172
* username with the given status message. Enables or not
173
* the refreshing state for that account (see below for
178
void gm_accounts_window_update_account_state (GtkWidget *accounts_window,
181
const gchar *username,
183
const gchar *voicemails);
187
* BEHAVIOR : Refreshes the accounts list in the GUI to update them from
188
* the accounts list in the GmConf user configuration.
189
* If one of the account is in "refreshing state", then all
190
* other accounts are unsensitive and the busy cursor is
191
* displayed for the accounts list box.
194
void gm_accounts_window_update_accounts_list (GtkWidget *accounts_window);