|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <camel/camel.h> struct CamelIMAPXListResponse; CamelIMAPXListResponse * camel_imapx_list_response_new (CamelIMAPXStream *stream,GCancellable *cancellable,GError **error); guint camel_imapx_list_response_hash (CamelIMAPXListResponse *response); gboolean camel_imapx_list_response_equal (CamelIMAPXListResponse *response_a,CamelIMAPXListResponse *response_b); gint camel_imapx_list_response_compare (CamelIMAPXListResponse *response_a,CamelIMAPXListResponse *response_b); const gchar * camel_imapx_list_response_get_mailbox_name (CamelIMAPXListResponse *response); gchar camel_imapx_list_response_get_separator (CamelIMAPXListResponse *response); #define CAMEL_IMAPX_LIST_ATTR_NOINFERIORS #define CAMEL_IMAPX_LIST_ATTR_NOSELECT #define CAMEL_IMAPX_LIST_ATTR_MARKED #define CAMEL_IMAPX_LIST_ATTR_UNMARKED #define CAMEL_IMAPX_LIST_ATTR_NONEXISTENT #define CAMEL_IMAPX_LIST_ATTR_SUBSCRIBED #define CAMEL_IMAPX_LIST_ATTR_REMOTE #define CAMEL_IMAPX_LIST_ATTR_HASCHILDREN #define CAMEL_IMAPX_LIST_ATTR_HASNOCHILDREN void camel_imapx_list_response_add_attribute (CamelIMAPXListResponse *response,const gchar *attribute); gboolean camel_imapx_list_response_has_attribute (CamelIMAPXListResponse *response,const gchar *attribute); GHashTable * camel_imapx_list_response_dup_attributes (CamelIMAPXListResponse *response); GVariant * camel_imapx_list_response_ref_extended_item (CamelIMAPXListResponse *response,const gchar *extended_item_tag); CamelStoreInfoFlags camel_imapx_list_response_get_summary_flags (CamelIMAPXListResponse *response);
CamelIMAPXListResponse encapsulates an IMAP LIST response, which consists of a set of mailbox attributes, a mailbox separator character, and the mailbox name. (Extended information for LIST responses, as described in RFC 5258, to be supported at a later date.)
CamelIMAPXListResponse can also convert the mailbox attributes to
a CamelStoreInfoFlags / CamelFolderInfoFlags value for use with
camel_store_get_folder_info().
struct CamelIMAPXListResponse;
Contains only private data that should be read and manipulated using the functions below.
Since 3.10
CamelIMAPXListResponse * camel_imapx_list_response_new (CamelIMAPXStream *stream,GCancellable *cancellable,GError **error);
Attempts to parse an IMAP LIST response from stream and, if successful,
stores the response data in a new CamelIMAPXListResponse.  If an error
occurs, the function sets error and returns NULL.
| 
 | a CamelIMAPXStream | 
| 
 | a GCancellable | 
| 
 | return location for a GError, or NULL | 
| Returns : | a CamelIMAPXListResponse, or NULL | 
Since 3.10
guint               camel_imapx_list_response_hash      (CamelIMAPXListResponse *response);
Generates a hash value for response based on the mailbox name.  This
function is intended for easily hashing a CamelIMAPXListResponse to
add to a GHashTable or similar data structure.
| 
 | a CamelIMAPXListResponse | 
| Returns : | a hash value for response | 
Since 3.10
gboolean camel_imapx_list_response_equal (CamelIMAPXListResponse *response_a,CamelIMAPXListResponse *response_b);
Checks two CamelIMAPXListResponse instances for equality based on their mailbox names.
| 
 | the first CamelIMAPXListResponse | 
| 
 | the second CamelIMAPXListResponse | 
| Returns : | TRUEifresponse_aandresponse_bare equal | 
Since 3.10
gint camel_imapx_list_response_compare (CamelIMAPXListResponse *response_a,CamelIMAPXListResponse *response_b);
Compares two CamelIMAPXListResponse instances by their mailbox names.
| 
 | the first CamelIMAPXListResponse | 
