3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2007 Damien Sandras
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or (at
9
* your option) any later version. This program is distributed in the hope
10
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Ekiga is licensed under the GPL license and as a special exception, you
19
* have permission to link or otherwise combine this program with the
20
* programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
* applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
* programs, as long as you do follow the requirements of the GNU GPL for all
23
* the rest of the software thus combined.
28
* account.h - description
29
* ------------------------------------------
30
* begin : written in 2008 by Damien Sandras
31
* copyright : (c) 2008 by Damien Sandras
32
* description : declaration of the interface of an AccountManager
44
#include "account-core.h"
46
#include "chain-of-responsibility.h"
47
#include "form-request.h"
48
#include "menu-builder.h"
54
* @addtogroup accounts
65
virtual ~Account () { }
68
/** Returns the name of the Ekiga::Account.
69
* This function is purely virtual and should be implemented by the
70
* Ekiga::Account descendant.
71
* @return The name of the Ekiga::Contact.
73
virtual const std::string get_name () const = 0;
76
/** Returns the protocol name of the Ekiga::Account.
77
* This function is purely virtual and should be implemented by the
78
* Ekiga::Account descendant.
79
* @return The protocol name of the Ekiga::Contact.
81
virtual const std::string get_protocol_name () const = 0;
84
/** Returns the address of record for that Ekiga::Account.
85
* @return The address of record.
87
virtual const std::string get_aor () const = 0;
90
/** Returns the hostname for the Ekiga::Account.
91
* This function is purely virtual and should be implemented by the
92
* Ekiga::Account descendant.
93
* @return The host name of the Ekiga::Account.
95
virtual const std::string get_host () const = 0;
98
/** Returns the user name for the Ekiga::Account.
99
* This function is purely virtual and should be implemented by the
100
* Ekiga::Account descendant.
101
* @return The user name of the Ekiga::Account.
103
virtual const std::string get_username () const = 0;
106
/** Returns the authentication user name for the Ekiga::Account.
107
* This function is purely virtual and should be implemented by the
108
* Ekiga::Account descendant.
109
* @return The authentication user name of the Ekiga::Account.
111
virtual const std::string get_authentication_username () const = 0;
114
/** Returns the password for the Ekiga::Account.
115
* This function is purely virtual and should be implemented by the
116
* Ekiga::Account descendant.
117
* @return The password of the Ekiga::Account.
119
virtual const std::string get_password () const = 0;
122
/** Returns the registration timeout for the Ekiga::Account.
123
* This function is purely virtual and should be implemented by the
124
* Ekiga::Account descendant.
125
* @return The timeout of the Ekiga::Account.
127
virtual unsigned get_timeout () const = 0;
130
/** Subscribe the given account.
131
* This function is purely virtual and should be implemented by the
132
* Ekiga::Account descendant.
134
virtual void enable () = 0;
137
/** Unsubscribe the given account.
138
* This function is purely virtual and should be implemented by the
139
* Ekiga::Account descendant.
141
virtual void disable () = 0;
144
/** Return true if the account is enabled.
145
* It does not mean that the account is successfully registered, it
146
* just means it is enabled.
147
* This function is purely virtual and should be implemented by the
148
* Ekiga::Account descendant.
150
virtual bool is_enabled () const = 0;
153
/** Return true if the account is active.
154
* This function is purely virtual and should be implemented by the
155
* Ekiga::Account descendant.
157
virtual bool is_active () const = 0;
160
/** Create the menu for that account and its actions.
161
* This function is purely virtual and should be implemented by
162
* the descendant of the Ekiga::Contact.
163
* @param A MenuBuilder object to populate.
165
virtual bool populate_menu (MenuBuilder &) = 0;
169
* Signals on that object
172
/** This signal is emitted when the Account has been updated.
174
sigc::signal<void> updated;
177
/** This signal is emitted when the Account has been removed.
179
sigc::signal<void> removed;
182
/** This signal is emitted when there is a new registration event for
184
* @param: state is the state
185
* info contains information about the registration status
187
sigc::signal<void, Ekiga::AccountCore::RegistrationState, std::string> registration_event;
190
/** This signal is emitted when there is a new message waiting indication
191
* @param: mwi is the message waiting indication
193
sigc::signal<void, std::string> mwi_event;
196
/** This chain allows the Account to present forms to the user
198
ChainOfResponsibility<FormRequest*> questions;