}
-static ModestProtocol
+static ModestAuthProtocol
get_secure_auth_for_conf_string(const gchar* value)
{
- ModestProtocol result = MODEST_PROTOCOL_AUTH_NONE;
+ ModestAuthProtocol result = MODEST_PROTOCOL_AUTH_NONE;
if (value) {
if (strcmp(value, MODEST_ACCOUNT_AUTH_MECH_VALUE_NONE) == 0)
result = MODEST_PROTOCOL_AUTH_NONE;
return result;
}
-ModestProtocol
+ModestAuthProtocol
modest_server_account_get_secure_auth (ModestAccountMgr *self,
const gchar* account_name)
{
- ModestProtocol result = MODEST_PROTOCOL_AUTH_NONE;
+ ModestAuthProtocol result = MODEST_PROTOCOL_AUTH_NONE;
gchar* value = modest_account_mgr_get_string (self, account_name, MODEST_ACCOUNT_AUTH_MECH,
TRUE /* server account */);
if (value) {
void
modest_server_account_set_secure_auth (ModestAccountMgr *self,
- const gchar* account_name, ModestProtocol secure_auth)
+ const gchar* account_name, ModestAuthProtocol secure_auth)
{
/* Get the conf string for the enum value: */
const gchar* str_value = NULL;
modest_account_mgr_set_string (self, account_name, MODEST_ACCOUNT_AUTH_MECH, str_value, TRUE);
}
-static ModestProtocol
+static ModestConnectionProtocol
get_security_for_conf_string(const gchar* value)
{
- ModestProtocol result = MODEST_PROTOCOL_SECURITY_NONE;
+ ModestConnectionProtocol result = MODEST_PROTOCOL_CONNECTION_NORMAL;
if (value) {
if (strcmp(value, MODEST_ACCOUNT_SECURITY_VALUE_NONE) == 0)
- result = MODEST_PROTOCOL_SECURITY_NONE;
+ result = MODEST_PROTOCOL_CONNECTION_NORMAL;
else if (strcmp(value, MODEST_ACCOUNT_SECURITY_VALUE_NORMAL) == 0)
- result = MODEST_PROTOCOL_SECURITY_TLS;
+ result = MODEST_PROTOCOL_CONNECTION_TLS;
else if (strcmp(value, MODEST_ACCOUNT_SECURITY_VALUE_SSL) == 0)
- result = MODEST_PROTOCOL_SECURITY_SSL;
+ result = MODEST_PROTOCOL_CONNECTION_SSL;
}
return result;
}
-ModestProtocol
+ModestConnectionProtocol
modest_server_account_get_security (ModestAccountMgr *self,
const gchar* account_name)
{
- ModestProtocol result = MODEST_PROTOCOL_SECURITY_NONE;
+ ModestConnectionProtocol result = MODEST_PROTOCOL_CONNECTION_NORMAL;
gchar* value = modest_account_mgr_get_string (self, account_name, MODEST_ACCOUNT_SECURITY,
TRUE /* server account */);
if (value) {
void
modest_server_account_set_security (ModestAccountMgr *self,
- const gchar* account_name, ModestProtocol security)
+ const gchar* account_name, ModestConnectionProtocol security)
{
/* Get the conf string for the enum value: */
const gchar* str_value = NULL;
- if (security == MODEST_PROTOCOL_SECURITY_NONE)
+ if (security == MODEST_PROTOCOL_CONNECTION_NORMAL)
str_value = MODEST_ACCOUNT_SECURITY_VALUE_NONE;
- else if (security == MODEST_PROTOCOL_SECURITY_TLS)
+ else if (security == MODEST_PROTOCOL_CONNECTION_TLS)
str_value = MODEST_ACCOUNT_SECURITY_VALUE_NORMAL;
- else if (security == MODEST_PROTOCOL_SECURITY_SSL)
+ else if (security == MODEST_PROTOCOL_CONNECTION_SSL)
str_value = MODEST_ACCOUNT_SECURITY_VALUE_SSL;
/* Set it in the configuration: */
data->hostname = modest_account_mgr_get_string (self, name, MODEST_ACCOUNT_HOSTNAME,TRUE);
data->username = modest_account_mgr_get_string (self, name, MODEST_ACCOUNT_USERNAME,TRUE);
proto = modest_account_mgr_get_string (self, name, MODEST_ACCOUNT_PROTO, TRUE);
- data->proto = modest_protocol_info_get_protocol (proto);
+ data->proto = modest_protocol_info_get_transport_store_protocol (proto);
g_free (proto);
data->port = modest_account_mgr_get_int (self, name, MODEST_ACCOUNT_PORT, TRUE);