typedef struct _ModestPresets ModestPresets;
typedef enum _ModestPresetsServerType {
- MODEST_PRESETS_SERVER_TYPE_NONE,
+ MODEST_PRESETS_SERVER_TYPE_NONE,
MODEST_PRESETS_SERVER_TYPE_IMAP,
MODEST_PRESETS_SERVER_TYPE_POP,
MODEST_PRESETS_SERVER_TYPE_SMTP
/** These are flags, which should be ORed.
*/
typedef enum _ModestPresetsSecurity {
- MODEST_PRESETS_SECURITY_NONE = 0,
- MODEST_PRESETS_SECURITY_APOP = 1 << 0,
- MODEST_PRESETS_SECURITY_SECURE_SMTP = 1 << 1,
- MODEST_PRESETS_SECURITY_SECURE_INCOMING = 1 << 2
+ MODEST_PRESETS_SECURITY_NONE = 0,
+ MODEST_PRESETS_SECURITY_APOP = 1 << 0,
+ MODEST_PRESETS_SECURITY_SECURE_SMTP = 1 << 1, /* if set, port will be 465
+ * instead of 25 */
+ MODEST_PRESETS_SECURITY_SECURE_INCOMING = 1 << 2,
+ MODEST_PRESETS_SECURITY_SECURE_INCOMING_ALTERNATE_PORT = 1 << 3, /* POP3S=>995, IMAPS=>993 */
} ModestPresetsSecurity;
/* typedef enum _ModestPresetsInfo ModestPresetsInfo; */
*/
gchar * modest_presets_get_domain (ModestPresets *self,
const gchar *provider_id);
-
+
/**
* modest_presets_get_info_server_type:
* @self: a valid ModestPresets instance
const gchar *provider_id,
gboolean incoming_server);
+
+/**
+ * modest_presets_get_port:
+ * @self: a valid ModestPresets instance
+ * @provider_id: ID of the provider
+ * @incoming_server: get port# for the incoming mailserver if TRUE, for the outgoing server otherwise
+ *
+ * Returns: the specific port number for some provider
+ * function return 0 if the normal port number is valid
+ *
+ */
+guint modest_presets_get_port (ModestPresets *self, const gchar* provider_id,
+ gboolean incoming_server);
+
+
/**
* modest_presets_destroy:
* @self: a valid ModestPresets instance (ie. must not be NULL)