* added functions for getting authentication, security protocols
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 27 Jul 2006 15:54:09 +0000 (15:54 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 27 Jul 2006 15:54:09 +0000 (15:54 +0000)
* some convenience functions so I can create combos more easily

pmo-trunk-r428

src/modest-proto.c
src/modest-proto.h

index 3796453..e92da4e 100644 (file)
@@ -46,6 +46,20 @@ static const gchar* store_protos[] = {
        NULL
 };
 
+
+static const gchar* security_protos[] = {
+       MODEST_SECURITY_PROTO_NONE,
+       MODEST_SECURITY_PROTO_SSL,
+       MODEST_SECURITY_PROTO_TLS,
+       NULL
+};
+
+static const gchar* auth_protos[] = {
+       MODEST_AUTH_PROTO_PASSWORD,
+       NULL
+};
+
+
 gboolean
 modest_proto_is_valid (const gchar *proto, gboolean store_proto)
 {
@@ -92,3 +106,16 @@ modest_proto_transport_protos (void)
 {
        return (const gchar**) transport_protos;
 }
+
+const gchar**
+modest_proto_security_protos (void)
+{
+       return (const gchar**) security_protos;
+}
+
+const gchar**
+modest_proto_auth_protos (void)
+{
+       return (const gchar**) auth_protos;
+}
+
index ce99bdb..8b3d91c 100644 (file)
 #define MODEST_PROTO_MAILDIR  "maildir"
 #define MODEST_PROTO_MBOX     "mbox"
 
+
+#define MODEST_SECURITY_PROTO_NONE "none"
+#define MODEST_SECURITY_PROTO_SSL  "ssl"
+#define MODEST_SECURITY_PROTO_TLS  "tls"
+
+
+#define MODEST_AUTH_PROTO_PASSWORD "password"
+
+
+
 enum {
        MODEST_PROTO_TYPE_ANY       = 0,        
        MODEST_PROTO_TYPE_TRANSPORT = 1,
@@ -74,7 +84,7 @@ gboolean         modest_proto_is_valid     (const gchar *proto, gboolean store_p
 ModestProtoType  modest_proto_type         (const gchar *proto);
 
 /**
- * modest_store_protos:
+ * modest_proto_store_protos:
  *
  * return a list of all available store protos
  *
@@ -84,7 +94,7 @@ const gchar**     modest_proto_store_protos       (void);
 
 
 /**
- * modest_transport_protos:
+ * modest_proto_transport_protos:
  *
  * return a list of all available store protos
  *
@@ -93,6 +103,27 @@ const gchar**     modest_proto_store_protos       (void);
 const gchar**     modest_proto_transport_protos   (void);
 
 
+/**
+ * modest_proto_security_protos:
+ *
+ * return a list of all available security (connection) protocols
+ *
+ * Returns: a newly allocated, NULL-terminated list of of store protocols
+ */
+const gchar**     modest_proto_security_protos   (void);
+
+
+/**
+ * modest_proto_auth_protos:
+ *
+ * return a list of all available authentication protocols
+ *
+ * Returns: a newly allocated, NULL-terminated list of of store protocols
+ */
+const gchar**     modest_proto_auth_protos   (void);
+
+
+
 
 #endif /*__MODEST_SERVER_PROTO_H__*/