2
/* Ekiga -- A VoIP and Video-Conferencing application
3
* Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
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 Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
* Ekiga 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 OPAL, OpenH323 and PWLIB, and distribute the combination,
23
* without applying the requirements of the GNU GPL to the OPAL, OpenH323
24
* and PWLIB programs, as long as you do follow the requirements of the
25
* GNU GPL for all the rest of the software thus combined.
30
* opal-account.h - description
31
* ------------------------------------------
32
* begin : written in 2008 by Damien Sandras
33
* copyright : (c) 2008 by Damien Sandras
34
* description : declaration of an OPAL account
38
#ifndef __OPAL_ACCOUNT_H__
39
#define __OPAL_ACCOUNT_H__
42
#include "account-core.h"
45
#include "bank-impl.h"
50
* @addtogroup accounts
54
class Account: public Ekiga::Account
58
typedef enum { SIP, Ekiga, DiamondCard, H323 } Type;
60
Account (Ekiga::ServiceCore & core,
61
const std::string & account);
63
Account (Ekiga::ServiceCore & core,
68
std::string auth_user,
75
const std::string get_name () const;
77
const std::string get_aor () const;
79
/** Returns the protocol name of the Opal::Account.
80
* This function is purely virtual and should be implemented by the
81
* Ekiga::Account descendant.
82
* @return The protocol name of the Ekiga::Contact.
84
const std::string get_protocol_name () const;
86
const std::string get_host () const;
88
/** Returns the user name for the Opal::Account.
89
* This function is purely virtual and should be implemented by the
90
* Ekiga::Account descendant.
91
* @return The user name of the Ekiga::Account.
93
const std::string get_username () const;
95
/** Returns the authentication user name for the Opal::Account.
96
* This function is purely virtual and should be implemented by the
97
* Ekiga::Account descendant.
98
* @return The authentication user name of the Ekiga::Account.
100
const std::string get_authentication_username () const;
102
/** Returns the password for the Opal::Account.
103
* This function is purely virtual and should be implemented by the
104
* Ekiga::Account descendant.
105
* @return The password of the Ekiga::Account.
107
const std::string get_password () const;
109
void set_authentication_settings (const std::string & username,
110
const std::string & password);
112
/** Returns the registration timeout for the Opal::Account.
113
* This function is purely virtual and should be implemented by the
114
* Ekiga::Account descendant.
115
* @return The timeout of the Ekiga::Account.
117
unsigned get_timeout () const;
123
bool is_enabled () const;
125
bool is_active () const;
131
bool populate_menu (Ekiga::MenuBuilder &builder);
133
const std::string as_string () const;
135
sigc::signal0<void> trigger_saving;
138
void on_edit_form_submitted (bool submitted,
139
Ekiga::Form &result);
140
void on_consult (const std::string url);
142
// Triggered for our own event
143
void on_registration_event (Ekiga::AccountCore::RegistrationState state, std::string info);
151
std::string protocol_name;
153
std::string username;
154
std::string auth_username;
155
std::string password;
158
Ekiga::ServiceCore & core;