| 
 | the second CamelIMAPXListResponse | 
| Returns : | a negative value if response_acompares beforeresponse_b,
zero if they compare equal, or a positive value ifresponse_acompares afterresponse_b | 
Since 3.10
const gchar *       camel_imapx_list_response_get_mailbox_name
                                                        (CamelIMAPXListResponse *response);
Returns the mailbox name for response.
| 
 | a CamelIMAPXListResponse | 
| Returns : | the mailbox name | 
Since 3.10
gchar               camel_imapx_list_response_get_separator
                                                        (CamelIMAPXListResponse *response);
Returns the mailbox path separator character for response.
| 
 | a CamelIMAPXListResponse | 
| Returns : | the mailbox path separator character | 
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_NOINFERIORS "\\NoInferiors"
Refer to RFC 3501 section 7.2.2.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_NOSELECT "\\NoSelect"
Refer to RFC 3501 section 7.2.2.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_MARKED "\\Marked"
Refer to RFC 3501 section 7.2.2.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_UNMARKED "\\Unmarked"
Refer to RFC 3501 section 7.2.2.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_NONEXISTENT "\\NonExistent"
Refer to RFC 5258 section 3.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_SUBSCRIBED "\\Subscribed"
Refer to RFC 5258 section 3.1.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_REMOTE "\\Remote"
Refer to RFC 5258 section 3.1.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_HASCHILDREN "\\HasChildren"
Refer to RFC 5258 section 4.
Since 3.10
#define CAMEL_IMAPX_LIST_ATTR_HASNOCHILDREN "\\HasNoChildren"
Refer to RFC 5258 section 4.
Since 3.10
void camel_imapx_list_response_add_attribute (CamelIMAPXListResponse *response,const gchar *attribute);
Adds a mailbox attribute to response.  The attribute should be one of
the LIST attribute macros defined above.
| 
 | a CamelIMAPXListResponse | 
| 
 | a mailbox attribute | 
Since 3.10
gboolean camel_imapx_list_response_has_attribute (CamelIMAPXListResponse *response,const gchar *attribute);
Returns whether response includes the given mailbox attribute.  The
attribute should be one of the LIST attribute macros defined above.
| 
 | a CamelIMAPXListResponse | 
| 
 | a mailbox attribute | 
| Returns : | TRUEifresponsehasattribute, or elseFALSE | 
Since 3.10
GHashTable *        camel_imapx_list_response_dup_attributes
                                                        (CamelIMAPXListResponse *response);
Returns a GHashTable of mailbox attributes to be used as a set.
Use g_hash_table_contains() and g_hash_table_get_keys() to query
for and list all mailbox attributes, respectively.
The hash table keys are all internalized strings and must not be freed.
Free the returned GHashTable with g_hash_table_destroy() when finished
with it.
| 
 | a CamelIMAPXListResponse | 
| Returns : | a newly-created GHashTable | 
Since 3.10
GVariant * camel_imapx_list_response_ref_extended_item (CamelIMAPXListResponse *response,const gchar *extended_item_tag);
Returns the extended item value for extended_item_tag as a GVariant.
The type of the GVariant depends on the extended item.  If no value
for extended_item_tag exists, the function returns NULL.
The returned GVariant is referenced for thread-safety and should
be unreferenced with g_variant_unref() when finished with it.
| 
 | a CamelIMAPXListResponse | 
| 
 | an extended item tag | 
| Returns : | a GVariant, or NULL | 
Since 3.10
CamelStoreInfoFlags camel_imapx_list_response_get_summary_flags
                                                        (CamelIMAPXListResponse *response);
Converts the relevant mailbox attribute flags in response to a
CamelStoreInfoFlags value.
| 
 | a CamelIMAPXListResponse | 
| Returns : | a CamelStoreInfoFlags value | 
Since 3.10