3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
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 address of record for that Ekiga::Account.
77
* @return The address of record.
79
virtual const std::string get_aor () const = 0;
82
/** Returns the hostname for the Ekiga::Account.
83
* This function is purely virtual and should be implemented by the
84
* Ekiga::Account descendant.
85
* @return The host name of the Ekiga::Account.
87
virtual const std::string get_host () const = 0;
90
/** Subscribe the given account.
91
* This function is purely virtual and should be implemented by the
92
* Ekiga::Account descendant.
94
virtual void enable () = 0;
97
/** Unsubscribe the given account.
98
* This function is purely virtual and should be implemented by the
99
* Ekiga::Account descendant.
101
virtual void disable () = 0;
104
/** Return true if the account is enabled.
105
* It does not mean that the account is successfully registered, it
106
* just means it is enabled.
107
* This function is purely virtual and should be implemented by the
108
* Ekiga::Account descendant.
110
virtual bool is_enabled () const = 0;
113
/** Return true if the account is active.
114
* This function is purely virtual and should be implemented by the
115
* Ekiga::Account descendant.
117
virtual bool is_active () const = 0;
120
/** Create the menu for that account and its actions.
121
* This function is purely virtual and should be implemented by
122
* the descendant of the Ekiga::Contact.
123
* @param A MenuBuilder object to populate.
125
virtual bool populate_menu (MenuBuilder &) = 0;
129
* Signals on that object
132
/** This signal is emitted when the Account has been updated.
134
sigc::signal0<void> updated;
137
/** This signal is emitted when the Account has been removed.
139
sigc::signal0<void> removed;
142
/** This signal is emitted when there is a new registration event for
144
* @param: state is the state
145
* info contains information about the registration status
147
sigc::signal2<void, Ekiga::AccountCore::RegistrationState, std::string> registration_event;
150
/** This signal is emitted when there is a new message waiting indication
151
* @param: mwi is the message waiting indication
153
sigc::signal1<void, std::string> mwi_event;
156
/** This chain allows the Account to present forms to the user
158
ChainOfResponsibility<FormRequest*> questions;