From ba39d4fff529940d5e2a8a2a7e607d2bee644c08 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 5 Oct 2001 19:38:24 +0000 Subject: Turn off warnings. (get_name): Same. 2001-10-05 Jeffrey Stedfast * camel-service.c (camel_service_finalize): Turn off warnings. (get_name): Same. * camel-sasl.c (sasl_challenge): Turn off warnings. * camel-tcp-stream.c (tcp_connect): Turn off warnings. (tcp_getsockopt): Same. (tcp_setsockopt): Here too. (tcp_get_socket): And here. * camel-folder.c (folder_sync): Turn off warnings. (expunge): Same. (append_message): Here too. (get_message): And here. (search_by_expression): And again here. (folder_changed): Here too. * camel-store.c (get_folder): Set an exception and turn off debugging g_warnings. (create_folder): Same. (delete_folder): Here too. (rename_folder): And here. (get_trash): And here. (get_folder_info): Same. (free_folder_info): And again here. (camel_folder_info_build): Here too. (folder_subscribed): Same. (subscribe_folder): Here too. (unsubscribe_folder): And here. svn path=/trunk/; revision=13458 --- camel/camel-store.c | 62 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 26 deletions(-) (limited to 'camel/camel-store.c') diff --git a/camel/camel-store.c b/camel/camel-store.c index 792dd6c6f9..779c900edd 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -37,6 +37,9 @@ #include "camel-exception.h" #include "camel-private.h" +#define d(x) +#define w(x) + static CamelServiceClass *parent_class = NULL; /* Returns the class for a CamelStore */ @@ -135,9 +138,9 @@ camel_store_finalize (CamelObject *object) if (store->folders) { if (g_hash_table_size (store->folders) != 0) { - g_warning ("Folder cache for store %p contains " - "%d folders at destruction.", store, - g_hash_table_size (store->folders)); + d(g_warning ("Folder cache for store %p contains " + "%d folders at destruction.", store, + g_hash_table_size (store->folders))); } g_hash_table_destroy (store->folders); } @@ -209,8 +212,12 @@ construct (CamelService *service, CamelSession *session, static CamelFolder * get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex) { - g_warning ("CamelStore::get_folder not implemented for `%s'", - camel_type_to_name(CAMEL_OBJECT_GET_TYPE(store))); + w(g_warning ("CamelStore::get_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); + + camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_INVALID, + _("Cannot get folder: Invalid operation on this store")); + return NULL; } @@ -266,11 +273,12 @@ static CamelFolderInfo * create_folder (CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex) { - g_warning ("CamelStore::create_folder not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); - - camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_INVALID, - _("Cannot create folder: Invalid operation on this store")); + w(g_warning ("CamelStore::create_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); + + camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_INVALID, + _("Cannot create folder: Invalid operation on this store")); + return NULL; } @@ -304,8 +312,8 @@ camel_store_create_folder (CamelStore *store, const char *parent_name, static void delete_folder (CamelStore *store, const char *folder_name, CamelException *ex) { - g_warning ("CamelStore::delete_folder not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::delete_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); } /** @@ -361,8 +369,8 @@ static void rename_folder (CamelStore *store, const char *old_name, const char *new_name, CamelException *ex) { - g_warning ("CamelStore::rename_folder not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::rename_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); } /** @@ -491,7 +499,7 @@ get_trash (CamelStore *store, CamelException *ex) /*camel_object_ref (CAMEL_OBJECT (store->vtrash));*/ return store->vtrash; } else { - g_warning ("This store does not support vTrash."); + w(g_warning ("This store does not support vTrash.")); return NULL; } } @@ -580,8 +588,9 @@ static CamelFolderInfo * get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex) { - g_warning ("CamelStore::get_folder_info not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::get_folder_info not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); + return NULL; } @@ -629,8 +638,8 @@ camel_store_get_folder_info (CamelStore *store, const char *top, static void free_folder_info (CamelStore *store, CamelFolderInfo *fi) { - g_warning ("CamelStore::free_folder_info not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::free_folder_info not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); } /** @@ -802,7 +811,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, if (sep) *sep = '\0'; else - g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url); + d(g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url)); /* FIXME: wtf is this? This is WRONG. Parent folders can be selectable */ camel_url_set_param (url, "noselect", "yes"); @@ -843,8 +852,9 @@ camel_store_supports_subscriptions (CamelStore *store) static gboolean folder_subscribed (CamelStore *store, const char *folder_name) { - g_warning ("CamelStore::folder_subscribed not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::folder_subscribed not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); + return FALSE; } @@ -875,8 +885,8 @@ camel_store_folder_subscribed (CamelStore *store, static void subscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex) { - g_warning ("CamelStore::subscribe_folder not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::subscribe_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); } /** @@ -902,8 +912,8 @@ camel_store_subscribe_folder (CamelStore *store, static void unsubscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex) { - g_warning ("CamelStore::unsubscribe_folder not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))); + w(g_warning ("CamelStore::unsubscribe_folder not implemented for `%s'", + camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)))); } -- cgit