[evolution-data-server] Pass uri as an argument.
- From: Chenthill Palanisamy <pchen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Pass uri as an argument.
- Date: Wed, 30 Sep 2009 10:17:32 +0000 (UTC)
commit a0a57d65aad133d8e17b4ad62556fc52f74dc32a
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Wed Sep 30 15:43:21 2009 +0530
Pass uri as an argument.
camel/providers/imapx/test-imapx.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/camel/providers/imapx/test-imapx.c b/camel/providers/imapx/test-imapx.c
index 735432c..6153b1e 100644
--- a/camel/providers/imapx/test-imapx.c
+++ b/camel/providers/imapx/test-imapx.c
@@ -3,8 +3,6 @@
#include "camel-imapx-folder.h"
#include <camel/camel-session.h>
-#define URL "imapx://pchenthill prv1-3 novell com/;check_lsub;basic_headers=1;imap_custom_headers;command=ssh%20-C%20-l%20%25u%20%25h%20exec%20/usr/sbin/imapd;use_ssl=always"
-
int
main (int argc, char *argv [])
{
@@ -13,6 +11,13 @@ main (int argc, char *argv [])
gchar *uri = NULL;
CamelService *service;
+
+ if (argc != 2) {
+ printf ("Pass the account url argument \n");
+ return -1;
+ }
+
+ uri = argv [1];
g_thread_init (NULL);
system ("rm -rf /tmp/test-camel-imapx");
camel_init ("/tmp/test-camel-imapx");
@@ -22,8 +27,8 @@ main (int argc, char *argv [])
session = CAMEL_SESSION (camel_object_new (CAMEL_SESSION_TYPE));
camel_session_construct (session, "/tmp/test-camel-imapx");
- service = camel_session_get_service (session, URL, CAMEL_PROVIDER_STORE, ex);
+ service = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, ex);
camel_service_connect (service, ex);
- exit (1);
+ return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]