![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct CamelStore; CamelFolderInfo; #define CAMEL_FOLDER_NOSELECT #define CAMEL_FOLDER_NOINFERIORS #define CAMEL_FOLDER_CHILDREN #define CAMEL_FOLDER_NOCHILDREN #define CAMEL_FOLDER_SUBSCRIBED #define CAMEL_FOLDER_VIRTUAL #define CAMEL_FOLDER_SYSTEM #define CAMEL_FOLDER_VTRASH #define CAMEL_FOLDER_SHARED_TO_ME #define CAMEL_FOLDER_SHARED_BY_ME #define CAMEL_FOLDER_TYPE_MASK #define CAMEL_FOLDER_TYPE_BIT #define CAMEL_FOLDER_TYPE_NORMAL #define CAMEL_FOLDER_TYPE_INBOX #define CAMEL_FOLDER_TYPE_OUTBOX #define CAMEL_FOLDER_TYPE_TRASH #define CAMEL_FOLDER_TYPE_JUNK #define CAMEL_FOLDER_TYPE_SENT #define CAMEL_STORE_READ #define CAMEL_STORE_WRITE CamelRenameInfo; #define CAMEL_STORE_SUBSCRIPTIONS #define CAMEL_STORE_VTRASH #define CAMEL_STORE_FILTER_INBOX #define CAMEL_STORE_VJUNK #define CAMEL_STORE_PROXY #define CAMEL_STORE_IS_MIGRATING #define CAMEL_STORE_FOLDER_CREATE #define CAMEL_STORE_FOLDER_EXCL #define CAMEL_STORE_FOLDER_BODY_INDEX #define CAMEL_STORE_FOLDER_PRIVATE #define CAMEL_STORE_FOLDER_CREATE_EXCL #define CAMEL_STORE_FOLDER_INFO_FAST #define CAMEL_STORE_FOLDER_INFO_RECURSIVE #define CAMEL_STORE_FOLDER_INFO_SUBSCRIBED #define CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL #define CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST CamelFolder * camel_store_get_folder (CamelStore *store
,const gchar *folder_name
,guint32 flags
,CamelException *ex
); CamelFolder * camel_store_get_inbox (CamelStore *store
,CamelException *ex
); CamelFolder * camel_store_get_trash (CamelStore *store
,CamelException *ex
); CamelFolder * camel_store_get_junk (CamelStore *store
,CamelException *ex
); CamelFolderInfo * camel_store_create_folder (CamelStore *store
,const gchar *parent_name
,const gchar *folder_name
,CamelException *ex
); void camel_store_delete_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
); void camel_store_rename_folder (CamelStore *store
,const gchar *old_namein
,const gchar *new_name
,CamelException *ex
); void camel_store_sync (CamelStore *store
,gint expunge
,CamelException *ex
); CamelFolderInfo * camel_store_get_folder_info (CamelStore *store
,const gchar *top
,guint32 flags
,CamelException *ex
); void camel_store_free_folder_info (CamelStore *store
,CamelFolderInfo *fi
); void camel_store_free_folder_info_full (CamelStore *store
,CamelFolderInfo *fi
); void camel_store_free_folder_info_nop (CamelStore *store
,CamelFolderInfo *fi
); CamelFolderInfo * camel_folder_info_new (void
); void camel_folder_info_free (CamelFolderInfo *fi
); CamelFolderInfo * camel_folder_info_build (GPtrArray *folders
,const gchar *namespace
,gchar separator
,gboolean short_names
); CamelFolderInfo * camel_folder_info_clone (CamelFolderInfo *fi
); gboolean camel_store_supports_subscriptions (CamelStore *store
); gboolean camel_store_folder_subscribed (CamelStore *store
,const gchar *folder_name
); void camel_store_subscribe_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
); void camel_store_unsubscribe_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
); void camel_store_noop (CamelStore *store
,CamelException *ex
); gint camel_store_folder_uri_equal (CamelStore *store
,const gchar *uri0
,const gchar *uri1
); gboolean camel_store_can_refresh_folder (CamelStore *store
,CamelFolderInfo *info
,CamelException *ex
); CamelISubscribe; gboolean camel_isubscribe_subscribed (CamelStore *store
,const gchar *name
); void camel_isubscribe_subscribe (CamelStore *store
,const gchar *folder_name
,CamelException *ex
); void camel_isubscribe_unsubscribe (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
struct CamelStore { CamelService parent_object; struct _CamelStorePrivate *priv; CamelObjectBag *folders; struct _CamelDB *cdb_r; struct _CamelDB *cdb_w; guint32 flags; guint32 mode; /* Future ABI expansion */ gpointer later[4]; };
typedef struct { struct _CamelFolderInfo *next; struct _CamelFolderInfo *parent; struct _CamelFolderInfo *child; gchar *uri; gchar *name; gchar *full_name; guint32 flags; gint32 unread; gint32 total; } CamelFolderInfo;
#define CAMEL_STORE_FOLDER_PRIVATE (1<<3) /* a private folder, that shouldn't show up in unmatched/folder info's, etc */
#define CAMEL_STORE_FOLDER_CREATE_EXCL (CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_EXCL)
#define CAMEL_STORE_FOLDER_INFO_FAST (1 << 0)
CAMEL_STORE_FOLDER_INFO_FAST
is deprecated and should not be used in newly-written code.
#define CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL (1 << 3) /* don't include vTrash/vJunk folders */
#define CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST (1 << 4)
Fetch only the subscription list. Clients should use this flag for requesting the list of folders available for subscription. Used in Exchange / IMAP connectors for public folder fetching.
Since 2.28
CamelFolder * camel_store_get_folder (CamelStore *store
,const gchar *folder_name
,guint32 flags
,CamelException *ex
);
Get a specific folder object from the store by name.
|
a CamelStore object |
|
name of the folder to get |
|
folder flags (create, save body index, etc) |
|
a CamelException |
Returns : |
the folder corresponding to the path folder_name or NULL .
|
CamelFolder * camel_store_get_inbox (CamelStore *store
,CamelException *ex
);
|
a CamelStore object |
|
a CamelException |
Returns : |
the folder in the store into which new mail is delivered,
or NULL if no such folder exists.
|
CamelFolder * camel_store_get_trash (CamelStore *store
,CamelException *ex
);
|
a CamelStore object |
|
a CamelException |
Returns : |
the folder in the store into which trash is delivered, or
NULL if no such folder exists.
|
CamelFolder * camel_store_get_junk (CamelStore *store
,CamelException *ex
);
|
a CamelStore object |
|
a CamelException |
Returns : |
the folder in the store into which junk is delivered, or
NULL if no such folder exists.
|
CamelFolderInfo * camel_store_create_folder (CamelStore *store
,const gchar *parent_name
,const gchar *folder_name
,CamelException *ex
);
Creates a new folder as a child of an existing folder.
parent_name
can be NULL
to create a new top-level folder.
|
a CamelStore object |
|
name of the new folder's parent, or NULL
|
|
name of the folder to create |
|
a CamelException |
Returns : |
info about the created folder, which the caller must
free with camel_store_free_folder_info, or NULL .
|
void camel_store_delete_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
Deletes the named folder. The folder must be empty.
|
a CamelStore object |
|
name of the folder to delete |
|
a CamelException |
void camel_store_rename_folder (CamelStore *store
,const gchar *old_namein
,const gchar *new_name
,CamelException *ex
);
Rename a named folder to a new name.
|
a CamelStore object |
|
the current name of the folder |
|
the new name of the folder |
|
a CamelException |
void camel_store_sync (CamelStore *store
,gint expunge
,CamelException *ex
);
Syncs any changes that have been made to the store object and its folders with the real store.
|
a CamelStore object |
|
TRUE if an expunge should be done after sync or FALSE otherwise
|
|
a CamelException |
CamelFolderInfo * camel_store_get_folder_info (CamelStore *store
,const gchar *top
,guint32 flags
,CamelException *ex
);
This fetches information about the folder structure of store
,
starting with top
, and returns a tree of CamelFolderInfo
structures. If flags
includes CAMEL_STORE_FOLDER_INFO_SUBSCRIBED,
only subscribed folders will be listed. If the store doesn't support
subscriptions, then it will list all folders. If flags
includes
CAMEL_STORE_FOLDER_INFO_RECURSIVE, the returned tree will include
all levels of hierarchy below top
. If not, it will only include
the immediate subfolders of top
. If flags
includes
CAMEL_STORE_FOLDER_INFO_FAST, the unread_message_count fields of
some or all of the structures may be set to -1
, if the store cannot
determine that information quickly. If flags
includes
CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, don't include special virtual
folders (such as vTrash or vJunk).
The CAMEL_STORE_FOLDER_INFO_FAST flag should be considered
deprecated; most backends will behave the same whether it is
supplied or not. The only guaranteed way to get updated folder
counts is to both open the folder and invoke refresh_info()
it.
|
a CamelStore object |
|
the name of the folder to start from |
|
various CAMEL_STORE_FOLDER_INFO_* flags to control behavior |
|
a CamelException |
Returns : |
a CamelFolderInfo tree, which must be freed with
camel_store_free_folder_info, or NULL .
|
void camel_store_free_folder_info (CamelStore *store
,CamelFolderInfo *fi
);
Frees the data returned by camel_store_get_folder_info. If fi
is NULL
,
nothing is done, the routine simply returns.
|
a CamelStore object |
|
a CamelFolderInfo as gotten via camel_store_get_folder_info |
void camel_store_free_folder_info_full (CamelStore *store
,CamelFolderInfo *fi
);
An implementation for "free_folder_info". Frees all of the data.
|
a CamelStore object |
|
a CamelFolderInfo as gotten via camel_store_get_folder_info |
void camel_store_free_folder_info_nop (CamelStore *store
,CamelFolderInfo *fi
);
An implementation for "free_folder_info". Does nothing.
|
a CamelStore object |
|
a CamelFolderInfo as gotten via camel_store_get_folder_info |
CamelFolderInfo * camel_folder_info_new (void
);
Returns : |
a new empty CamelFolderInfo instance |
Since 2.22
void camel_folder_info_free (CamelFolderInfo *fi
);
Frees fi
.
|
a CamelFolderInfo |
CamelFolderInfo * camel_folder_info_build (GPtrArray *folders
,const gchar *namespace
,gchar separator
,gboolean short_names
);
camel_folder_info_build
is deprecated and should not be used in newly-written code.
This takes an array of folders and attaches them together according
to the hierarchy described by their full_names and separator
. If
namespace
is non-NULL
, then it will be ignored as a full_name
prefix, for purposes of comparison. If necessary,
camel_folder_info_build will create additional CamelFolderInfo with
NULL
urls to fill in gaps in the tree. The value of short_names
is used in constructing the names of these intermediate folders.
NOTE: This is deprected, do not use this. FIXME: remove this/move it to imap, which is the only user of it now.
|
an array of CamelFolderInfo |
|
an ignorable prefix on the folder names |
|
the hieararchy separator character |
|
TRUE if the (short) name of a folder is the part after
the last separator in the full name. FALSE if it is the full name.
|
Returns : |
the top level of the tree of linked folder info. |
CamelFolderInfo * camel_folder_info_clone (CamelFolderInfo *fi
);
Clones fi
recursively.
|
a CamelFolderInfo |
Returns : |
the cloned CamelFolderInfo tree. |
gboolean camel_store_supports_subscriptions (CamelStore *store
);
Get whether or not store
supports subscriptions to folders.
|
a CamelStore object |
Returns : |
TRUE if folder subscriptions are supported or FALSE otherwise
|
gboolean camel_store_folder_subscribed (CamelStore *store
,const gchar *folder_name
);
Find out if a folder has been subscribed to.
|
a CamelStore object |
|
full path of the folder |
Returns : |
TRUE if the folder has been subscribed to or FALSE otherwise
|
void camel_store_subscribe_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
Subscribe to the folder described by folder_name
.
|
a CamelStore object |
|
full path of the folder |
|
a CamelException |
void camel_store_unsubscribe_folder (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
Unsubscribe from the folder described by folder_name
.
|
a CamelStore object |
|
full path of the folder |
|
a CamelException |
void camel_store_noop (CamelStore *store
,CamelException *ex
);
Pings store
so that its connection doesn't timeout.
|
a CamelStore object |
|
a CamelException |
gint camel_store_folder_uri_equal (CamelStore *store
,const gchar *uri0
,const gchar *uri1
);
Compares 2 folder uris to check that they are equal.
|
a CamelStore object |
|
a folder uri |
|
another folder uri |
Returns : |
TRUE if they are equal or FALSE otherwise
|
gboolean camel_store_can_refresh_folder (CamelStore *store
,CamelFolderInfo *info
,CamelException *ex
);
Returns if this folder (param info) should be checked for new mail or not. It should not look into sub infos (info->child) or next infos, it should return value only for the actual folder info. Default behavior is that all Inbox folders are intended to be refreshed.
|
a CamelStore |
|
a CamelFolderInfo |
|
a CamelException |
Returns : |
whether folder should be checked for new mails |
Since 2.22
typedef struct { CamelInterface iface; gboolean (*subscribed)(CamelStore *store, const gchar *folder_name); void (*subscribe)(CamelStore *store, const gchar *folder_name, CamelException *ex); void (*unsubscribe)(CamelStore *store, const gchar *folder_name, CamelException *ex); } CamelISubscribe;
CamelISubscribe
is deprecated and should not be used in newly-written code.
gboolean camel_isubscribe_subscribed (CamelStore *store
,const gchar *name
);
camel_isubscribe_subscribed
is deprecated and should not be used in newly-written code.
|
|
|
|
Returns : |
void camel_isubscribe_subscribe (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
camel_isubscribe_subscribe
is deprecated and should not be used in newly-written code.
|
|
|
|
|
void camel_isubscribe_unsubscribe (CamelStore *store
,const gchar *folder_name
,CamelException *ex
);
camel_isubscribe_unsubscribe
is deprecated and should not be used in newly-written code.
|
|
|
|
|