Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
45452cd5
Commit
45452cd5
authored
Oct 02, 2007
by
Alexandre Bourget
Browse files
Merge branch 'newn_account'
parents
2159abcf
dbb41561
Changes
21
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
45452cd5
...
...
@@ -63,6 +63,7 @@ sflphone-gtk/doc/html/*
/sflphone-gtk/mkinstalldirs
/sflphone-gtk/src/sflphone-gtk
/sflphone-gtk/autom4te*
/sflphone-gtk/sflphone.desktop
...
...
@@ -94,7 +95,7 @@ tools/portaudio
/www/cache
/www/config.inc.php
/www/lighttpd.*
/doc/images/graphics/*
# Ignore platform packaging temp files
/platform/debian/changelog
...
...
sflphone-gtk/src/accountlist.c
View file @
45452cd5
...
...
@@ -115,15 +115,24 @@ const gchar * account_state_name(account_state_t s)
switch
(
s
)
{
case
ACCOUNT_STATE_REGISTERED
:
state
=
"Registered"
;
break
;
state
=
"Registered"
;
break
;
case
ACCOUNT_STATE_UNREGISTERED
:
state
=
"Not Registered"
;
break
;
state
=
"Not Registered"
;
break
;
case
ACCOUNT_STATE_TRYING
:
state
=
"Trying..."
;
break
;
default:
state
=
"Invalid"
;
break
;
state
=
"Invalid"
;
break
;
}
return
state
;
}
void
account_list_clear
(
)
{
g_queue_free
(
accountQueue
);
accountQueue
=
g_queue_new
();
}
sflphone-gtk/src/accountlist.h
View file @
45452cd5
...
...
@@ -49,7 +49,8 @@ typedef enum
{
ACCOUNT_STATE_INVALID
=
0
,
ACCOUNT_STATE_REGISTERED
,
ACCOUNT_STATE_UNREGISTERED
ACCOUNT_STATE_UNREGISTERED
,
ACCOUNT_STATE_TRYING
}
account_state_t
;
/** @struct account_t
...
...
@@ -62,7 +63,8 @@ typedef enum
*/
typedef
struct
{
gchar
*
accountID
;
account_state_t
state
;
GHashTable
*
properties
;
account_state_t
state
;
GHashTable
*
properties
;
}
account_t
;
/** This function initialize the account list. */
...
...
@@ -98,4 +100,6 @@ account_t * account_list_get_nth ( guint n );
* @param s The state
* @return The full text description of the state */
const
gchar
*
account_state_name
(
account_state_t
s
);
void
account_list_clear
(
);
#endif
sflphone-gtk/src/accountwindow.c
View file @
45452cd5
...
...
@@ -77,39 +77,48 @@ void
show_account_window
(
account_t
*
a
)
{
guint
response
;
currentAccount
=
a
;
// Current settings
gchar
*
curAccountType
=
NULL
;
gchar
*
curUserPart
=
NULL
;
gchar
*
curHostPart
=
NULL
;
gchar
*
curPassword
=
NULL
;
gchar
*
curUsername
=
NULL
;
gchar
*
curFullName
=
NULL
;
// Default settings
gchar
*
curAccountID
=
""
;
gchar
*
curAccountEnabled
=
"TRUE"
;
gchar
*
curAccountType
=
"SIP"
;
gchar
*
curUserPart
=
""
;
gchar
*
curHostPart
=
""
;
gchar
*
curPassword
=
""
;
gchar
*
curUsername
=
""
;
gchar
*
curFullName
=
""
;
/* TODO: add curProxy, and add boxes for Proxy support */
// Load from SIP/IAX/Unknown ?
curAccountType
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_TYPE
);
if
(
a
)
{
curAccountID
=
a
->
accountID
;
curAccountType
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_TYPE
);
curAccountEnabled
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ENABLED
);
if
(
strcmp
(
curAccountType
,
"IAX"
)
==
0
)
{
curHostPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_HOST
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_PASS
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_USER
);
curFullName
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_FULL_NAME
);
}
else
if
(
strcmp
(
curAccountType
,
"SIP"
)
==
0
)
{
curHostPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_HOST_PART
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_PASSWORD
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_AUTH_NAME
);
curFullName
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_FULL_NAME
);
curUserPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_USER_PART
);
if
(
strcmp
(
curAccountType
,
"IAX"
)
==
0
)
{
curHostPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_HOST
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_PASS
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_USER
);
curFullName
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_IAX_FULL_NAME
);
}
else
if
(
strcmp
(
curAccountType
,
"SIP"
)
==
0
)
{
curHostPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_HOST_PART
);
curPassword
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_PASSWORD
);
curUsername
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_AUTH_NAME
);
curFullName
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_FULL_NAME
);
curUserPart
=
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_SIP_USER_PART
);
}
}
else
{
// Default values...
curAccountType
=
"SIP"
;
else
{
currentAccount
=
g_new0
(
account_t
,
1
);
currentAccount
->
properties
=
g_hash_table_new
(
NULL
,
g_str_equal
);
curAccountID
=
"test"
;
}
dialog
=
GTK_DIALOG
(
gtk_dialog_new_with_buttons
(
"Account settings"
,
GTK_WINDOW
(
get_main_window
()),
GTK_DIALOG_MODAL
|
GTK_DIALOG_DESTROY_WITH_PARENT
,
...
...
@@ -132,14 +141,14 @@ show_account_window (account_t * a)
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
,
0
.
5
);
entryID
=
gtk_entry_new
();
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
entryID
);
gtk_entry_set_text
(
GTK_ENTRY
(
entryID
),
a
->
a
ccountID
);
gtk_entry_set_text
(
GTK_ENTRY
(
entryID
),
curA
ccountID
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
entryID
),
FALSE
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryID
,
1
,
2
,
0
,
1
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
#endif
entryEnabled
=
gtk_check_button_new_with_mnemonic
(
"_Enabled"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
entryEnabled
),
strcmp
(
g_hash_table_lookup
(
currentAccount
->
properties
,
ACCOUNT_ENABLED
)
,
"TRUE"
)
==
0
?
TRUE
:
FALSE
);
strcmp
(
curAccountEnabled
,
"TRUE"
)
==
0
?
TRUE
:
FALSE
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryEnabled
,
0
,
2
,
1
,
2
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
//entryRegister = gtk_check_button_new_with_mnemonic("_Register on startup ");
...
...
@@ -259,7 +268,11 @@ show_account_window (account_t * a)
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_ALIAS
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryName
))));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_TYPE
),
g_strdup
(
proto
));
if
(
strcmp
(
proto
,
"SIP"
)
==
0
)
{
/* Protocol = SIP */
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_FULL_NAME
),
...
...
@@ -295,7 +308,13 @@ show_account_window (account_t * a)
}
dbus_set_account_details
(
currentAccount
);
/** @todo Verify if it's the best condition to check */
if
(
currentAccount
->
accountID
==
NULL
)
{
dbus_add_account
(
currentAccount
);
}
else
{
dbus_set_account_details
(
currentAccount
);
}
}
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
...
...
sflphone-gtk/src/actions.c
View file @
45452cd5
...
...
@@ -89,6 +89,8 @@ sflphone_ringing(call_t * c )
void
sflphone_fill_account_list
()
{
account_list_clear
(
);
gchar
**
array
=
(
gchar
**
)
dbus_account_list
();
gchar
**
accountID
;
for
(
accountID
=
array
;
*
accountID
;
accountID
++
)
...
...
@@ -115,6 +117,10 @@ sflphone_fill_account_list()
{
a
->
state
=
ACCOUNT_STATE_UNREGISTERED
;
}
else
if
(
strcmp
(
status
,
"TRYING"
)
==
0
)
{
a
->
state
=
ACCOUNT_STATE_TRYING
;
}
else
{
a
->
state
=
ACCOUNT_STATE_INVALID
;
...
...
sflphone-gtk/src/actions.h
View file @
45452cd5
...
...
@@ -100,4 +100,5 @@ void sflphone_keypad ( guint keyval, gchar * key);
*/
void
sflphone_place_call
(
call_t
*
c
);
void
sflphone_fill_account_list
();
#endif
sflphone-gtk/src/configwindow.c
View file @
45452cd5
...
...
@@ -71,12 +71,11 @@ delete_account( GtkWidget *widget, gpointer data )
if
(
selectedAccount
)
{
dbus_remove_account
(
selectedAccount
->
accountID
);
fill_account_list
();
}
}
/**
*
Delete
an account
*
Edit
an account
*/
static
void
edit_account
(
GtkWidget
*
widget
,
gpointer
data
)
...
...
@@ -84,10 +83,19 @@ edit_account( GtkWidget *widget, gpointer data )
if
(
selectedAccount
)
{
show_account_window
(
selectedAccount
);
fill_account_list
();
}
}
/**
* Add an account
*/
static
void
add_account
(
GtkWidget
*
widget
,
gpointer
data
)
{
show_account_window
(
NULL
);
}
/* Call back when the user click on an account in the list */
static
void
select_account
(
GtkTreeSelection
*
sel
,
GtkTreeModel
*
model
)
...
...
@@ -110,8 +118,7 @@ select_account(GtkTreeSelection *sel, GtkTreeModel *model)
if
(
selectedAccount
)
{
gtk_widget_set_sensitive
(
GTK_WIDGET
(
editButton
),
TRUE
);
/*TODO Set to TRUE when removeAccount is implemented */
gtk_widget_set_sensitive
(
GTK_WIDGET
(
deleteButton
),
FALSE
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
deleteButton
),
TRUE
);
}
g_print
(
"select"
);
...
...
@@ -195,15 +202,13 @@ create_accounts_tab()
gtk_box_set_spacing
(
GTK_BOX
(
bbox
),
10
);
//GAIM_HIG_BOX_SPACE
gtk_button_box_set_layout
(
GTK_BUTTON_BOX
(
bbox
),
GTK_BUTTONBOX_START
);
gtk_box_pack_start
(
GTK_BOX
(
ret
),
bbox
,
FALSE
,
FALSE
,
0
);
gtk_widget_show
(
bbox
);
gtk_widget_show
(
bbox
);
addButton
=
gtk_button_new_from_stock
(
GTK_STOCK_ADD
);
/*
g_signal_connect_swapped(G_OBJECT(addButton), "clicked",
G_CALLBACK(
config_module), _gtkWindow);*/
g_signal_connect_swapped
(
G_OBJECT
(
addButton
),
"clicked"
,
G_CALLBACK
(
add_account
),
NULL
);
gtk_box_pack_start
(
GTK_BOX
(
bbox
),
addButton
,
FALSE
,
FALSE
,
0
);
gtk_widget_show
(
addButton
);
/* TODO Set to TRUE when AddAccount is implemented */
gtk_widget_set_sensitive
(
GTK_WIDGET
(
addButton
),
FALSE
);
editButton
=
gtk_button_new_from_stock
(
GTK_STOCK_EDIT
);
g_signal_connect_swapped
(
G_OBJECT
(
editButton
),
"clicked"
,
...
...
sflphone-gtk/src/dbus.c
View file @
45452cd5
...
...
@@ -141,6 +141,8 @@ accounts_changed_cb (DBusGProxy *proxy,
void
*
foo
)
{
g_print
(
"Accounts changed
\n
"
);
sflphone_fill_account_list
();
// TODO reload list
}
gboolean
...
...
@@ -459,6 +461,27 @@ dbus_set_account_details(account_t *a)
}
}
void
dbus_add_account
(
account_t
*
a
)
{
GError
*
error
=
NULL
;
org_sflphone_SFLphone_ConfigurationManager_add_account
(
configurationManagerProxy
,
a
->
properties
,
&
error
);
if
(
error
)
{
g_printerr
(
"Failed to call add_account() on ConfigurationManager: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
}
else
{
g_print
(
"DBus called add_account() on ConfigurationManager
\n
"
);
}
}
void
dbus_set_volume
(
const
gchar
*
device
,
gdouble
value
)
{
...
...
src/account.cpp
View file @
45452cd5
...
...
@@ -31,25 +31,12 @@ Account::Account(const AccountID& accountID) : _accountID(accountID)
Account
::~
Account
()
{
delete
_link
;
_link
=
NULL
;
// _link should be destroyed WHERE IT'S CREATED
//delete _link;
//_link = NULL;
}
void
Account
::
initConfig
(
Conf
::
ConfigTree
&
config
)
{
/*
std::string section(_accountID);
std::string type_str("string");
std::string type_int("int");
config.addConfigTreeItem(section, Conf::ConfigTreeItem(CONFIG_ACCOUNT_ENABLE,"1", type_int));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(CONFIG_ACCOUNT_AUTO_REGISTER, "1", type_int));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(CONFIG_ACCOUNT_ALIAS, _("My account"), type_str));
*/
}
void
Account
::
loadConfig
()
{
...
...
src/account.h
View file @
45452cd5
...
...
@@ -57,14 +57,9 @@ typedef std::string AccountID;
*/
class
Account
{
public:
Account
(
const
AccountID
&
accountID
);
Account
(
const
AccountID
&
accountID
);
virtual
~
Account
();
/**
* Load the default properties for the account
*/
virtual
void
initConfig
(
Conf
::
ConfigTree
&
config
);
virtual
~
Account
();
/**
* Load the settings for this account.
...
...
@@ -84,7 +79,7 @@ class Account{
inline
VoIPLink
*
getVoIPLink
()
{
return
_link
;
}
/**
* Register the underlying VoIPLink
* Register the underlying VoIPLink
. Launch the event listener.
*
* This should update the getRegistrationState() return value.
*
...
...
@@ -93,7 +88,7 @@ class Account{
virtual
void
registerVoIPLink
()
=
0
;
/**
* Unregister the underlying VoIPLink
* Unregister the underlying VoIPLink
. Stop the event listener.
*
* This should update the getRegistrationState() return value.
*
...
...
@@ -101,18 +96,6 @@ class Account{
*/
virtual
void
unregisterVoIPLink
()
=
0
;
/**
* Init the voiplink to run (event listener)
* @return false if an error occurs
*/
virtual
bool
init
()
=
0
;
/**
* Stop the voiplink to run (event listener)
* @return false is an error occurs
*/
virtual
bool
terminate
()
=
0
;
/**
* Tell if the account is enable or not. See doc for _enabled.
*/
...
...
src/config/config.cpp
View file @
45452cd5
...
...
@@ -51,6 +51,18 @@ ConfigTree::createSection(const std::string& section) {
}
}
/**
* Remove the section only if it exists
*/
void
ConfigTree
::
removeSection
(
const
std
::
string
&
section
)
{
// if we doesn't find the item, create it
SectionMap
::
iterator
iter
=
_sections
.
find
(
section
);
if
(
iter
!=
_sections
.
end
())
{
_sections
.
erase
(
iter
);
}
}
/** Retrieve the sections as an array */
TokenList
ConfigTree
::
getSections
()
...
...
src/config/config.h
View file @
45452cd5
...
...
@@ -65,7 +65,7 @@ public:
~
ConfigTree
();
void
createSection
(
const
std
::
string
&
section
);
void
removeSection
(
const
std
::
string
&
section
);
/**
* Return an array of strings, listing the sections of the config file
*
...
...
src/dbus/configurationmanager.cpp
View file @
45452cd5
...
...
@@ -19,6 +19,7 @@
#include
<global.h>
#include
<configurationmanager.h>
#include
<sstream>
#include
"../manager.h"
const
char
*
ConfigurationManager
::
SERVER_PATH
=
"/org/sflphone/SFLphone/ConfigurationManager"
;
...
...
@@ -49,7 +50,7 @@ void
ConfigurationManager
::
addAccount
(
const
std
::
map
<
::
DBus
::
String
,
::
DBus
::
String
>&
details
)
{
_debug
(
"ConfigurationManager::addAccount received
\n
"
);
Manager
::
instance
().
addAccount
(
details
);
}
...
...
@@ -65,7 +66,6 @@ ConfigurationManager::getAccountList( )
{
_debug
(
"ConfigurationManager::getAccountList received
\n
"
);
return
Manager
::
instance
().
getAccountList
();
}
...
...
src/dbus/dbusmanagerimpl.cpp
View file @
45452cd5
...
...
@@ -33,7 +33,8 @@ DBusManagerImpl::exec(){
_callManager
=
new
CallManager
(
conn
);
_configurationManager
=
new
ConfigurationManager
(
conn
);
Manager
::
instance
().
getEvents
();
// Register accounts
// Register accounts
Manager
::
instance
().
initRegisterAccounts
();
//getEvents();
_debug
(
"Starting DBus event loop
\n
"
);
_dispatcher
.
enter
();
...
...
src/iaxaccount.cpp
View file @
45452cd5
...
...
@@ -32,12 +32,14 @@ IAXAccount::IAXAccount(const AccountID& accountID)
IAXAccount
::~
IAXAccount
()
{
delete
_link
;
_link
=
NULL
;
}
void
IAXAccount
::
registerVoIPLink
()
{
init
();
_link
->
init
();
//unregisterAccount(); No need to unregister first.
IAXVoIPLink
*
thislink
=
dynamic_cast
<
IAXVoIPLink
*>
(
_link
);
if
(
thislink
)
{
...
...
@@ -54,40 +56,7 @@ void
IAXAccount
::
unregisterVoIPLink
()
{
_link
->
sendUnregister
();
}
bool
IAXAccount
::
init
()
{
_link
->
init
();
return
true
;
}
bool
IAXAccount
::
terminate
()
{
_link
->
terminate
();
return
true
;
}
void
IAXAccount
::
initConfig
(
Conf
::
ConfigTree
&
config
)
{
/*
std::string section(_accountID);
std::string type_str("string");
std::string type_int("int");
// Account generic
Account::initConfig(config);
// IAX specific
config.verifyConfigTreeItem(section, CONFIG_ACCOUNT_TYPE, "IAX", type_str);
config.verifyConfigTreeItem(section, IAX_FULL_NAME, "", type_str);
config.verifyConfigTreeItem(section, IAX_HOST, "", type_str);
config.verifyConfigTreeItem(section, IAX_USER, "", type_str);
config.verifyConfigTreeItem(section, IAX_PASS, "", type_str);
*/
}
void
...
...
src/iaxaccount.h
View file @
45452cd5
...
...
@@ -30,18 +30,14 @@
class
IAXAccount
:
public
Account
{
public:
IAXAccount
(
const
AccountID
&
accountID
);
IAXAccount
(
const
AccountID
&
accountID
);
~
IAXAccount
();
~
IAXAccount
();
/* virtual Account function implementation */
void
initConfig
(
Conf
::
ConfigTree
&
config
);
/** Actually unuseful, since config loading is done in init() */
void
loadConfig
();
void
registerVoIPLink
();
void
unregisterVoIPLink
();
bool
init
();
bool
terminate
();
private:
};
...
...
src/iaxvoiplink.cpp
View file @
45452cd5
...
...
@@ -397,12 +397,15 @@ IAXVoIPLink::sendRegister()
// lock
_mutexIAX
.
enterMutex
();
if
(
_regSession
==
NULL
)
{
_regSession
=
iax_session_new
();
// Always use a brand new session
if
(
_regSession
)
{
iax_destroy
(
_regSession
);
}
_regSession
=
iax_session_new
();
if
(
!
_regSession
)
{
_debug
(
"Error when generating new session for register"
);
}
else
{
// refresh
// last reg
...
...
src/managerimpl.cpp
View file @
45452cd5
...
...
@@ -429,11 +429,7 @@ ManagerImpl::initRegisterAccounts()
if
(
iter
->
second
)
{
iter
->
second
->
loadConfig
();
if
(
iter
->
second
->
isEnabled
()
)
{
if
(
iter
->
second
->
init
()
)
{
iter
->
second
->
registerVoIPLink
();
}
// init only the first account -- naahh..
//break;
iter
->
second
->
registerVoIPLink
();
}
}
iter
++
;
...
...
@@ -456,7 +452,6 @@ ManagerImpl::registerAccount(const AccountID& accountId)
while
(
iter
!=
_accountMap
.
end
()
)
{
if
(
iter
->
second
)
{
iter
->
second
->
unregisterVoIPLink
();
iter
->
second
->
terminate
();
}
iter
++
;
}
...
...
@@ -1070,8 +1065,6 @@ ManagerImpl::initConfigFile (void)
fill_config_str
(
VOICEMAIL_NUM
,
DFT_VOICEMAIL
);
fill_config_int
(
CONFIG_ZEROCONF
,
CONFIG_ZEROCONF_DEFAULT_STR
);
initConfigAccount
();
if
(
createSettingsPath
()
==
1
)
{
_exist
=
_config
.
populateFromFile
(
_path
);
}
...
...
@@ -1254,11 +1247,14 @@ ManagerImpl::detachZeroconfEvents(Pattern::Observer& observer)
*
* @todo When is this called ? Why this name 'getEvents' ?
*/
/**
* DEPRECATED
bool
ManagerImpl::getEvents() {
initRegisterAccounts();
return true;
}
*/
// TODO: rewrite this
/**
...
...
@@ -1584,9 +1580,9 @@ ManagerImpl::getAccountDetails(const AccountID& accountID)
std
::
pair
<
std
::
string
,
std
::
string
>
(
"Status"
,
(
state
==
VoIPLink
::
Registered
?
"REGISTERED"
:
(
state
==
VoIPLink
::
Unregistered
?
"UNREGISTERED"
:
(
state
==
VoIPLink
::
Trying
?
"TRYING"
:
(
state
==
VoIPLink
::
Error
?
"ERROR"
:
"UNKNOWN"
))))
(
state
==
VoIPLink
::
Unregistered
?
"UNREGISTERED"
:
(
state
==
VoIPLink
::
Trying
?
"TRYING"
:
(
state
==
VoIPLink
::
Error
?
"ERROR"
:
"UNKNOWN"
))))
)
);
a
.
insert
(
...
...
@@ -1684,7 +1680,7 @@ ManagerImpl::setAccountDetails( const ::DBus::String& accountID,
const
std
::
map
<
::
DBus
::
String
,
::
DBus
::
String
>&
details
)
{
std
::
string
accountType
=
(
*
details
.
find
(
CONFIG_ACCOUNT_TYPE
)).
second
;
setConfig
(
accountID
,
CONFIG_ACCOUNT_ALIAS
,
(
*
details
.
find
(
CONFIG_ACCOUNT_ALIAS
)).
second
);