Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
9c45b69c
Commit
9c45b69c
authored
Feb 29, 2012
by
Alexandre Savard
Browse files
#8821: Renamed account map keys for consistency
parent
60bd10bf
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
daemon/src/account.h
View file @
9c45b69c
...
...
@@ -64,69 +64,70 @@ enum RegistrationState {
};
// Account identifier
static
const
char
*
const
ACCOUNT_ID
=
"Account.id"
;
static
const
char
*
const
CONFIG_
ACCOUNT_ID
=
"Account.id"
;
// Common account parameters
static
const
char
*
const
CONFIG_ACCOUNT_TYPE
=
"Account.type"
;
static
const
char
*
const
CONFIG_ACCOUNT_ALIAS
=
"Account.alias"
;
static
const
char
*
const
CONFIG_ACCOUNT_MAILBOX
=
"Account.mailbox"
;
static
const
char
*
const
CONFIG_ACCOUNT_ENABLE
=
"Account.enable"
;
static
const
char
*
const
CONFIG_ACCOUNT_RESOLVE_ONCE
=
"Account.resolveOnce"
;
static
const
char
*
const
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
=
"Account.registrationExpire"
;
static
const
char
*
const
CONFIG_CREDENTIAL_NUMBER
=
"Credential.count"
;
static
const
char
*
const
ACCOUNT_DTMF_TYPE
=
"Account.dtmfType"
;
static
const
char
*
const
CONFIG_
ACCOUNT_DTMF_TYPE
=
"Account.dtmfType"
;
static
const
char
*
const
CONFIG_RINGTONE_PATH
=
"Account.ringtonePath"
;
static
const
char
*
const
CONFIG_RINGTONE_ENABLED
=
"Account.ringtoneEnabled"
;
static
const
char
*
const
HOSTNAME
=
"
hostname"
;
static
const
char
*
const
USERNAME
=
"
username"
;
static
const
char
*
const
ROUTESET
=
"
routeset"
;
static
const
char
*
const
PASSWORD
=
"
password"
;
static
const
char
*
const
REALM
=
"
realm"
;
static
const
char
*
const
DEFAULT_REALM
=
"*"
;
static
const
char
*
const
USERAGENT
=
"
useragent"
;
static
const
char
*
const
CONFIG_ACCOUNT_
HOSTNAME
=
"Account.
hostname"
;
static
const
char
*
const
CONFIG_ACCOUNT_
USERNAME
=
"Account.
username"
;
static
const
char
*
const
CONFIG_ACCOUNT_
ROUTESET
=
"Account.
routeset"
;
static
const
char
*
const
CONFIG_ACCOUNT_
PASSWORD
=
"Account.
password"
;
static
const
char
*
const
CONFIG_ACCOUNT_
REALM
=
"Account.
realm"
;
static
const
char
*
const
CONFIG_ACCOUNT_DEFAULT_REALM
=
"*"
;
static
const
char
*
const
CONFIG_ACCOUNT_USERAGENT
=
"Account.
useragent"
;
static
const
char
*
const
LOCAL_INTERFACE
=
"Account.localInterface"
;
static
const
char
*
const
PUBLISHED_SAMEAS_LOCAL
=
"Account.publishedSameAsLocal"
;
static
const
char
*
const
LOCAL_PORT
=
"Account.localPort"
;
static
const
char
*
const
PUBLISHED_PORT
=
"Account.publishedPort"
;
static
const
char
*
const
PUBLISHED_ADDRESS
=
"Account.publishedAddress"
;
static
const
char
*
const
CONFIG_
LOCAL_INTERFACE
=
"Account.localInterface"
;
static
const
char
*
const
CONFIG_
PUBLISHED_SAMEAS_LOCAL
=
"Account.publishedSameAsLocal"
;
static
const
char
*
const
CONFIG_
LOCAL_PORT
=
"Account.localPort"
;
static
const
char
*
const
CONFIG_
PUBLISHED_PORT
=
"Account.publishedPort"
;
static
const
char
*
const
CONFIG_
PUBLISHED_ADDRESS
=
"Account.publishedAddress"
;
static
const
char
*
const
DISPLAY_NAME
=
"Account.displayName"
;
static
const
char
*
const
DEFAULT_ADDRESS
=
"0.0.0.0"
;
static
const
char
*
const
CONFIG_
DISPLAY_NAME
=
"Account.displayName"
;
static
const
char
*
const
CONFIG_
DEFAULT_ADDRESS
=
"0.0.0.0"
;
// SIP specific parameters
static
const
char
*
const
SIP_PROXY
=
"SIP.proxy"
;
static
const
char
*
const
STUN_SERVER
=
"STUN.server"
;
static
const
char
*
const
STUN_ENABLE
=
"STUN.enable"
;
static
const
char
*
const
CONFIG_
SIP_PROXY
=
"SIP.proxy"
;
static
const
char
*
const
CONFIG_
STUN_SERVER
=
"STUN.server"
;
static
const
char
*
const
CONFIG_
STUN_ENABLE
=
"STUN.enable"
;
// SRTP specific parameters
static
const
char
*
const
SRTP_ENABLE
=
"SRTP.enable"
;
static
const
char
*
const
SRTP_KEY_EXCHANGE
=
"SRTP.keyExchange"
;
static
const
char
*
const
SRTP_ENCRYPTION_ALGO
=
"SRTP.encryptionAlgorithm"
;
// Provided by ccRTP,0=NULL,1=AESCM,2=AESF8
static
const
char
*
const
SRTP_RTP_FALLBACK
=
"SRTP.rtpFallback"
;
static
const
char
*
const
ZRTP_HELLO_HASH
=
"ZRTP.helloHashEnable"
;
static
const
char
*
const
ZRTP_DISPLAY_SAS
=
"ZRTP.displaySAS"
;
static
const
char
*
const
ZRTP_NOT_SUPP_WARNING
=
"ZRTP.notSuppWarning"
;
static
const
char
*
const
ZRTP_DISPLAY_SAS_ONCE
=
"ZRTP.displaySasOnce"
;
static
const
char
*
const
TLS_LISTENER_PORT
=
"TLS.listenerPort"
;
static
const
char
*
const
TLS_ENABLE
=
"TLS.enable"
;
static
const
char
*
const
TLS_CA_LIST_FILE
=
"TLS.certificateListFile"
;
static
const
char
*
const
TLS_CERTIFICATE_FILE
=
"TLS.certificateFile"
;
static
const
char
*
const
TLS_PRIVATE_KEY_FILE
=
"TLS.privateKeyFile"
;
static
const
char
*
const
TLS_PASSWORD
=
"TLS.password"
;
static
const
char
*
const
TLS_METHOD
=
"TLS.method"
;
static
const
char
*
const
TLS_CIPHERS
=
"TLS.ciphers"
;
static
const
char
*
const
TLS_SERVER_NAME
=
"TLS.serverName"
;
static
const
char
*
const
TLS_VERIFY_SERVER
=
"TLS.verifyServer"
;
static
const
char
*
const
TLS_VERIFY_CLIENT
=
"TLS.verifyClient"
;
static
const
char
*
const
TLS_REQUIRE_CLIENT_CERTIFICATE
=
"TLS.requireClientCertificate"
;
static
const
char
*
const
TLS_NEGOTIATION_TIMEOUT_SEC
=
"TLS.negotiationTimeoutSec"
;
static
const
char
*
const
TLS_NEGOTIATION_TIMEOUT_MSEC
=
"TLS.negotiationTimemoutMsec"
;
static
const
char
*
const
REGISTRATION_STATUS
=
"Status"
;
static
const
char
*
const
REGISTRATION_STATE_CODE
=
"Registration.code"
;
static
const
char
*
const
REGISTRATION_STATE_DESCRIPTION
=
"Registration.description"
;
static
const
char
*
const
CONFIG_
SRTP_ENABLE
=
"SRTP.enable"
;
static
const
char
*
const
CONFIG_
SRTP_KEY_EXCHANGE
=
"SRTP.keyExchange"
;
static
const
char
*
const
CONFIG_
SRTP_ENCRYPTION_ALGO
=
"SRTP.encryptionAlgorithm"
;
// Provided by ccRTP,0=NULL,1=AESCM,2=AESF8
static
const
char
*
const
CONFIG_
SRTP_RTP_FALLBACK
=
"SRTP.rtpFallback"
;
static
const
char
*
const
CONFIG_
ZRTP_HELLO_HASH
=
"ZRTP.helloHashEnable"
;
static
const
char
*
const
CONFIG_
ZRTP_DISPLAY_SAS
=
"ZRTP.displaySAS"
;
static
const
char
*
const
CONFIG_
ZRTP_NOT_SUPP_WARNING
=
"ZRTP.notSuppWarning"
;
static
const
char
*
const
CONFIG_
ZRTP_DISPLAY_SAS_ONCE
=
"ZRTP.displaySasOnce"
;
static
const
char
*
const
CONFIG_
TLS_LISTENER_PORT
=
"TLS.listenerPort"
;
static
const
char
*
const
CONFIG_
TLS_ENABLE
=
"TLS.enable"
;
static
const
char
*
const
CONFIG_
TLS_CA_LIST_FILE
=
"TLS.certificateListFile"
;
static
const
char
*
const
CONFIG_
TLS_CERTIFICATE_FILE
=
"TLS.certificateFile"
;
static
const
char
*
const
CONFIG_
TLS_PRIVATE_KEY_FILE
=
"TLS.privateKeyFile"
;
static
const
char
*
const
CONFIG_
TLS_PASSWORD
=
"TLS.password"
;
static
const
char
*
const
CONFIG_
TLS_METHOD
=
"TLS.method"
;
static
const
char
*
const
CONFIG_
TLS_CIPHERS
=
"TLS.ciphers"
;
static
const
char
*
const
CONFIG_
TLS_SERVER_NAME
=
"TLS.serverName"
;
static
const
char
*
const
CONFIG_
TLS_VERIFY_SERVER
=
"TLS.verifyServer"
;
static
const
char
*
const
CONFIG_
TLS_VERIFY_CLIENT
=
"TLS.verifyClient"
;
static
const
char
*
const
CONFIG_
TLS_REQUIRE_CLIENT_CERTIFICATE
=
"TLS.requireClientCertificate"
;
static
const
char
*
const
CONFIG_
TLS_NEGOTIATION_TIMEOUT_SEC
=
"TLS.negotiationTimeoutSec"
;
static
const
char
*
const
CONFIG_
TLS_NEGOTIATION_TIMEOUT_MSEC
=
"TLS.negotiationTimemoutMsec"
;
static
const
char
*
const
CONFIG_
REGISTRATION_STATUS
=
"
Registration.
Status"
;
static
const
char
*
const
CONFIG_
REGISTRATION_STATE_CODE
=
"Registration.code"
;
static
const
char
*
const
CONFIG_
REGISTRATION_STATE_DESCRIPTION
=
"Registration.description"
;
// General configuration keys for accounts
static
const
char
*
const
aliasKey
=
"alias"
;
...
...
daemon/src/dbus/configurationmanager.cpp
View file @
9c45b69c
...
...
@@ -79,19 +79,19 @@ ConfigurationManager::getTlsSettingsDefault()
portstr
<<
DEFAULT_SIP_TLS_PORT
;
std
::
map
<
std
::
string
,
std
::
string
>
tlsSettingsDefault
;
tlsSettingsDefault
[
TLS_LISTENER_PORT
]
=
portstr
.
str
();
tlsSettingsDefault
[
TLS_CA_LIST_FILE
]
=
""
;
tlsSettingsDefault
[
TLS_CERTIFICATE_FILE
]
=
""
;
tlsSettingsDefault
[
TLS_PRIVATE_KEY_FILE
]
=
""
;
tlsSettingsDefault
[
TLS_PASSWORD
]
=
""
;
tlsSettingsDefault
[
TLS_METHOD
]
=
"TLSv1"
;
tlsSettingsDefault
[
TLS_CIPHERS
]
=
""
;
tlsSettingsDefault
[
TLS_SERVER_NAME
]
=
""
;
tlsSettingsDefault
[
TLS_VERIFY_SERVER
]
=
"true"
;
tlsSettingsDefault
[
TLS_VERIFY_CLIENT
]
=
"true"
;
tlsSettingsDefault
[
TLS_REQUIRE_CLIENT_CERTIFICATE
]
=
"true"
;
tlsSettingsDefault
[
TLS_NEGOTIATION_TIMEOUT_SEC
]
=
"2"
;
tlsSettingsDefault
[
TLS_NEGOTIATION_TIMEOUT_MSEC
]
=
"0"
;
tlsSettingsDefault
[
CONFIG_
TLS_LISTENER_PORT
]
=
portstr
.
str
();
tlsSettingsDefault
[
CONFIG_
TLS_CA_LIST_FILE
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_CERTIFICATE_FILE
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_PRIVATE_KEY_FILE
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_PASSWORD
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_METHOD
]
=
"TLSv1"
;
tlsSettingsDefault
[
CONFIG_
TLS_CIPHERS
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_SERVER_NAME
]
=
""
;
tlsSettingsDefault
[
CONFIG_
TLS_VERIFY_SERVER
]
=
"true"
;
tlsSettingsDefault
[
CONFIG_
TLS_VERIFY_CLIENT
]
=
"true"
;
tlsSettingsDefault
[
CONFIG_
TLS_REQUIRE_CLIENT_CERTIFICATE
]
=
"true"
;
tlsSettingsDefault
[
CONFIG_
TLS_NEGOTIATION_TIMEOUT_SEC
]
=
"2"
;
tlsSettingsDefault
[
CONFIG_
TLS_NEGOTIATION_TIMEOUT_MSEC
]
=
"0"
;
return
tlsSettingsDefault
;
}
...
...
daemon/src/iax/iaxaccount.cpp
View file @
9c45b69c
...
...
@@ -114,32 +114,32 @@ void IAXAccount::setAccountDetails(std::map<std::string, std::string> details)
// Account setting common to SIP and IAX
alias_
=
details
[
CONFIG_ACCOUNT_ALIAS
];
type_
=
details
[
CONFIG_ACCOUNT_TYPE
];
username_
=
details
[
USERNAME
];
hostname_
=
details
[
HOSTNAME
];
password_
=
details
[
PASSWORD
];
username_
=
details
[
CONFIG_ACCOUNT_
USERNAME
];
hostname_
=
details
[
CONFIG_ACCOUNT_
HOSTNAME
];
password_
=
details
[
CONFIG_ACCOUNT_
PASSWORD
];
enabled_
=
details
[
CONFIG_ACCOUNT_ENABLE
]
==
"true"
;
mailBox_
=
details
[
CONFIG_ACCOUNT_MAILBOX
];
displayName_
=
details
[
DISPLAY_NAME
];
userAgent_
=
details
[
USERAGENT
];
displayName_
=
details
[
CONFIG_
DISPLAY_NAME
];
userAgent_
=
details
[
CONFIG_ACCOUNT_
USERAGENT
];
}
std
::
map
<
std
::
string
,
std
::
string
>
IAXAccount
::
getAccountDetails
()
const
{
std
::
map
<
std
::
string
,
std
::
string
>
a
;
a
[
ACCOUNT_ID
]
=
accountID_
;
a
[
CONFIG_
ACCOUNT_ID
]
=
accountID_
;
a
[
CONFIG_ACCOUNT_ALIAS
]
=
alias_
;
a
[
CONFIG_ACCOUNT_ENABLE
]
=
enabled_
?
"true"
:
"false"
;
a
[
CONFIG_ACCOUNT_TYPE
]
=
type_
;
a
[
HOSTNAME
]
=
hostname_
;
a
[
USERNAME
]
=
username_
;
a
[
PASSWORD
]
=
password_
;
a
[
CONFIG_ACCOUNT_
HOSTNAME
]
=
hostname_
;
a
[
CONFIG_ACCOUNT_
USERNAME
]
=
username_
;
a
[
CONFIG_ACCOUNT_
PASSWORD
]
=
password_
;
a
[
CONFIG_ACCOUNT_MAILBOX
]
=
mailBox_
;
RegistrationState
state
(
registrationState_
);
a
[
REGISTRATION_STATUS
]
=
mapStateNumberToString
(
state
);
a
[
USERAGENT
]
=
userAgent_
;
a
[
CONFIG_
REGISTRATION_STATUS
]
=
mapStateNumberToString
(
state
);
a
[
CONFIG_ACCOUNT_
USERAGENT
]
=
userAgent_
;
return
a
;
}
...
...
daemon/src/managerimpl.cpp
View file @
9c45b69c
...
...
@@ -2386,7 +2386,7 @@ std::map<std::string, std::string> ManagerImpl::getAccountDetails(
}
AccountMap
::
const_iterator
iter
=
accountMap_
.
find
(
accountID
);
Account
*
account
=
0
;
Account
*
account
=
NULL
;
if
(
iter
!=
accountMap_
.
end
())
account
=
iter
->
second
;
...
...
daemon/src/preferences.h
View file @
9c45b69c
...
...
@@ -40,7 +40,7 @@ static const char * const historyLimitKey = "historyLimit";
static
const
char
*
const
historyMaxCallsKey
=
"historyMaxCalls"
;
static
const
char
*
const
notifyMailsKey
=
"notifyMails"
;
static
const
char
*
const
zoneToneChoiceKey
=
"zoneToneChoice"
;
static
const
char
*
const
registrationExpireKey
=
"registration
E
xpire"
;
static
const
char
*
const
registrationExpireKey
=
"registration
e
xpire"
;
static
const
char
*
const
portNumKey
=
"portNum"
;
static
const
char
*
const
searchBarDisplayKey
=
"searchBarDisplay"
;
static
const
char
*
const
zeroConfenableKey
=
"zeroConfenable"
;
...
...
daemon/src/sip/sipaccount.cpp
View file @
9c45b69c
This diff is collapsed.
Click to expand it.
daemon/src/sip/sipvoiplink.cpp
View file @
9c45b69c
...
...
@@ -655,6 +655,8 @@ void SIPVoIPLink::registerKeepAliveTimer(pj_timer_entry& timer, pj_time_val& del
{
pj_status_t
status
;
DEBUG
(
"UserAgent: Registering keep alive timer"
);
status
=
pjsip_endpt_schedule_timer
(
endpt_
,
&
timer
,
&
delay
);
if
(
status
!=
PJ_SUCCESS
)
ERROR
(
"Could not schedule new timer in pjsip endpoint"
);
...
...
gnome/src/config/accountconfigdialog.c
View file @
9c45b69c
...
...
@@ -834,11 +834,19 @@ static GtkWidget* create_registration_expire(account_t *a)
GtkWidget
*
table
,
*
frame
,
*
label
;
gchar
*
resolve_once
=
NULL
,
*
account_expire
=
NULL
;
gchar
*
orig_key
=
NULL
;
if
(
a
)
{
resolve_once
=
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_RESOLVE_ONCE
);
account_expire
=
g_hash_table_lookup
(
a
->
properties
,
ACCOUNT_REGISTRATION_EXPIRE
);
gboolean
gotkey
=
FALSE
;
gotkey
=
g_hash_table_lookup_extended
(
a
->
properties
,
ACCOUNT_RESOLVE_ONCE
,
(
gpointer
)
&
orig_key
,
(
gpointer
)
&
resolve_once
);
if
(
gotkey
==
FALSE
)
{
ERROR
(
"could not retreive resolve_once from account properties"
);
}
gotkey
=
g_hash_table_lookup_extended
(
a
->
properties
,
ACCOUNT_REGISTRATION_EXPIRE
,
(
gpointer
)
&
orig_key
,
(
gpointer
)
&
account_expire
);
if
(
gotkey
==
FALSE
)
{
ERROR
(
"could not retreive %s from account properties"
,
ACCOUNT_REGISTRATION_EXPIRE
);
}
}
gnome_main_section_new_with_table
(
_
(
"Registration"
),
&
frame
,
&
table
,
2
,
3
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
...
...
@@ -852,7 +860,6 @@ static GtkWidget* create_registration_expire(account_t *a)
gtk_spin_button_set_value
(
GTK_SPIN_BUTTON
(
expireSpinBox
),
g_ascii_strtod
(
account_expire
,
NULL
));
gtk_table_attach_defaults
(
GTK_TABLE
(
table
),
expireSpinBox
,
1
,
2
,
0
,
1
);
entryResolveNameOnlyOnce
=
gtk_check_button_new_with_mnemonic
(
_
(
"_Comply with RFC 3263"
));
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
entryResolveNameOnlyOnce
),
g_strcasecmp
(
resolve_once
,
"false"
)
==
0
?
TRUE
:
FALSE
);
...
...
gnome/src/sflphone_const.h
View file @
9c45b69c
...
...
@@ -62,17 +62,17 @@
#define ACCOUNT_ALIAS "Account.alias"
#define ACCOUNT_ENABLED "Account.enable"
#define ACCOUNT_MAILBOX "Account.mailbox"
#define ACCOUNT_USERAGENT "useragent"
#define ACCOUNT_USERAGENT "
Account.
useragent"
#define ACCOUNT_RESOLVE_ONCE "Account.resolveOnce"
#define ACCOUNT_REGISTRATION_EXPIRE "Account.
e
xpire"
#define ACCOUNT_REGISTRATION_EXPIRE "Account.
registrationE
xpire"
#define ACCOUNT_SIP_STUN_SERVER "STUN.server"
#define ACCOUNT_SIP_STUN_ENABLED "STUN.enable"
#define ACCOUNT_DTMF_TYPE "Account.dtmfType"
#define ACCOUNT_HOSTNAME "hostname"
#define ACCOUNT_USERNAME "username"
#define ACCOUNT_ROUTE "routeset"
#define ACCOUNT_PASSWORD "password"
#define ACCOUNT_REALM "realm"
#define ACCOUNT_HOSTNAME "
Account.
hostname"
#define ACCOUNT_USERNAME "
Account.
username"
#define ACCOUNT_ROUTE "
Account.
routeset"
#define ACCOUNT_PASSWORD "
Account.
password"
#define ACCOUNT_REALM "
Account.
realm"
#define ACCOUNT_KEY_EXCHANGE "SRTP.keyExchange"
#define ACCOUNT_SRTP_ENABLED "SRTP.enable"
#define ACCOUNT_SRTP_RTP_FALLBACK "SRTP.rtpFallback"
...
...
@@ -109,7 +109,7 @@
#define PUBLISHED_PORT "Account.publishedPort"
#define PUBLISHED_ADDRESS "Account.publishedAddress"
#define REGISTRATION_STATUS "Status"
#define REGISTRATION_STATUS "
Registration.
Status"
#define REGISTRATION_STATE_CODE "Registration.code"
#define REGISTRATION_STATE_DESCRIPTION "Registration.description"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment