~ubuntu-branches/ubuntu/vivid/ekiga/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/engine/account/skel/account.h

  • Committer: Bazaar Package Importer
  • Author(s): Kilian Krause
  • Date: 2011-07-17 00:24:50 UTC
  • mfrom: (5.1.5 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110717002450-ytg3wsrc1ptd3153
Tags: 3.3.1-1
* New upstream release.
 - Required libpt-dev 2.10 and libopal-dev 3.10
* Fix debian/watch to catch new version
* Remove libnotify0.7.patch - included upstream
* Add libboost-dev and libboost-signals-dev to Build-Depends
* debian/rules: Don't install *.la files for new internal shared libs
* Fix Vcs URIs to point to correct desktop/experimental/ekiga tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/*
3
 
 * Ekiga -- A VoIP and Video-Conferencing application
4
 
 * Copyright (C) 2000-2007 Damien Sandras
5
 
 
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.
13
 
 *
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.
17
 
 *
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.
24
 
 */
25
 
 
26
 
 
27
 
/*
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 
33
 
 *                          Account
34
 
 *
35
 
 */
36
 
 
37
 
#ifndef __ACCOUNT_H__
38
 
#define __ACCOUNT_H__
39
 
 
40
 
#include <set>
41
 
#include <map>
42
 
#include <string>
43
 
 
44
 
#include "account-core.h"
45
 
 
46
 
#include "chain-of-responsibility.h"
47
 
#include "form-request.h"
48
 
#include "menu-builder.h"
49
 
 
50
 
namespace Ekiga
51
 
{
52
 
 
53
 
/**
54
 
 * @addtogroup accounts 
55
 
 * @{
56
 
 */
57
 
 
58
 
  class Account
59
 
  {
60
 
  public:
61
 
 
62
 
 
63
 
    /** The destructor.
64
 
     */
65
 
    virtual ~Account () { }
66
 
 
67
 
 
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.
72
 
     */
73
 
    virtual const std::string get_name () const = 0;
74
 
 
75
 
 
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.
80
 
     */
81
 
    virtual const std::string get_protocol_name () const = 0;
82
 
 
83
 
 
84
 
    /** Returns the address of record for that Ekiga::Account.
85
 
     * @return The address of record.
86
 
     */
87
 
    virtual const std::string get_aor () const = 0;
88
 
 
89
 
 
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.
94
 
     */
95
 
    virtual const std::string get_host () const = 0;
96
 
 
97
 
 
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.
102
 
     */
103
 
    virtual const std::string get_username () const = 0;
104
 
 
105
 
 
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.
110
 
     */
111
 
    virtual const std::string get_authentication_username () const = 0;
112
 
 
113
 
 
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.
118
 
     */
119
 
    virtual const std::string get_password () const = 0;
120
 
 
121
 
 
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.
126
 
     */
127
 
    virtual unsigned get_timeout () const = 0;
128
 
 
129
 
 
130
 
    /** Subscribe the given account.
131
 
     * This function is purely virtual and should be implemented by the
132
 
     * Ekiga::Account descendant.
133
 
     */
134
 
    virtual void enable () = 0;
135
 
 
136
 
 
137
 
    /** Unsubscribe the given account.
138
 
     * This function is purely virtual and should be implemented by the
139
 
     * Ekiga::Account descendant.
140
 
     */
141
 
    virtual void disable () = 0;
142
 
 
143
 
 
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.
149
 
     */
150
 
    virtual bool is_enabled () const = 0;
151
 
 
152
 
 
153
 
    /** Return true if the account is active.
154
 
     * This function is purely virtual and should be implemented by the
155
 
     * Ekiga::Account descendant.
156
 
     */
157
 
    virtual bool is_active () const = 0;
158
 
    
159
 
    
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.
164
 
     */
165
 
    virtual bool populate_menu (MenuBuilder &) = 0;
166
 
 
167
 
 
168
 
    /**
169
 
     * Signals on that object
170
 
     */
171
 
 
172
 
    /** This signal is emitted when the Account has been updated.
173
 
     */
174
 
    sigc::signal<void> updated;
175
 
 
176
 
 
177
 
    /** This signal is emitted when the Account has been removed.
178
 
     */
179
 
    sigc::signal<void> removed;
180
 
 
181
 
 
182
 
    /** This signal is emitted when there is a new registration event for 
183
 
     *  the Account.
184
 
     * @param: state is the state
185
 
     *         info contains information about the registration status
186
 
     */
187
 
    sigc::signal<void, Ekiga::AccountCore::RegistrationState, std::string> registration_event;
188
 
 
189
 
 
190
 
    /** This signal is emitted when there is a new message waiting indication
191
 
     * @param: mwi is the message waiting indication
192
 
     */
193
 
    sigc::signal<void, std::string> mwi_event;
194
 
 
195
 
 
196
 
    /** This chain allows the Account to present forms to the user
197
 
     */
198
 
    ChainOfResponsibility<FormRequest*> questions;
199
 
  };
200
 
 
201
 
/**
202
 
 * @}
203
 
 */
204
 
 
205
 
};
206
 
#endif