diff options
author | Dan Winship <danw@src.gnome.org> | 2000-02-22 02:38:58 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-02-22 02:38:58 +0800 |
commit | d3d2adb98ce84c89f5e2c648329764d55d8ec412 (patch) | |
tree | df745b058ae76662cef56e168c7afae7a912b045 /camel/camel-service.h | |
parent | a81eaf4588c2ed0d126e8294e83c0e914e5fb91c (diff) | |
download | gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar.gz gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar.bz2 gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar.lz gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar.xz gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.tar.zst gsoc2013-evolution-d3d2adb98ce84c89f5e2c648329764d55d8ec412.zip |
add CamelExceptions to several functions. Use camel_session_new to
* camel-session.h:
* camel-session.c: add CamelExceptions to several functions. Use
camel_session_new to initialize the session and URL fields of
created CamelStores as appropriate.
* camel-store.h:
* camel-store.c
* camel-service.h:
* camel-service.c: Move the session and url (and associated
functions) from CamelStore to CamelService. Add url_flags to
CamelService so subclasses can specify which URL components
are mandatory for them. Add camel_session_new for
camel_session_get_store* to use.
* providers/mbox/camel-mbox-folder.c:
* providers/mbox/camel-mbox-store.c:
* providers/mbox/camel-mbox-store.h: Update for above changes.
svn path=/trunk/; revision=1888
Diffstat (limited to 'camel/camel-service.h')
-rw-r--r-- | camel/camel-service.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/camel/camel-service.h b/camel/camel-service.h index fbcbd78d4d..b6d7b70c94 100644 --- a/camel/camel-service.h +++ b/camel/camel-service.h @@ -48,8 +48,10 @@ extern "C" { struct _CamelService { GtkObject parent_object; + CamelSession *session; gboolean connected; Gurl *url; + int url_flags; }; @@ -69,13 +71,24 @@ typedef struct { +/* flags for url_flags. (others can be added if needed) */ +#define CAMEL_SERVICE_URL_NEED_USER (1 << 1) +#define CAMEL_SERVICE_URL_NEED_HOST (1 << 4) +#define CAMEL_SERVICE_URL_NEED_PATH (1 << 6) + + /* public methods */ +CamelService *camel_service_new (GtkType type, CamelSession *session, + Gurl *url, CamelException *ex); + gboolean camel_service_connect (CamelService *service, CamelException *ex); -gboolean camel_service_connect_with_url (CamelService *service, gchar *url, +gboolean camel_service_connect_with_url (CamelService *service, char *url, CamelException *ex); +gboolean camel_service_disconnect (CamelService *service, CamelException *ex); gboolean camel_service_is_connected (CamelService *service); -gchar *camel_service_get_url (CamelService *service); +char *camel_service_get_url (CamelService *service); +CamelSession *camel_service_get_session (CamelService *service); /* Standard Gtk function */ GtkType camel_service_get_type (void); |