[evolution-kolab/ek-wip-porting] libekolabutil: code cleanup and reorganization



commit 7968cb4342683eac184f4cee27f3f894a53b28b9
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri Feb 17 12:30:29 2012 +0100

    libekolabutil: code cleanup and reorganization
    
    * renamed KolabHttpJob to KolabUtilHttpJob and moved
      it to kolab-util-http.[hc], fixed files using it
    * emptied kolab-http-job.[hc] so it can be removed
    * renamed KOLAB_URI_PREFIX to KOLAB_CAMEL_URI_PREFIX
      and moved it to kolab-util-camel.h
    * emptied kolab-util-types.h so it can be removed

 src/calendar/e-cal-backend-kolab.c                 |    4 +-
 src/calendar/kolab-util-calendar.c                 |   27 +++++------
 src/calendar/kolab-util-calendar.h                 |    4 +-
 src/eplugin/kolab-account-setup.c                  |    5 +-
 src/libekolabutil/kolab-http-job.c                 |   27 ----------
 src/libekolabutil/kolab-http-job.h                 |   23 ---------
 src/libekolabutil/kolab-util-cal-freebusy.c        |    4 +-
 src/libekolabutil/kolab-util-cal-freebusy.h        |    7 ++-
 src/libekolabutil/kolab-util-camel.h               |    1 +
 src/libekolabutil/kolab-util-http.c                |   51 ++++++++++++++++----
 src/libekolabutil/kolab-util-http.h                |   30 ++++++++++--
 src/libekolabutil/kolab-util-types.h               |    1 -
 .../libekolab/test-kolab-util-cal-freebusy.c       |    9 ++--
 .../integration/libekolab/test-kolab-util-http.c   |    7 +--
 14 files changed, 97 insertions(+), 103 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 96d7067..052c2ae 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -34,12 +34,10 @@
 
 #include <libical/ical.h>
 
-#include <libekolab/kolab-types.h>
 #include <libekolab/kolab-mail-access.h>
 #include <libekolab/kolab-settings-handler.h>
 #include <libekolab/kolab-mail-handle.h>
 #include <libekolabutil/kolab-util-http.h>
-#include <libekolabutil/kolab-http-job.h>
 #include <libekolabutil/kolab-util-glib.h>
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-cal-freebusy.h>
@@ -565,7 +563,7 @@ e_cal_backend_kolab_get_free_busy (ECalBackendSync *backend,
 				error = NULL;
 				internal_state = FALSE;
 			}
