#define MODEST_PRESETS_KEY_MAILBOX_TYPE "MailboxType"
#define MODEST_PRESETS_KEY_APOP "APOPSecureLogin"
#define MODEST_PRESETS_KEY_SECURE_SMTP "SecureSmtp"
+#define MODEST_PRESETS_KEY_SMTP_PORT "SmtpPort"
ModestPresets*
g_free (presets);
return NULL;
}
-
- /* TODO: Unobfuscate an obfuscated file and then load it with g_key_file_load_from_data() instead. */
if (!g_key_file_load_from_file (presets->keyfile, presetfile,
G_KEY_FILE_NONE, &err)) {
MODEST_PRESETS_KEY_OUTGOING, NULL);
if (val) {
g_free (val);
- info |= MODEST_PRESETS_SECURITY_SECURE_SMTP;
val = g_key_file_get_string (self->keyfile, provider_id,
MODEST_PRESETS_KEY_SECURE_SMTP, NULL);
}
}
- /* debug */
-/* g_message ("provider id: %s, apop:%s, secure-incoming:%s, altport: %s, secure-smtp: %s", */
-/* provider_id, */
-/* info & MODEST_PRESETS_SECURITY_APOP ? "yes" : "no", */
-/* info & MODEST_PRESETS_SECURITY_SECURE_INCOMING ? "yes" : "no", */
-/* info & MODEST_PRESETS_SECURITY_SECURE_INCOMING_ALTERNATE_PORT ? "yes" : "no", */
-/* info & MODEST_PRESETS_SECURITY_SECURE_SMTP ? "yes" : "no"); */
-
return info;
}
-
+
+/*
+ * at the moment, this only for mac.com, which have a special SMTP port
+ */
+guint
+modest_presets_get_port (ModestPresets *self, const gchar* provider_id,
+ gboolean incoming_server)
+{
+ guint port;
+
+ g_return_val_if_fail (self && self->keyfile, 0);
+
+ if (incoming_server)
+ port = 0; /* not used yet */
+ else
+ port = (guint)g_key_file_get_integer (self->keyfile, provider_id,
+ MODEST_PRESETS_KEY_SMTP_PORT, NULL);
+
+ return port;
+}
+
+
+
void