* src/widgets/modest-header-view.c:
[modest] / src / maemo / easysetup / modest-presets.h
index 7e602e0..d71b67d 100644 (file)
@@ -39,7 +39,7 @@ struct _ModestPresets {
 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
@@ -48,10 +48,12 @@ typedef enum _ModestPresetsServerType {
 /** 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; */
@@ -114,7 +116,7 @@ gchar *                   modest_presets_get_server      (ModestPresets *self,
  */
 gchar *                   modest_presets_get_domain      (ModestPresets *self,
                                                          const gchar *provider_id);
-                                                         
+
 /**
  * modest_presets_get_info_server_type:
  * @self: a valid ModestPresets instance
@@ -127,8 +129,8 @@ gchar *                   modest_presets_get_domain      (ModestPresets *self,
  * Returns: a ModestPresetsServerType with the required information
  */
 ModestPresetsServerType          modest_presets_get_info_server_type (ModestPresets *self,
-                                                   const gchar *provider_id,
-                                                   gboolean incoming_server);
+                                                                     const gchar *provider_id,
+                                                                     gboolean incoming_server);
 
 /**
  * modest_presets_get_info_server_security:
@@ -142,8 +144,23 @@ ModestPresetsServerType          modest_presets_get_info_server_type (ModestPres
  * Returns: ModestPresetsSecurity ORable flags with the required information
  */                                        
 ModestPresetsSecurity          modest_presets_get_info_server_security (ModestPresets *self,
-                                                   const gchar *provider_id,
-                                                   gboolean incoming_server);
+                                                                       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: