aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-02-18 06:16:00 +0800
committerDan Winship <danw@src.gnome.org>2000-02-18 06:16:00 +0800
commit0996e4f1ac82ee9fe15be3367d90e0dffd21d936 (patch)
treec5f25e98f6a77a743b2313002efdc106d569bdfb /camel/camel-service.h
parent53fec3133a553d6a20e446f3dcace2643ab10742 (diff)
downloadgsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar.gz
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar.bz2
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar.lz
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar.xz
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.tar.zst
gsoc2013-evolution-0996e4f1ac82ee9fe15be3367d90e0dffd21d936.zip
Make camel-service use a Gurl internally. Remove the login/password
interfaces and instead provide camel_service_connect_with_url. Also, added CamelExceptions and return values, so the functions can indicate failure to the caller if they can't connect. svn path=/trunk/; revision=1834
Diffstat (limited to 'camel/camel-service.h')
-rw-r--r--camel/camel-service.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/camel/camel-service.h b/camel/camel-service.h
index ae960e22b8..45d15dfec1 100644
--- a/camel/camel-service.h
+++ b/camel/camel-service.h
@@ -35,6 +35,8 @@ extern "C" {
#endif /* __cplusplus }*/
#include <gtk/gtk.h>
+#include "url-util.h"
+#include "camel-exception.h"
#define CAMEL_SERVICE_TYPE (camel_service_get_type ())
#define CAMEL_SERVICE(obj) (GTK_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
@@ -47,7 +49,7 @@ typedef struct {
GtkObject parent_object;
gboolean connected;
- gchar *url; /* This may be a full object ? */
+ Gurl *url;
} CamelService;
@@ -56,24 +58,25 @@ typedef struct {
typedef struct {
GtkObjectClass parent_class;
- void (*connect) (CamelService *service);
- void (*connect_to_with_login_passwd) (CamelService *service, gchar *host, gchar *login, gchar *passwd);
- void (*connect_to_with_login_passwd_port) (CamelService *service, gchar *host, gchar *login, gchar *passwd, guint port);
+ gboolean (*connect) (CamelService *service, CamelException *ex);
+ gboolean (*connect_with_url) (CamelService *service, Gurl *url,
+ CamelException *ex);
+ gboolean (*disconnect) (CamelService *service, CamelException *ex);
+
gboolean (*is_connected) (CamelService *service);
- void (*set_connected) (CamelService *service, gboolean state);
- const gchar * (*get_url) (CamelService *service);
-
+
} CamelServiceClass;
/* public methods */
-void camel_service_connect (CamelService *service);
+gboolean camel_service_connect (CamelService *service, CamelException *ex);
+gboolean camel_service_connect_with_url (CamelService *service, gchar *url,
+ CamelException *ex);
gboolean camel_service_is_connected (CamelService *service);
-void camel_service_connect_to_with_login_passwd (CamelService *service, gchar *host, gchar *login, gchar *passwd);
-void camel_service_connect_to_with_login_passwd_port (CamelService *service, gchar *host, gchar *login, gchar *passwd, guint port);
-const gchar *camel_service_get_url (CamelService *service);
+gchar *camel_service_get_url (CamelService *service);
+
/* Standard Gtk function */
GtkType camel_service_get_type (void);