aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-09-20 01:27:09 +0800
committerDan Winship <danw@src.gnome.org>2000-09-20 01:27:09 +0800
commit7dcc0325454ed6c71c2532befbb6aadb32391766 (patch)
tree744535557a2ab1e23278778ac464dcab718e03c1 /camel/camel-folder.h
parent053af645da6e5f74474d13c19ce73d236d9b76a9 (diff)
downloadgsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.gz
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.bz2
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.lz
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.xz
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.zst
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.zip
Removed (camel_folder_init, camel_folder_construct): New object init
* camel-folder.c: (init): Removed (camel_folder_init, camel_folder_construct): New object init function and public object constructor to replace the old init method in a more Gtk-like fashion. (get_parent_folder, camel_folder_get_parent_folder): Removed. No CamelFolder subclass was ever setting the parent_folder member, no code has ever needed to look at it, and fixing it would actually be pretty hard. (get_subfolder_info, camel_folder_get_subfolder_info): Renamed from ..._names. Deals in CamelFolderInfo now. (free_subfolder_info, camel_folder_free_subfolder_info): Likewise. (get_subfolder, camel_folder_get_subfolder): Removed. CamelFolderInfo contains the subfolder's full name, so this is unnecessary now, and removing it lets us get rid of the CamelFolder separator member, which is needed for the default implementation of this function, but not otherwise needed for most providers. Also, lots of code style fixes. * providers/*: Update CamelFolder subclasses for changes, although none of them fill in the message counts in the CamelFolderInfo yet. svn path=/trunk/; revision=5503
Diffstat (limited to 'camel/camel-folder.h')
-rw-r--r--camel/camel-folder.h82
1 files changed, 24 insertions, 58 deletions
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index c78ed28b61..fe1ed75f0c 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -49,15 +49,11 @@ struct _CamelFolder
gboolean folder_changed;
GList *messages_changed;
- gchar *name;
- gchar *full_name;
- gchar *separator;
+ char *name;
+ char *full_name;
CamelStore *parent_store;
- CamelFolder *parent_folder;
- guint32 permanent_flags;
- gboolean path_begins_with_sep;
-
+ guint32 permanent_flags;
gboolean can_hold_folders:1;
gboolean can_hold_messages:1;
gboolean has_summary_capability:1;
@@ -67,47 +63,30 @@ struct _CamelFolder
typedef struct {
CamelObjectClass parent_class;
- /* signals */
- /* Not anymore! bwahahahah!
- * void (*folder_changed) (CamelFolder *, int type);
- * void (*message_changed) (CamelFolder *,
- * const char *uid);
- */
-
/* Virtual methods */
- void (*init) (CamelFolder *folder, CamelStore *parent_store,
- CamelFolder *parent_folder, const gchar *name,
- gchar *separator, gboolean path_begins_with_sep,
- CamelException *ex);
-
void (*refresh_info) (CamelFolder *folder, CamelException *ex);
void (*sync) (CamelFolder *folder, gboolean expunge,
CamelException *ex);
- const gchar * (*get_name) (CamelFolder *folder);
+ const char * (*get_name) (CamelFolder *folder);
+ const char * (*get_full_name) (CamelFolder *folder);
- const gchar * (*get_full_name) (CamelFolder *folder);
+ CamelStore * (*get_parent_store) (CamelFolder *folder);
gboolean (*can_hold_folders) (CamelFolder *folder);
-
gboolean (*can_hold_messages) (CamelFolder *folder);
- CamelFolder * (*get_subfolder) (CamelFolder *folder,
- const gchar *folder_name,
- gboolean create,
- CamelException *ex);
-
- CamelFolder * (*get_parent_folder) (CamelFolder *folder);
-
- CamelStore * (*get_parent_store) (CamelFolder *folder);
+ GPtrArray * (*get_subfolder_info)(CamelFolder *folder);
+ void (*free_subfolder_info) (CamelFolder *folder,
+ GPtrArray *subfolders);
void (*expunge) (CamelFolder *folder,
CamelException *ex);
- gint (*get_message_count) (CamelFolder *folder);
+ int (*get_message_count) (CamelFolder *folder);
- gint (*get_unread_message_count) (CamelFolder *folder);
+ int (*get_unread_message_count) (CamelFolder *folder);
void (*append_message) (CamelFolder *folder,
CamelMimeMessage *message,
@@ -138,13 +117,9 @@ typedef struct {
const char *value);
CamelMimeMessage * (*get_message) (CamelFolder *folder,
- const gchar *uid,
+ const char *uid,
CamelException *ex);
- void (*delete_message) (CamelFolder *folder,
- const gchar *uid,
- CamelException *ex);
-
GPtrArray * (*get_uids) (CamelFolder *folder);
void (*free_uids) (CamelFolder *folder,
GPtrArray *array);
@@ -153,10 +128,6 @@ typedef struct {
void (*free_summary) (CamelFolder *folder,
GPtrArray *summary);
- GPtrArray * (*get_subfolder_names) (CamelFolder *folder);
- void (*free_subfolder_names) (CamelFolder *folder,
- GPtrArray *subfolders);
-
gboolean (*has_search_capability) (CamelFolder *folder);
GPtrArray * (*search_by_expression) (CamelFolder *folder,
@@ -188,13 +159,14 @@ CamelType camel_folder_get_type (void);
/* public methods */
+void camel_folder_construct (CamelFolder *folder,
+ CamelStore *parent_store,
+ const char *full_name,
+ const char *name);
-
-
-CamelFolder * camel_folder_get_subfolder (CamelFolder *folder,
- const gchar *folder_name,
- gboolean create,
- CamelException *ex);
+GPtrArray * camel_folder_get_subfolder_info (CamelFolder *folder);
+void camel_folder_free_subfolder_info (CamelFolder *folder,
+ GPtrArray *array);
void camel_folder_refresh_info (CamelFolder * folder,
CamelException * ex);
@@ -202,7 +174,6 @@ void camel_folder_sync (CamelFolder *folder,
gboolean expunge,
CamelException *ex);
-CamelFolder * camel_folder_get_parent_folder (CamelFolder *folder);
CamelStore * camel_folder_get_parent_store (CamelFolder *folder);
@@ -212,8 +183,8 @@ void camel_folder_expunge (CamelFolder *folder,
/* folder name operations */
-const gchar * camel_folder_get_name (CamelFolder *folder);
-const gchar * camel_folder_get_full_name (CamelFolder *folder);
+const char * camel_folder_get_name (CamelFolder *folder);
+const char * camel_folder_get_full_name (CamelFolder *folder);
/* various properties accessors */
@@ -257,22 +228,17 @@ void camel_folder_append_message (CamelFolder *folder,
gboolean camel_folder_has_summary_capability (CamelFolder *folder);
-gint camel_folder_get_message_count (CamelFolder *folder);
+int camel_folder_get_message_count (CamelFolder *folder);
-gint camel_folder_get_unread_message_count (CamelFolder *folder);
+int camel_folder_get_unread_message_count (CamelFolder *folder);
GPtrArray * camel_folder_get_summary (CamelFolder *folder);
void camel_folder_free_summary (CamelFolder *folder,
GPtrArray *array);
-GPtrArray * camel_folder_get_subfolder_names (CamelFolder *folder);
-void camel_folder_free_subfolder_names (CamelFolder *folder,
- GPtrArray *array);
-
-
/* uid based access operations */
CamelMimeMessage * camel_folder_get_message (CamelFolder *folder,
- const gchar *uid,
+ const char *uid,
CamelException *ex);
#define camel_folder_delete_message(folder, uid) \
camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED)