aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@inria.fr>1999-05-05 02:49:25 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-05 02:49:25 +0800
commit9a472934f5af84639c43907c169f5ba7eb324a70 (patch)
treebd100122e5033466477a4efb0ab688d3b199ee94 /camel/camel-service.c
parentb824af62e0e823df722b506e2617f1f4623289ec (diff)
downloadgsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar.gz
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar.bz2
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar.lz
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar.xz
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.tar.zst
gsoc2013-evolution-9a472934f5af84639c43907c169f5ba7eb324a70.zip
new method.
1999-05-04 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-service.c (camel_service_get_url): new method. * devel-docs/camel/camel-sections.txt: added function doc references * camel/camel-folder.c (__camel_folder_close): fixed indentation. (camel_folder_expunge): new method. (__camel_folder_close): used expunge flag svn path=/trunk/; revision=890
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r--camel/camel-service.c96
1 files changed, 92 insertions, 4 deletions
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 970957e4b1..e843826a81 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -33,6 +33,7 @@ static void __camel_service_connect_to_with_login_passwd(CamelService *service,
static void __camel_service_connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port);
static gboolean __camel_service_is_connected(CamelService *service);
static void __camel_service_set_connected(CamelService *service, gboolean state);
+static GString *__camel_service_get_url(CamelService *service);
static void
camel_service_class_init (CamelServiceClass *camel_service_class)
@@ -45,7 +46,7 @@ camel_service_class_init (CamelServiceClass *camel_service_class)
camel_service_class->connect_to_with_login_passwd_port = __camel_service_connect_to_with_login_passwd_port;
camel_service_class->is_connected = __camel_service_is_connected;
camel_service_class->set_connected = __camel_service_set_connected;
-
+ camel_service_class->get_url = __camel_service_get_url;
/* virtual method overload */
}
@@ -96,7 +97,7 @@ camel_service_get_type (void)
static void
__camel_service_connect(CamelService *service)
{
-
+ CSERV_CLASS(service)->set_connected(service, TRUE);
}
@@ -115,6 +116,8 @@ camel_service_connect(CamelService *service)
CSERV_CLASS(service)->connect(service);
}
+
+
/**
* __camel_service_connect_to: connect to the specified address
*
@@ -129,10 +132,28 @@ camel_service_connect(CamelService *service)
static void
__camel_service_connect_to_with_login_passwd(CamelService *service, GString *host, GString *login, GString *passwd)
{
- __camel_service_set_connected(service, TRUE);
+ CSERV_CLASS(service)->set_connected(service, TRUE);
+}
+
+/**
+ * camel_service_connect_to_with_login_passwd: connect a service
+ * @service: the service to connect
+ * @host: host to connect to
+ * @login: login to connect with
+ * @passwd: password to connect with
+ *
+ * Connect to a service, but do not use the session
+ * default parameters to retrieve server's address
+ *
+ **/
+void
+camel_service_connect_to_with_login_passwd(CamelService *service, GString *host, GString *login, GString *passwd)
+{
+ CSERV_CLASS(service)->connect_to_with_login_passwd (service, host, login, passwd);
}
+
/**
* __camel_service_connect_to:login:password : connect to the specified address
*
@@ -149,7 +170,26 @@ __camel_service_connect_to_with_login_passwd(CamelService *service, GString *hos
static void
__camel_service_connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port)
{
- __camel_service_set_connected(service, TRUE);
+ CSERV_CLASS(service)->set_connected(service, TRUE);
+}
+
+
+/**
+ * camel_service_connect_to_with_login_passwd_port: connect a service
+ * @service: the service to connect
+ * @host: host to connect to
+ * @login: login to connect with
+ * @passwd: password to connect with
+ * @port: port to connect to
+ *
+ * Connect to a service, but do not use the session
+ * default parameters to retrieve server's address
+ *
+ **/
+void
+camel_service_connect_to_with_login_passwd_port(CamelService *service, GString *host, GString *login, GString *passwd, guint port)
+{
+ CSERV_CLASS(service)->connect_to_with_login_passwd_port (service, host, login, passwd, port);
}
@@ -170,6 +210,22 @@ __camel_service_is_connected(CamelService *service)
/**
+ * camel_service_is_connected: test if a service object is connected
+ *
+ * @service: the service
+ *
+ *
+ *
+ * Return value: TRUE is the service is connected
+ **/
+gboolean
+camel_service_is_connected(CamelService *service)
+{
+ return CSERV_CLASS(service)->is_connected(service);
+}
+
+
+/**
* __camel_service_set_connected: set the connected state
*
* This routine has to be called by providers to set the
@@ -187,3 +243,35 @@ __camel_service_set_connected(CamelService *service, gboolean state)
}
+
+/**
+ * __camel_service_get_url: get url representing a service
+ * @service: the service
+ *
+ * This method merely returns the "url" field. Subclasses
+ * may provide more active implementations.
+ *
+ * Return value:
+ **/
+static GString *
+__camel_service_get_url(CamelService *service)
+{
+ return service->url;
+}
+
+/**
+ * camel_service_get_url: get the url representing a service
+ * @service: the service
+ *
+ * returns the URL representing a service. For security reasons
+ * This routine may not always return the password.
+ *
+ * Return value: the url name
+ **/
+GString *
+camel_service_get_url(CamelService *service)
+{
+ return CSERV_CLASS(service)->get_url(service);
+}
+
+