-			kolab_http_job_free (job);
+			kolab_util_http_job_free (job);
 		}
 		if (ecalcomp == NULL) {
 			/* this is not an error, but there's no F/B
diff --git a/src/calendar/kolab-util-calendar.c b/src/calendar/kolab-util-calendar.c
index cb90054..fb92946 100644
--- a/src/calendar/kolab-util-calendar.c
+++ b/src/calendar/kolab-util-calendar.c
@@ -28,9 +28,6 @@
 #include <libecal/e-cal.h>
 
 #include <libekolabutil/camel-system-headers.h>
-#include <libekolabutil/kolab-util-http.h>
-#include <libekolabutil/kolab-http-job.h>
-#include <libekolabutil/kolab-util-types.h>
 #include <libekolab/kolab-settings-handler.h>
 #include <libekolab/kolab-mail-access.h>
 
@@ -39,7 +36,7 @@
 /*----------------------------------------------------------------------------*/
 /* internal statics */
 
-static KolabHttpJob*
+static KolabUtilHttpJob*
 kolab_util_calendar_create_http_request (KolabSettingsHandler *ksettings,
                                          const gchar *path,
                                          GError **error)
@@ -50,7 +47,7 @@ kolab_util_calendar_create_http_request (KolabSettingsHandler *ksettings,
 	const gchar *passwd = NULL;
 	guint tls_variant = KOLAB_TLS_VARIANT_DEFAULT;
 	GError *tmp_error = NULL;
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 
 	g_assert (KOLAB_IS_SETTINGS_HANDLER (ksettings));
 	g_assert (path != NULL);
@@ -110,18 +107,18 @@ kolab_util_calendar_create_http_request (KolabSettingsHandler *ksettings,
 	         __func__);
 	/* camel_url_set_passwd (uri, passwd); */
 
-	job = kolab_http_job_new ();
+	job = kolab_util_http_job_new ();
 	job->url = uri;
 
 	return job;
 } /* kolab_util_calendar_create_http_request () */
 
-static KolabHttpJob*
+static KolabUtilHttpJob*
 kolab_util_calendar_create_pfb_trigger (KolabSettingsHandler *ksettings,
                                         const gchar *sourcename,
                                         GError **error)
 {
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	gchar *path = NULL;
 	const gchar *username = NULL;
 	gint source_offset = 0;
@@ -155,12 +152,12 @@ kolab_util_calendar_create_pfb_trigger (KolabSettingsHandler *ksettings,
 	return job;
 } /* kolab_util_calendar_create_pfb_trigger () */
 
-static KolabHttpJob*
+static KolabUtilHttpJob*
 kolab_util_calendar_create_xfb_request (KolabSettingsHandler *ksettings,
                                         gchar *query,
                                         GError **error)
 {
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	gchar *path = NULL;
 	GError *tmp_error = NULL;
 
@@ -243,7 +240,7 @@ kolab_util_calendar_toggle_pfb_trigger (KolabSettingsHandler *ksettings,
 	/* Keep running on errors.
 	 * If an error occured, internal_state is set to false as indicator.
 	 */
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	GError *tmp_error = NULL;
 
 	g_assert (KOLAB_IS_SETTINGS_HANDLER (ksettings));
@@ -261,7 +258,7 @@ kolab_util_calendar_toggle_pfb_trigger (KolabSettingsHandler *ksettings,
 	}
 	job->buffer = g_byte_array_new ();
 	(void)kolab_util_http_get (job, &tmp_error);
-	kolab_http_job_free (job);
+	kolab_util_http_job_free (job);
 
 	if (tmp_error != NULL) {
 		g_propagate_error (error, tmp_error);
@@ -270,12 +267,12 @@ kolab_util_calendar_toggle_pfb_trigger (KolabSettingsHandler *ksettings,
 	return TRUE;
 } /* kolab_util_calendar_toggle_pfb_trigger () */
 
-KolabHttpJob*
+KolabUtilHttpJob*
 kolab_util_calendar_retrieve_xfb (KolabSettingsHandler *ksettings,
                                   gchar *query,
                                   GError **error)
 {
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	GError *tmp_error = NULL;
 
 	g_assert (KOLAB_IS_SETTINGS_HANDLER (ksettings));
@@ -296,7 +293,7 @@ kolab_util_calendar_retrieve_xfb (KolabSettingsHandler *ksettings,
 	(void)kolab_util_http_get (job, &tmp_error);
 	if (tmp_error != NULL) {
 		/* might happen, perhaps the server did not now about the user. */
-		kolab_http_job_free (job);
+		kolab_util_http_job_free (job);
 		g_propagate_error (error, tmp_error);
 		return NULL;
 	}
diff --git a/src/calendar/kolab-util-calendar.h b/src/calendar/kolab-util-calendar.h
index cc3e615..803610e 100644
--- a/src/calendar/kolab-util-calendar.h
+++ b/src/calendar/kolab-util-calendar.h
@@ -36,7 +36,7 @@
 #include <libecal/e-cal.h>
 #include <libedata-cal/e-cal-backend-sync.h>
 
-#include <libekolabutil/kolab-http-job.h>
+#include <libekolabutil/kolab-util-http.h>
 #include <libekolab/kolab-settings-handler.h>
 #include <libekolab/kolab-mail-access.h>
 
@@ -61,7 +61,7 @@ kolab_util_calendar_toggle_pfb_trigger (KolabSettingsHandler *ksettings,
                                         const gchar *sourcename,
                                         GError **error);
 
-KolabHttpJob*
+KolabUtilHttpJob*
 kolab_util_calendar_retrieve_xfb (KolabSettingsHandler *ksettings,
                                   gchar *query,
                                   GError **error);
diff --git a/src/eplugin/kolab-account-setup.c b/src/eplugin/kolab-account-setup.c
index 989d2e8..cbf3725 100644
--- a/src/eplugin/kolab-account-setup.c
+++ b/src/eplugin/kolab-account-setup.c
@@ -39,7 +39,6 @@
 #include <libekolabutil/camel-system-headers.h>
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-folder.h>
-#include <libekolabutil/kolab-util-types.h>
 
 #include "kolab-account-setup.h"
 
@@ -106,7 +105,7 @@ ensure_kolab_sourcetype_source_group (ECalSourceType type)
 
 	e_source_list_ensure_group (slist,
 	                            KOLAB_CAMEL_PROVIDER_NAME,
-	                            KOLAB_URI_PREFIX, FALSE);
+	                            KOLAB_CAMEL_URI_PREFIX, FALSE);
 	g_object_unref (slist);
 }
 
@@ -139,7 +138,7 @@ ensure_kolab_contacts_source_group (void)
 
 	e_source_list_ensure_group (source_list,
 	                            KOLAB_CAMEL_PROVIDER_NAME,
-	                            KOLAB_URI_PREFIX, FALSE);
+	                            KOLAB_CAMEL_URI_PREFIX, FALSE);
 	g_object_unref (source_list);
 }
 
diff --git a/src/libekolabutil/kolab-http-job.c b/src/libekolabutil/kolab-http-job.c
index 63d2164..72dab0f 100644
--- a/src/libekolabutil/kolab-http-job.c
+++ b/src/libekolabutil/kolab-http-job.c
@@ -29,32 +29,5 @@
 
 /*----------------------------------------------------------------------------*/
 
-KolabHttpJob*
-kolab_http_job_new (void)
-{
-	KolabHttpJob *job = g_new0 (KolabHttpJob, 1);
-	job->url = NULL;
-	job->buffer = NULL;
-	job->nbytes = 0;
-	job->pkcs11pin = NULL;
-
-	return job;
-}
-
-void
-kolab_http_job_free (KolabHttpJob *job)
-{
-	if (job == NULL)
-		return;
-
-	if (job->url != NULL)
-		camel_url_free (job->url);
-	if (job->buffer != NULL) {
-		g_byte_array_free (job->buffer, TRUE);
-	}
-	if (job->pkcs11pin != NULL)
-		g_free (job->pkcs11pin);
-	g_free (job);
-}
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolabutil/kolab-http-job.h b/src/libekolabutil/kolab-http-job.h
index d83f719..465a627 100644
--- a/src/libekolabutil/kolab-http-job.h
+++ b/src/libekolabutil/kolab-http-job.h
@@ -35,29 +35,6 @@
 
 /*----------------------------------------------------------------------------*/
 
-/**
- * KolabHttpJob:
- * @url: the CamelURL containing all server information
- *          (needs to be maintained manually)
- * @buffer: the byte buffer to hold the HTTP server response
- *          (needs to be maintained manually)
- * @nbytes: can be used to store a bytes count (aside from the buffer length)
- * @pkcs11pin: the pin needed to access client cert on pkcs #11 tokens
- *
- * This structure holds all information needed by the kolab_util_http_get()
- * function to send a query to a webserver.
- */
-typedef struct _KolabHttpJob {
-	CamelURL *url;
-	GByteArray *buffer;
-	gssize nbytes;
-	gchar *pkcs11pin;
-} KolabHttpJob;
-
-/*----------------------------------------------------------------------------*/
-
-KolabHttpJob* kolab_http_job_new (void);
-void kolab_http_job_free (KolabHttpJob *job);
 
 /*----------------------------------------------------------------------------*/
 
diff --git a/src/libekolabutil/kolab-util-cal-freebusy.c b/src/libekolabutil/kolab-util-cal-freebusy.c
index 922b671..534b84c 100644
--- a/src/libekolabutil/kolab-util-cal-freebusy.c
+++ b/src/libekolabutil/kolab-util-cal-freebusy.c
@@ -45,13 +45,13 @@
 #include <libical/icalvcal.h>
 #include <libecal/e-cal-util.h>
 
-#include "kolab-util-http.h"
+#include "camel-system-headers.h"
 #include "kolab-util-cal-freebusy.h"
 
 /*----------------------------------------------------------------------------*/
 
 ECalComponent*
-kolab_cal_util_fb_new_ecalcomp_from_request (KolabHttpJob *job,
+kolab_cal_util_fb_new_ecalcomp_from_request (KolabUtilHttpJob *job,
                                              Kolab_conv_freebusy_type listtype,
                                              GError **err)
 {
diff --git a/src/libekolabutil/kolab-util-cal-freebusy.h b/src/libekolabutil/kolab-util-cal-freebusy.h
index e30f00b..44a88ef 100644
--- a/src/libekolabutil/kolab-util-cal-freebusy.h
+++ b/src/libekolabutil/kolab-util-cal-freebusy.h
@@ -34,10 +34,11 @@
 
 #include <libecal/e-cal-component.h>
 
-#include "kolab-util-types.h"
-
 #include <libekolabconv/main/src/kolab-conv.h>
 
+#include "kolab-util-http.h"
+
+
 /*----------------------------------------------------------------------------*/
 
 /*
@@ -45,7 +46,7 @@
  * free/busy access
  */
 
-ECalComponent *kolab_cal_util_fb_new_ecalcomp_from_request (KolabHttpJob*, Kolab_conv_freebusy_type, GError**);
+ECalComponent *kolab_cal_util_fb_new_ecalcomp_from_request (KolabUtilHttpJob*, Kolab_conv_freebusy_type, GError**);
 void kolab_cal_util_fb_ecalcomp_free (ECalComponent*);
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolabutil/kolab-util-camel.h b/src/libekolabutil/kolab-util-camel.h
index e924503..1278d03 100644
--- a/src/libekolabutil/kolab-util-camel.h
+++ b/src/libekolabutil/kolab-util-camel.h
@@ -37,6 +37,7 @@
 
 #define KOLAB_CAMEL_PROVIDER_PROTOCOL   "kolab2"
 #define KOLAB_CAMEL_PROVIDER_NAME       "Kolab2"
+#define KOLAB_CAMEL_URI_PREFIX          "kolab2://"
 
 #define KOLAB_CAMELURL_DUMMY_URL "protocol://user host domain tld/"
 
diff --git a/src/libekolabutil/kolab-util-http.c b/src/libekolabutil/kolab-util-http.c
index 5c5aab1..6c92df6 100644
--- a/src/libekolabutil/kolab-util-http.c
+++ b/src/libekolabutil/kolab-util-http.c
@@ -94,11 +94,42 @@ typedef enum {
 
 /*----------------------------------------------------------------------------*/
 
-/*TODO get rid of these globals if possible */
+/* TODO get rid of these globals if possible */
 /* static SoupSession *kolab_soup_session = NULL; */
 static CURL *kolab_curl_handle = NULL;
 
 /*----------------------------------------------------------------------------*/
+/* KolabUtilHttpJob */
+
+KolabUtilHttpJob*
+kolab_util_http_job_new (void)
+{
+	KolabUtilHttpJob *job = g_new0 (KolabUtilHttpJob, 1);
+	job->url = NULL;
+	job->buffer = NULL;
+	job->nbytes = 0;
+	job->pkcs11pin = NULL;
+
+	return job;
+}
+
+void
+kolab_util_http_job_free (KolabUtilHttpJob *job)
+{
+	if (job == NULL)
+		return;
+
+	if (job->url != NULL)
+		camel_url_free (job->url);
+	if (job->buffer != NULL) {
+		g_byte_array_free (job->buffer, TRUE);
+	}
+	if (job->pkcs11pin != NULL)
+		g_free (job->pkcs11pin);
+	g_free (job);
+}
+
+/*----------------------------------------------------------------------------*/
 /* LibSoup */
 #if 0
 static void
@@ -108,7 +139,7 @@ kolab_util_http_soup_authenticate (SoupSession *session,
                                    gboolean retrying,
                                    gpointer data)
 {
-	KolabHttpJob *job;
+	KolabUtilHttpJob *job;
 
 	(void)session;
 	(void)msg;
@@ -117,7 +148,7 @@ kolab_util_http_soup_authenticate (SoupSession *session,
 	if (retrying)
 		return;
 
-	job = (KolabHttpJob*) data;
+	job = (KolabUtilHttpJob*) data;
 	g_assert( job != NULL);
 	soup_auth_authenticate (auth,
 	                        job->url->user,
@@ -125,7 +156,7 @@ kolab_util_http_soup_authenticate (SoupSession *session,
 }
 
 static gssize
-kolab_util_http_soup_get (const KolabHttpJob *job, GError **error)
+kolab_util_http_soup_get (const KolabUtilHttpJob *job, GError **error)
 {
 	g_error ("%s: not implemented.", __func__);
 	SoupMessage *msg = NULL;
@@ -141,7 +172,7 @@ kolab_util_http_soup_get (const KolabHttpJob *job, GError **error)
 	/* connect the "authenticate" signal handler,
 	 * disconnect a previously connected one.
 	 * TODO: check whether we need to disconnect-connect
-	 *       a handler here (KolabHttpJob* may point to
+	 *       a handler here (KolabUtilHttpJob* may point to
 	 *       an address different from the one we were
 	 *       called upon last time)
 	 */
@@ -262,7 +293,7 @@ kolab_util_http_curl_set_genopts (void)
 }
 
 static CURLcode
-kolab_util_http_curl_set_jobopts (const KolabHttpJob *job)
+kolab_util_http_curl_set_jobopts (const KolabUtilHttpJob *job)
 {
 	CURLcode curlcode;
 	gchar *usrpwd = NULL;
@@ -289,7 +320,7 @@ kolab_util_http_curl_set_jobopts (const KolabHttpJob *job)
 
 	/* set username/password for basic auth */
 	if (job->url->user != NULL) {
-		/* FIXME get password from CamelSettings (change KolabHttpJob) */
+		/* FIXME get password from CamelSettings (change KolabUtilHttpJob) */
 		g_warning ("%s: FIXME get password from CamelSettings", __func__);
 #if 0
 		if (job->url->passwd != NULL)
@@ -330,7 +361,7 @@ kolab_util_http_curl_set_jobopts (const KolabHttpJob *job)
 }
 
 static gssize
-kolab_util_http_curl_get (KolabHttpJob *job, GError **error)
+kolab_util_http_curl_get (KolabUtilHttpJob *job, GError **error)
 {
 	gssize nbytes = -1;
 	CURLcode curlcode;
@@ -456,14 +487,14 @@ kolab_util_http_shutdown (void)
  * kolab_util_http_get:
  * @job: the job description structure for issuing the HTTP request
  *
- * Issue a HTTP-GET request. The protocol part of the #KolabHttpJob.url
+ * Issue a HTTP-GET request. The protocol part of the #KolabUtilHttpJob.url
  * specifies whether or not SSL will be used for transport security.
  *
  * Returns: the number of bytes read from the server. If an error occured,
  * before data was read, -1 is returned.
  */
 gssize
-kolab_util_http_get (KolabHttpJob *job, GError **error)
+kolab_util_http_get (KolabUtilHttpJob *job, GError **error)
 {
 	gssize nbytes = -1;
 
diff --git a/src/libekolabutil/kolab-util-http.h b/src/libekolabutil/kolab-util-http.h
index e21a4fe..08809e3 100644
--- a/src/libekolabutil/kolab-util-http.h
+++ b/src/libekolabutil/kolab-util-http.h
@@ -12,12 +12,12 @@
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -32,7 +32,7 @@
 
 #include <glib.h>
 
-#include "kolab-http-job.h"
+#include "camel-system-headers.h"
 
 /*----------------------------------------------------------------------------*/
 
@@ -58,12 +58,32 @@ typedef enum {
  * and LibSoup will be suitable for our needs.
  */
 
-/*----------------------------------------------------------------------------*/
+/**
+ * KolabUtilHttpJob:
+ * @url: the CamelURL containing all server information
+ *          (needs to be maintained manually)
+ * @buffer: the byte buffer to hold the HTTP server response
+ *          (needs to be maintained manually)
+ * @nbytes: can be used to store a bytes count (aside from the buffer length)
+ * @pkcs11pin: the pin needed to access client cert on pkcs #11 tokens
+ *
+ * This structure holds all information needed by the kolab_util_http_get()
+ * function to send a query to a webserver.
+ */
+typedef struct _KolabUtilHttpJob {
+	CamelURL *url;
+	GByteArray *buffer;
+	gssize nbytes;
+	gchar *pkcs11pin;
+} KolabUtilHttpJob;
 
 void kolab_util_http_init (void);
 void kolab_util_http_shutdown (void);
 
-gssize kolab_util_http_get (KolabHttpJob *job, GError **error);
+KolabUtilHttpJob* kolab_util_http_job_new (void);
+void kolab_util_http_job_free (KolabUtilHttpJob *job);
+
+gssize kolab_util_http_get (KolabUtilHttpJob *job, GError **error);
 
 gchar* kolab_util_http_new_hostname_from_url (const gchar *url_string);
 gboolean kolab_util_http_protocol_is_ssl (const gchar *url_string);
diff --git a/src/libekolabutil/kolab-util-types.h b/src/libekolabutil/kolab-util-types.h
index ed5a3b8..8fa056e 100644
--- a/src/libekolabutil/kolab-util-types.h
+++ b/src/libekolabutil/kolab-util-types.h
@@ -30,7 +30,6 @@
 
 /*----------------------------------------------------------------------------*/
 
-#define KOLAB_URI_PREFIX "kolab2://"
 
 /*----------------------------------------------------------------------------*/
 
diff --git a/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c b/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
index 524993e..e780461 100644
--- a/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
+++ b/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
@@ -44,7 +44,6 @@
 #include <libekolabutil/kolab-util-http.h>
 #include <libekolabutil/kolab-util-cal-freebusy.h>
 #include <libekolabutil/kolab-util-glib.h>
-#include <libekolabutil/kolab-http-job.h>
 
 /*----------------------------------------------------------------------------*/
 
@@ -113,7 +112,7 @@ kolab_itest_fb_uninit (KolabITestFB *kitfb)
 static gboolean
 test_kolab_util_cal_freebusy (void)
 {
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	ECalComponent *ecalcomp = NULL;
 	gsize nbytes = 0;
 	gssize obytes = 0;
@@ -182,8 +181,8 @@ test_kolab_util_cal_freebusy (void)
 	g_return_val_if_fail (password != NULL, FALSE);
 	g_return_val_if_fail (pkcs11pin != NULL, FALSE);
 
-	/* create KolabHttpJob */
-	job = kolab_http_job_new ();
+	/* create KolabUtilHttpJob */
+	job = kolab_util_http_job_new ();
 	job->pkcs11pin = pkcs11pin;
 
 	/* create CamelURL object */
@@ -252,7 +251,7 @@ test_kolab_util_cal_freebusy (void)
 	for (ii = 0; ii < KOLABCONV_FB_LASTTYPE; ii++)
 		kolab_itest_fb_uninit (&(kitfb[ii]));
 
-	kolab_http_job_free (job);
+	kolab_util_http_job_free (job);
 	g_key_file_free (key_file);
 	g_free (config);
 
diff --git a/src/tests/integration/libekolab/test-kolab-util-http.c b/src/tests/integration/libekolab/test-kolab-util-http.c
index 0c589aa..db854e9 100644
--- a/src/tests/integration/libekolab/test-kolab-util-http.c
+++ b/src/tests/integration/libekolab/test-kolab-util-http.c
@@ -41,7 +41,6 @@
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-http.h>
 #include <libekolabutil/kolab-util-glib.h>
-#include <libekolabutil/kolab-http-job.h>
 
 /*----------------------------------------------------------------------------*/
 
@@ -54,7 +53,7 @@
 static gboolean
 test_kolab_util_http (void)
 {
-	KolabHttpJob *job = NULL;
+	KolabUtilHttpJob *job = NULL;
 	gssize nbytes = 0;
 	gchar *config = NULL;
 	gchar *url_string = NULL;
@@ -108,7 +107,7 @@ test_kolab_util_http (void)
 	g_return_val_if_fail (pkcs11pin != NULL, FALSE);
 
 	/* create KolabHttpJob */
-	job = kolab_http_job_new ();
+	job = kolab_util_http_job_new ();
 	job->pkcs11pin = pkcs11pin;
 
 	/* create CamelURL object */
@@ -164,7 +163,7 @@ test_kolab_util_http (void)
 	 */
 
 	/* cleanup */
-	kolab_http_job_free (job);
+	kolab_util_http_job_free (job);
 	camel_kolab_stream_free (file_stream);
 	g_key_file_free (key_file);
 	g_free (cmpfilename);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]