/**
* camel_folder_construct:
- * @folder: folder object to construct
- * @parent_store: parent store object of the folder
+ * @folder: a #CamelFolder object to construct
+ * @parent_store: parent #CamelStore object of the folder
* @full_name: full name of the folder
* @name: short name of the folder
*
camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
}
+
/**
* camel_folder_sync:
- * @folder: The folder object
+ * @folder: a #CamelFolder object
* @expunge: whether or not to expunge deleted messages
- * @ex: exception object
+ * @ex: a #CamelException
*
- * Sync changes made to a folder to its backing store, possibly expunging
- * deleted messages as well.
+ * Sync changes made to a folder to its backing store, possibly
+ * expunging deleted messages as well.
**/
void
camel_folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
/* No op */
}
+
/**
* camel_folder_refresh_info:
- * @folder: The folder object
- * @ex: exception object
+ * @folder: a #CamelFolder object
+ * @ex: a #CamelException
*
* Updates a folder's summary to be in sync with its backing store.
**/
return folder->name;
}
+
/**
* camel_folder_get_name:
- * @folder: a folder
+ * @folder: a #CamelFolder object
*
* Get the (short) name of the folder. The fully qualified name
- * can be obtained with the get_full_name method.
+ * can be obtained with the #camel_folder_get_full_name method.
*
- * Return value: name of the folder
+ * Returns the short name of the folder
**/
const char *
-camel_folder_get_name (CamelFolder * folder)
+camel_folder_get_name (CamelFolder *folder)
{
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
return folder->full_name;
}
+
/**
* camel_folder_get_full_name:
- * @folder: a folder
+ * @folder: a #CamelFolder object
*
- * Get the (full) name of the folder.
+ * Get the full name of the folder.
*
- * Return value: full name of the folder
+ * Returns the full name of the folder
**/
const char *
camel_folder_get_full_name (CamelFolder *folder)
return folder->parent_store;
}
+
/**
* camel_folder_get_parent_store:
- * @folder: folder to get the parent of
+ * @folder: a #CamelFolder object
*
- * Return value: the parent store of the folder.
+ * Returns the parent #CamelStore of the folder
**/
CamelStore *
camel_folder_get_parent_store (CamelFolder *folder)
/**
* camel_folder_expunge:
- * @folder: the folder
- * @ex: a CamelException
+ * @folder: a #CamelFolder object
+ * @ex: a #CamelException
*
* Delete messages which have been marked as "DELETED"
**/
return camel_folder_summary_count(folder->summary);
}
+
/**
* camel_folder_get_message_count:
- * @folder: A CamelFolder object
+ * @folder: a #CamelFolder object
*
- * Return value: the number of messages in the folder, or -1 if unknown.
+ * Returns the number of messages in the folder, or %-1 if unknown
**/
int
camel_folder_get_message_count (CamelFolder *folder)
return ret;
}
+
/**
* camel_folder_unread_get_message_count:
- * @folder: A CamelFolder object
+ * @folder: a #CamelFolder object
*
* DEPRECATED, use camel_object_get instead.
*
- * Return value: the number of unread messages in the folder, or -1 if unknown.
+ * Returns the number of unread messages in the folder, or %-1 if
+ * unknown
**/
int
camel_folder_get_unread_message_count (CamelFolder *folder)
return count;
}
+
/**
* camel_folder_deleted_get_message_count:
- * @folder: A CamelFolder object
+ * @folder: a #CamelFolder object
*
- * Return value: the number of deleetd messages in the folder, or -1 if unknown.
+ * Returns the number of deleted messages in the folder, or %-1 if
+ * unknown
**/
int
camel_folder_get_deleted_message_count (CamelFolder *folder)
}
+
/**
- * camel_folder_append_message: add a message to a folder
- * @folder: folder object to add the message to
- * @message: message object
- * @info: message info with additional flags/etc to set on
+ * camel_folder_append_message:
+ * @folder: a #CamelFolder object
+ * @message: a #CamelMimeMessage object
+ * @info: a #CamelMessageInfo with additional flags/etc to set on
* new message, or %NULL
* @appended_uid: if non-%NULL, the UID of the appended message will
* be returned here, if it is known.
- * @ex: exception object
+ * @ex: a #CamelException
*
- * Add a message to a folder. Only the flag and tag data from @info
- * is used. If @info is %NULL, no flags or tags will be set.
+ * Append @message to @folder. Only the flag and tag data from @info
+ * are used. If @info is %NULL, no flags or tags will be set.
**/
void
camel_folder_append_message (CamelFolder *folder, CamelMimeMessage *message,
return folder->permanent_flags;
}
+
/**
* camel_folder_get_permanent_flags:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
*
- * Return value: the set of CamelMessageFlags that can be permanently
- * stored on a message between sessions. If it includes %CAMEL_FLAG_USER,
- * then user-defined flags will be remembered.
+ * Returns the set of #CamelMessageFlags that can be permanently
+ * stored on a message between sessions. If it includes
+ * #CAMEL_FLAG_USER, then user-defined flags will be remembered.
**/
guint32
camel_folder_get_permanent_flags (CamelFolder *folder)
return flags;
}
+
/**
* camel_folder_get_message_flags:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
*
- * Deprecated: Use camel_folder_get_message_info instead.
+ * Deprecated: Use #camel_folder_get_message_info instead.
*
- * Return value: the CamelMessageFlags that are set on the indicated
+ * Returns the #CamelMessageFlags that are set on the indicated
* message.
**/
guint32
return res;
}
+
/**
* camel_folder_set_message_flags:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
- * @flags: a set of CamelMessageFlag values to set
+ * @flags: a set of #CamelMessageFlag values to set
* @set: the mask of values in @flags to use.
*
* Sets those flags specified by @flags to the values specified by @set
* on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
+ * folder or store is closed. See #camel_folder_get_permanent_flags)
*
* E.g. to set the deleted flag and clear the draft flag, use
- * set_message_flags(folder, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_DRAFT, CAMEL_MESSAGE_DELETED);
+ * #camel_folder_set_message_flags(folder, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_DRAFT, CAMEL_MESSAGE_DELETED);
*
- * DEPRECATED: Use camel_message_info_set_flags on the message info directly
+ * DEPRECATED: Use #camel_message_info_set_flags on the message info directly
* (when it works)
*
- * Return Value: TRUE if the flags were changed, false otherwise.
+ * Returns %TRUE if the flags were changed or %FALSE otherwise
**/
gboolean
camel_folder_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
return ret;
}
+
/**
* camel_folder_get_message_user_flag:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
* @name: the name of a user flag
*
- * DEPRECATED: Use camel_message_info_get_user_flag on the message info directly
+ * DEPRECATED: Use #camel_message_info_get_user_flag on the message
+ * info directly
*
- * * Return value: whether or not the given user flag is set on the message.
+ * Returns %TRUE if the given user flag is set on the message or
+ * %FALSE otherwise
**/
gboolean
camel_folder_get_message_user_flag (CamelFolder *folder, const char *uid,
camel_message_info_free(info);
}
+
/**
* camel_folder_set_message_user_flag:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
* @name: the name of the user flag to set
* @value: the value to set it to
*
- * DEPRECATED: Use camel_message_info_set_user_flag on the message info directly (when it works)
+ * DEPRECATED: Use #camel_message_info_set_user_flag on the
+ * #CamelMessageInfo directly (when it works)
*
* Sets the user flag specified by @name to the value specified by @value
* on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
+ * folder or store is closed. See #camel_folder_get_permanent_flags)
**/
void
camel_folder_set_message_user_flag (CamelFolder *folder, const char *uid,
return ret;
}
+
/**
* camel_folder_get_message_user_tag:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
* @name: the name of a user tag
*
- * DEPRECATED: Use camel_message_info_get_user_tag on the messageinfo directly.
+ * DEPRECATED: Use #camel_message_info_get_user_tag on the
+ * #CamelMessageInfo directly.
*
- * Return value: Returns the value of the user tag.
+ * Returns the value of the user tag
**/
const char *
camel_folder_get_message_user_tag (CamelFolder *folder, const char *uid, const char *name)
camel_message_info_free(info);
}
+
/**
* camel_folder_set_message_user_tag:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the UID of a message in @folder
* @name: the name of the user tag to set
* @value: the value to set it to
*
- * DEPRECATED: Use camel_message_info_set_user_tag on the messageinfo directly (when it works).
+ * DEPRECATED: Use #camel_message_info_set_user_tag on the
+ * #CamelMessageInfo directly (when it works).
*
* Sets the user tag specified by @name to the value specified by @value
* on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
+ * folder or store is closed. See #camel_folder_get_permanent_flags)
**/
void
camel_folder_set_message_user_tag (CamelFolder *folder, const char *uid, const char *name, const char *value)
return camel_folder_summary_uid(folder->summary, uid);
}
+
/**
* camel_folder_get_message_info:
- * @folder: a CamelFolder
+ * @folder: a #CamelFolder object
* @uid: the uid of a message
*
- * Retrieve the CamelMessageInfo for the specified @uid. This return
- * must be freed using free_message_info().
+ * Retrieve the #CamelMessageInfo for the specified @uid. This return
+ * must be freed using #camel_folder_free_message_info.
*
- * Return value: the summary information for the indicated message, or NULL
- * if the uid does not exist.
+ * Returns the summary information for the indicated message, or %NULL
+ * if the uid does not exist
**/
CamelMessageInfo *
camel_folder_get_message_info (CamelFolder *folder, const char *uid)
camel_message_info_free(info);
}
+
/**
* camel_folder_free_message_info:
- * @folder:
- * @info:
+ * @folder: a #CamelFolder object
+ * @info: a #CamelMessageInfo
*
- * Free (unref) a CamelMessageInfo, previously obtained with get_message_info().
+ * Free (unref) a #CamelMessageInfo, previously obtained with
+ * #camel_folder_get_message_info.
**/
void
camel_folder_free_message_info(CamelFolder *folder, CamelMessageInfo *info)
camel_message_info_ref(info);
}
+
/**
* camel_folder_ref_message_info:
- * @folder:
- * @info:
+ * @folder: a #CamelFolder object
+ * @info: a #CamelMessageInfo
*
- * DEPRECATED: Use camel_message_info_ref directly.
+ * DEPRECATED: Use #camel_message_info_ref directly.
*
- * Ref a CamelMessageInfo, previously obtained with get_message_info().
+ * Ref a #CamelMessageInfo, previously obtained with
+ * #camel_folder_get_message_info.
**/
void
camel_folder_ref_message_info(CamelFolder *folder, CamelMessageInfo *info)
CF_CLASS (folder)->ref_message_info(folder, info);
}
+
/* TODO: is this function required anyway? */
+/**
+ * camel_folder_has_summary_capability:
+ * @folder: a #CamelFolder object
+ *
+ * Get whether or not the folder has a summary.
+ *
+ * Returns %TRUE if a summary is available or %FALSE otherwise
+ **/
gboolean
camel_folder_has_summary_capability (CamelFolder *folder)
{
/* UIDs stuff */
static CamelMimeMessage *
-get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
+get_message (CamelFolder *folder, const char *uid, CamelException *ex)
{
w(g_warning ("CamelFolder::get_message not implemented for `%s'",
camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
return NULL;
}
+
/**
* camel_folder_get_message:
- * @folder: the folder object
+ * @folder: a #CamelFolder object
* @uid: the UID
- * @ex: a CamelException
+ * @ex: a #CamelException
*
- * Get a message from its UID in the folder. Messages are cached
- * within a folder, that is, asking twice for the same UID returns the
- * same message object. (FIXME: is this true?)
+ * Get a message from its UID in the folder.
*
- * Return value: Message corresponding to the UID
+ * Returns a #CamelMimeMessage corresponding to @uid
**/
CamelMimeMessage *
-camel_folder_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
+camel_folder_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
{
CamelMimeMessage *ret;
return array;
}
+
/**
* camel_folder_get_uids:
- * @folder: folder object
+ * @folder: a #CamelFolder object
*
* Get the list of UIDs available in a folder. This routine is useful
* for finding what messages are available when the folder does not
- * support summaries. The returned array shoudl not be modified, and
- * must be freed by passing it to camel_folder_free_uids().
+ * support summaries. The returned array should not be modified, and
+ * must be freed by passing it to #camel_folder_free_uids.
*
- * Return value: GPtrArray of UIDs corresponding to the messages
- * available in the folder.
+ * Returns a GPtrArray of UIDs corresponding to the messages available
+ * in the folder
**/
GPtrArray *
camel_folder_get_uids (CamelFolder *folder)
g_ptr_array_free(array, TRUE);
}
+
/**
* camel_folder_free_uids:
- * @folder: folder object
+ * @folder: a #CamelFolder object
* @array: the array of uids to free
*
- * Frees the array of UIDs returned by camel_folder_get_uids().
+ * Frees the array of UIDs returned by #camel_folder_get_uids.
**/
void
camel_folder_free_uids (CamelFolder *folder, GPtrArray *array)
return camel_folder_summary_array(folder->summary);
}
+
/**
* camel_folder_get_summary:
- * @folder: a folder object
+ * @folder: a #CamelFolder object
*
* This returns the summary information for the folder. This array
* should not be modified, and must be freed with
- * camel_folder_free_summary().
+ * #camel_folder_free_summary.
*
- * Return value: an array of CamelMessageInfo
+ * Returns an array of #CamelMessageInfo
**/
GPtrArray *
camel_folder_get_summary (CamelFolder *folder)
camel_folder_summary_array_free(folder->summary, summary);
}
+
/**
* camel_folder_free_summary:
- * @folder: folder object
+ * @folder: a #CamelFolder object
* @array: the summary array to free
*
- * Frees the summary array returned by camel_folder_get_summary().
+ * Frees the summary array returned by #camel_folder_get_summary.
**/
-void camel_folder_free_summary(CamelFolder * folder, GPtrArray * array)
+void
+camel_folder_free_summary(CamelFolder *folder, GPtrArray *array)
{
g_return_if_fail(CAMEL_IS_FOLDER(folder));
CF_CLASS(folder)->free_summary(folder, array);
}
+
/**
* camel_folder_has_search_capability:
- * @folder: Folder object
+ * @folder: a #CamelFolder object
*
* Checks if a folder supports searching.
*
- * Return value: %TRUE if the folder supports searching
+ * Returns %TRUE if the folder supports searching or %FALSE otherwise
**/
gboolean
camel_folder_has_search_capability (CamelFolder *folder)
return NULL;
}
+
/**
* camel_folder_search_by_expression:
- * @folder: Folder object
+ * @folder: a #CamelFolder object
* @expression: a search expression
- * @ex: a CamelException
+ * @ex: a #CamelException
*
* Searches the folder for messages matching the given search expression.
*
- * Return value: a list of uids of matching messages. The caller must
+ * Returns a #GPtrArray of uids of matching messages. The caller must
* free the list and each of the elements when it is done.
**/
GPtrArray *
return NULL;
}
+
/**
* camel_folder_search_by_uids:
- * @folder:
- * @expr:
+ * @folder: a #CamelFolder object
+ * @expr: search expression
* @uids: array of uid's to match against.
- * @ex:
- *
+ * @ex: a #CamelException
+ *
* Search a subset of uid's for an expression match.
- *
- * Return value:
+ *
+ * Returns a #GPtrArray of uids of matching messages. The caller must
+ * free the list and each of the elements when it is done.
**/
GPtrArray *
camel_folder_search_by_uids(CamelFolder *folder, const char *expr, GPtrArray *uids, CamelException *ex)
g_ptr_array_free (result, TRUE);
}
+
/**
* camel_folder_search_free:
- * @folder:
- * @result:
+ * @folder: a #CamelFolder object
+ * @result: search results to free
*
- * Free the result of a search.
+ * Free the result of a search as gotten by #camel_folder_search or
+ * #camel_folder_search_by_uids.
**/
void
camel_folder_search_free (CamelFolder *folder, GPtrArray *result)
camel_exception_clear(&local);
}
+
/**
* camel_folder_transfer_messages_to:
- * @source: source folder
+ * @source: the source #CamelFolder object
* @uids: message UIDs in @source
- * @dest: destination folder
+ * @dest: the destination #CamelFolder object
* @transferred_uids: if non-%NULL, the UIDs of the resulting messages
* in @dest will be stored here, if known.
* @delete_originals: whether or not to delete the original messages
- * @ex: a CamelException
+ * @ex: a #CamelException
*
* This copies or moves messages from one folder to another. If the
* @source and @dest folders have the same parent_store, this may be
- * more efficient than using camel_folder_append_message().
+ * more efficient than using #camel_folder_append_message.
**/
void
camel_folder_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
camel_folder_summary_clear (folder->summary);
}
+
/**
* camel_folder_delete:
- * @folder: folder
+ * @folder: a #CamelFolder object
*
* Marks a folder object as deleted and performs any required cleanup.
**/
{
char *tmp;
- printf("CamelFolder:rename('%s')\n", new);
+ d(printf("CamelFolder:rename('%s')\n", new));
g_free(folder->full_name);
folder->full_name = g_strdup(new);
folder->name = g_strdup(tmp?tmp+1:new);
}
+
/**
* camel_folder_rename:
- * @folder:
- * @new:
+ * @folder: a #CamelFolder object
+ * @new: new name for the folder
*
* Mark an active folder object as renamed.
*
CAMEL_FOLDER_UNLOCK(folder, change_lock);
}
+
/**
* camel_folder_freeze:
- * @folder: a folder
+ * @folder: a #CamelFolder
*
* Freezes the folder so that a series of operation can be performed
- * without "folder_changed" signals being emitted.
- * When the folder is later thawed with camel_folder_thaw(), the
- * suppressed signals will be emitted.
+ * without "folder_changed" signals being emitted. When the folder is
+ * later thawed with #camel_folder_thaw, the suppressed signals will
+ * be emitted.
**/
void
camel_folder_freeze (CamelFolder * folder)
/**
* camel_folder_thaw:
- * @folder: a folder
+ * @folder: a #CamelFolder object
*
* Thaws the folder and emits any pending folder_changed
* signals.
return folder->priv->frozen != 0;
}
+
/**
* camel_folder_is_frozen:
- * @folder: a folder
+ * @folder: a #CamelFolder object
*
- * Return value: whether or not the folder is frozen.
+ * Returns whether or not the folder is frozen
**/
gboolean
camel_folder_is_frozen (CamelFolder *folder)
return TRUE;
}
+
/**
* camel_folder_free_nop:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
+ * @folder: a #CamelFolder object
+ * @array: an array of uids or #CamelMessageInfo
*
- * "Frees" the provided array by doing nothing. Used by CamelFolder
+ * "Frees" the provided array by doing nothing. Used by #CamelFolder
* subclasses as an implementation for free_uids, or free_summary when
* the returned array is "static" information and should not be freed.
**/
;
}
+
/**
* camel_folder_free_shallow:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
+ * @folder: a #CamelFolder object
+ * @array: an array of uids or #CamelMessageInfo
*
- * Frees the provided array but not its contents. Used by CamelFolder
+ * Frees the provided array but not its contents. Used by #CamelFolder
* subclasses as an implementation for free_uids or free_summary when
* the returned array needs to be freed but its contents come from
* "static" information.
g_ptr_array_free (array, TRUE);
}
+
/**
* camel_folder_free_deep:
- * @folder: a folder
+ * @folder: a #CamelFolder object
* @array: an array of uids
*
- * Frees the provided array and its contents. Used by CamelFolder
+ * Frees the provided array and its contents. Used by #CamelFolder
* subclasses as an implementation for free_uids when the provided
* information was created explicitly by the corresponding get_ call.
**/
struct _EMemPool *uid_pool; /* pool used to store copies of uid strings */
};
+
/**
* camel_folder_change_info_new:
- * @void:
*
* Create a new folder change info structure.
*
* Change info structures are not MT-SAFE and must be
* locked for exclusive access externally.
- *
- * Return value:
+ *
+ * Returns a new #CamelFolderChangeInfo
**/
CamelFolderChangeInfo *
camel_folder_change_info_new(void)
return info;
}
+
/**
* camel_folder_change_info_add_source:
- * @info:
- * @uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
*
* Add a source uid for generating a changeset.
**/
g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), GINT_TO_POINTER (1));
}
+
/**
* camel_folder_change_info_add_source_list:
- * @info:
- * @list:
+ * @info: a #CamelFolderChangeInfo
+ * @list: a list of uids
*
* Add a list of source uid's for generating a changeset.
**/
}
}
+
/**
* camel_folder_change_info_add_update:
- * @info:
- * @uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
*
* Add a uid from the updated list, used to generate a changeset diff.
**/
}
}
+
/**
* camel_folder_change_info_add_update_list:
- * @info:
- * @list:
+ * @info: a #CamelFolderChangeInfo
+ * @list: a list of uids
*
* Add a list of uid's from the updated list.
**/
g_hash_table_insert(p->uid_stored, key, info->uid_removed);
}
+
/**
* camel_folder_change_info_build_diff:
- * @info:
+ * @info: a #CamelFolderChangeInfo
*
- * Compare the source uid set to the updated uid set and generate the differences
- * into the added and removed lists.
+ * Compare the source uid set to the updated uid set and generate the
+ * differences into the added and removed lists.
**/
void
camel_folder_change_info_build_diff(CamelFolderChangeInfo *info)
add(info, source->pdata[i]);
}
+
/**
* camel_folder_change_info_cat:
- * @info:
- * @source:
+ * @info: a #CamelFolderChangeInfo to append to
+ * @src: a #CamelFolderChangeInfo to append from
*
- * Concatenate one change info onto antoher. Can be used to copy
- * them too.
+ * Concatenate one change info onto antoher. Can be used to copy them
+ * too.
**/
void
camel_folder_change_info_cat(CamelFolderChangeInfo *info, CamelFolderChangeInfo *source)
/**
* camel_folder_change_info_add_uid:
- * @info:
- * @uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
*
* Add a new uid to the changeinfo.
**/
g_hash_table_insert(p->uid_stored, olduid, info->uid_added);
}
+
/**
* camel_folder_change_info_remove_uid:
- * @info:
- * @uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
*
* Add a uid to the removed uid list.
**/
g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
}
+
/**
* camel_folder_change_info_change_uid:
- * @info:
- * @uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
*
* Add a uid to the changed uid list.
**/
g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
}
+
+/**
+ * camel_folder_change_info_recent_uid:
+ * @info: a #CamelFolderChangeInfo
+ * @uid: a uid
+ *
+ * Add a recent uid to the changedinfo.
+ **/
void
camel_folder_change_info_recent_uid(CamelFolderChangeInfo *info, const char *uid)
{
/**
* camel_folder_change_info_changed:
- * @info:
- *
- * Return true if the changeset contains any changes.
+ * @info: a #CamelFolderChangeInfo
+ *
+ * Gets whether or not there have been any changes.
*
- * Return Value:
+ * Returns %TRUE if the changeset contains any changes or %FALSE
+ * otherwise
**/
gboolean
camel_folder_change_info_changed(CamelFolderChangeInfo *info)
return (info->uid_added->len || info->uid_removed->len || info->uid_changed->len || info->uid_recent->len);
}
+
/**
* camel_folder_change_info_clear:
- * @info:
+ * @info: a #CamelFolderChangeInfo
*
- * Empty out the change info; called after changes have been processed.
+ * Empty out the change info; called after changes have been
+ * processed.
**/
void
camel_folder_change_info_clear(CamelFolderChangeInfo *info)
e_mempool_flush(p->uid_pool, TRUE);
}
+
/**
* camel_folder_change_info_free:
- * @info:
+ * @info: a #CamelFolderChangeInfo
*
* Free memory associated with the folder change info lists.
**/
struct _CamelFolderChangeInfoPrivate *priv;
};
-struct _CamelFolder
-{
+struct _CamelFolder {
CamelObject parent_object;
struct _CamelFolderPrivate *priv;
const char *full_name,
const char *name);
-void camel_folder_refresh_info (CamelFolder * folder,
- CamelException * ex);
+void camel_folder_refresh_info (CamelFolder *folder,
+ CamelException *ex);
void camel_folder_sync (CamelFolder *folder,
gboolean expunge,
CamelException *ex);
void camel_folder_change_info_build_diff (CamelFolderChangeInfo *info);
/* for manipulating diff's directly */
-void camel_folder_change_info_cat (CamelFolderChangeInfo *info, CamelFolderChangeInfo *s);
+void camel_folder_change_info_cat (CamelFolderChangeInfo *info, CamelFolderChangeInfo *src);
void camel_folder_change_info_add_uid (CamelFolderChangeInfo *info, const char *uid);
void camel_folder_change_info_remove_uid (CamelFolderChangeInfo *info, const char *uid);
void camel_folder_change_info_change_uid (CamelFolderChangeInfo *info, const char *uid);
#endif /* __cplusplus */
#endif /* CAMEL_FOLDER_H */
-
/**
* camel_offline_fodler_downsync:
- * @offline: Offline Folder object
+ * @offline: a #CamelOfflineFolder object
* @expression: search expression describing which set of messages to downsync (%NULL for all)
- * @ex: exception
+ * @ex: a #CamelException
*
- * Downsyncs messages in @offline described by the search @expression.
+ * Syncs messages in @offline described by the search @expression to
+ * the local machine for offline availability.
**/
void
camel_offline_folder_downsync (CamelOfflineFolder *offline, const char *expression, CamelException *ex)
}
+/**
+ * camel_offline_store_set_network_state:
+ * @store: a #CamelOfflineStore object
+ * @state: the network state
+ * @ex: a #CamelException
+ *
+ * Set the network state to either #CAMEL_OFFLINE_STORE_NETWORK_AVAIL
+ * or #CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL.
+ **/
void
camel_offline_store_set_network_state (CamelOfflineStore *store, int state, CamelException *ex)
{
return type;
}
+
/**
* camel_store_summary_new:
*
- * Create a new CamelStoreSummary object.
+ * Create a new #CamelStoreSummary object.
*
- * Return value: A new CamelStoreSummary widget.
+ * Returns a new #CamelStoreSummary object
**/
CamelStoreSummary *
camel_store_summary_new (void)
CamelStoreSummary *new = CAMEL_STORE_SUMMARY ( camel_object_new (camel_store_summary_get_type ())); return new;
}
+
/**
* camel_store_summary_set_filename:
- * @s:
- * @name:
+ * @summary: a #CamelStoreSummary
+ * @filename: a filename
*
* Set the filename where the summary will be loaded to/saved from.
**/
-void camel_store_summary_set_filename(CamelStoreSummary *s, const char *name)
+void
+camel_store_summary_set_filename(CamelStoreSummary *s, const char *name)
{
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
}
-void camel_store_summary_set_uri_base(CamelStoreSummary *s, CamelURL *base)
+
+/**
+ * camel_store_summary_set_uri_base:
+ * @summary: a #CamelStoreSummary object
+ * @base: a #CamelURL
+ *
+ * Sets the base URI for the summary.
+ **/
+void
+camel_store_summary_set_uri_base(CamelStoreSummary *s, CamelURL *base)
{
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
}
+
/**
* camel_store_summary_count:
- * @s:
+ * @summary: a #CamelStoreSummary object
*
* Get the number of summary items stored in this summary.
*
- * Return value: The number of items int he summary.
+ * Returns the number of items int he summary.
**/
int
camel_store_summary_count(CamelStoreSummary *s)
return s->folders->len;
}
+
/**
* camel_store_summary_index:
- * @s:
- * @i:
+ * @summary: a #CamelStoreSummary object
+ * @index: record index
*
* Retrieve a summary item by index number.
*
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
+ * A referenced to the summary item is returned, which may be ref'd or
+ * free'd as appropriate.
+ *
+ * It must be freed using #camel_store_summary_info_free.
*
- * Return value: The summary item, or NULL if the index @i is out
- * of range.
- * It must be freed using camel_store_summary_info_free().
+ * Returns the summary item, or %NULL if @index is out of range
**/
CamelStoreInfo *
camel_store_summary_index(CamelStoreSummary *s, int i)
return info;
}
+
/**
- * camel_store_summary_index:
- * @s:
- * @i:
+ * camel_store_summary_array:
+ * @summary: a #CamelStoreSummary object
*
* Obtain a copy of the summary array. This is done atomically,
* so cannot contain empty entries.
*
- * It must be freed using camel_store_summary_array_free().
+ * It must be freed using #camel_store_summary_array_free.
+ *
+ * Returns the summary array
**/
GPtrArray *
camel_store_summary_array(CamelStoreSummary *s)
return res;
}
+
/**
* camel_store_summary_array_free:
- * @s:
- * @array:
+ * @summary: a #CamelStoreSummary object
+ * @array: the summary array as gotten from #camel_store_summary_array
*
* Free the folder summary array.
**/
g_ptr_array_free(array, TRUE);
}
+
/**
* camel_store_summary_path:
- * @s:
- * @path:
+ * @summary: a #CamelStoreSummary object
+ * @path: path to the item
*
* Retrieve a summary item by path name.
*
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
- *
- * Return value: The summary item, or NULL if the @path name
- * is not available.
- * It must be freed using camel_store_summary_info_free().
+ * A referenced to the summary item is returned, which may be ref'd or
+ * free'd as appropriate.
+ *
+ * It must be freed using #camel_store_summary_info_free.
+ *
+ * Returns the summary item, or %NULL if the @path name is not
+ * available
**/
CamelStoreInfo *
camel_store_summary_path(CamelStoreSummary *s, const char *path)
return info;
}
+
+/**
+ * camel_store_summary_load:
+ * @summary: a #CamelStoreSummary object
+ *
+ * Load the summary off disk.
+ *
+ * Returns %0 on success or %-1 on fail
+ **/
int
camel_store_summary_load(CamelStoreSummary *s)
{
FILE *in;
int i;
- CamelStoreInfo *mi;
+ CamelStoreInfo *info;
g_assert(s->summary_path);
/* now read in each message ... */
for (i=0;i<s->count;i++) {
- mi = ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_load(s, in);
+ info = ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_load(s, in);
- if (mi == NULL)
+ if (info == NULL)
goto error;
- camel_store_summary_add(s, mi);
+ camel_store_summary_add(s, info);
}
CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
return -1;
}
+
/**
* camel_store_summary_save:
- * @s:
+ * @summary: a #CamelStoreSummary object
*
* Writes the summary to disk. The summary is only written if changes
* have occured.
*
- * Return value: Returns -1 on error.
+ * Returns %0 on succes or %-1 on fail
**/
int
camel_store_summary_save(CamelStoreSummary *s)
int fd;
int i;
guint32 count;
- CamelStoreInfo *mi;
+ CamelStoreInfo *info;
g_assert(s->summary_path);
count = s->folders->len;
for (i=0;i<count;i++) {
- mi = s->folders->pdata[i];
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_save(s, out, mi);
+ info = s->folders->pdata[i];
+ ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_save(s, out, info);
}
CAMEL_STORE_SUMMARY_UNLOCK(s, io_lock);
return 0;
}
+
/**
* camel_store_summary_header_load:
- * @s: Summary object.
+ * @summary: a #CamelStoreSummary object
*
* Only load the header information from the summary,
* keep the rest on disk. This should only be done on
* a fresh summary object.
*
- * Return value: -1 on error.
+ * Returns %0 on success or %-1 on fail
**/
-int camel_store_summary_header_load(CamelStoreSummary *s)
+int
+camel_store_summary_header_load(CamelStoreSummary *s)
{
FILE *in;
int ret;
return ret;
}
+
/**
* camel_store_summary_add:
- * @s:
- * @info:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
*
- * Adds a new @info record to the summary. If @info->uid is NULL, then a new
- * uid is automatically re-assigned by calling :next_uid_string().
+ * Adds a new @info record to the summary. If @info->uid is %NULL,
+ * then a new uid is automatically re-assigned by calling
+ * #camel_store_summary_next_uid_string.
*
* The @info record should have been generated by calling one of the
* info_new_*() functions, as it will be free'd based on the summary
* class. And MUST NOT be allocated directly using malloc.
**/
-void camel_store_summary_add(CamelStoreSummary *s, CamelStoreInfo *info)
+void
+camel_store_summary_add(CamelStoreSummary *s, CamelStoreInfo *info)
{
if (info == NULL)
return;
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
}
+
/**
* camel_store_summary_add_from_path:
- * @s:
- * @h:
+ * @summary: a #CamelStoreSummary object
+ * @path: item path
*
* Build a new info record based on the name, and add it to the summary.
*
- * Return value: The newly added record.
+ * Returns the newly added record
**/
-CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *s, const char *path)
+CamelStoreInfo *
+camel_store_summary_add_from_path(CamelStoreSummary *s, const char *path)
{
CamelStoreInfo *info;
return info;
}
+
/**
* camel_store_summary_info_new_from_path:
- * @s:
- * @h:
+ * @summary: a #CamelStoreSummary object
+ * @path: item path
*
* Create a new info record from a name.
- *
- * Return value: Guess? This info record MUST be freed using
- * camel_store_summary_info_free(), camel_store_info_free() will not work.
+ *
+ * This info record MUST be freed using
+ * #camel_store_summary_info_free, #camel_store_info_free will not
+ * work.
+ *
+ * Returns the #CamelStoreInfo associated with @path
**/
-CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *s, const char *f)
+CamelStoreInfo *
+camel_store_summary_info_new_from_path(CamelStoreSummary *s, const char *path)
{
- return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s))) -> store_info_new(s, f);
+ return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_new(s, path);
}
+
/**
* camel_store_summary_info_free:
- * @s:
- * @mi:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
*
- * Unref and potentially free the message info @mi, and all associated memory.
+ * Unref and potentially free @info, and all associated memory.
**/
-void camel_store_summary_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
+void
+camel_store_summary_info_free(CamelStoreSummary *s, CamelStoreInfo *info)
{
- g_assert(mi);
+ g_assert(info);
g_assert(s);
CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- g_assert(mi->refcount >= 1);
+ g_assert(info->refcount >= 1);
- mi->refcount--;
- if (mi->refcount > 0) {
+ info->refcount--;
+ if (info->refcount > 0) {
CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
return;
}
CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_free(s, mi);
+ ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_free(s, info);
}
+
/**
* camel_store_summary_info_ref:
- * @s:
- * @mi:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
*
- * Add an extra reference to @mi.
+ * Add an extra reference to @info.
**/
-void camel_store_summary_info_ref(CamelStoreSummary *s, CamelStoreInfo *mi)
+void
+camel_store_summary_info_ref(CamelStoreSummary *s, CamelStoreInfo *info)
{
- g_assert(mi);
+ g_assert(info);
g_assert(s);
CAMEL_STORE_SUMMARY_LOCK(s, ref_lock);
- g_assert(mi->refcount >= 1);
- mi->refcount++;
+ g_assert(info->refcount >= 1);
+ info->refcount++;
CAMEL_STORE_SUMMARY_UNLOCK(s, ref_lock);
}
+
/**
* camel_store_summary_touch:
- * @s:
+ * @summary: a #CamelStoreSummary object
*
- * Mark the summary as changed, so that a save will save it.
+ * Mark the summary as changed, so that a save will force it to be
+ * written back to disk.
**/
void
camel_store_summary_touch(CamelStoreSummary *s)
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
}
+
/**
* camel_store_summary_clear:
- * @s:
+ * @summary: a #CamelStoreSummary object
*
* Empty the summary contents.
**/
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
}
+
/**
* camel_store_summary_remove:
- * @s:
- * @info:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
*
* Remove a specific @info record from the summary.
**/
-void camel_store_summary_remove(CamelStoreSummary *s, CamelStoreInfo *info)
+void
+camel_store_summary_remove(CamelStoreSummary *s, CamelStoreInfo *info)
{
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
g_hash_table_remove(s->folders_path, camel_store_info_path(s, info));
camel_store_summary_info_free(s, info);
}
+
/**
- * camel_store_summary_remove_uid:
- * @s:
- * @path:
+ * camel_store_summary_remove_path:
+ * @summary: a #CamelStoreSummary object
+ * @path: item path
*
* Remove a specific info record from the summary, by @path.
**/
-void camel_store_summary_remove_path(CamelStoreSummary *s, const char *path)
+void
+camel_store_summary_remove_path(CamelStoreSummary *s, const char *path)
{
CamelStoreInfo *oldinfo;
char *oldpath;
}
}
+
/**
* camel_store_summary_remove_index:
- * @s:
- * @index:
+ * @summary: a #CamelStoreSummary object
+ * @index: item index
*
* Remove a specific info record from the summary, by index.
**/
-void camel_store_summary_remove_index(CamelStoreSummary *s, int index)
+void
+camel_store_summary_remove_index(CamelStoreSummary *s, int index)
{
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
if (index < s->folders->len) {
return camel_file_util_encode_fixed_int32(out, camel_store_summary_count(s));
}
+
/**
* camel_store_summary_info_new:
- * @s:
+ * @summary: a #CamelStoreSummary object
*
- * Allocate a new camel message info, suitable for adding
- * to this summary.
+ * Allocate a new #CamelStoreInfo, suitable for adding to this
+ * summary.
*
- * Return value:
+ * Returns the newly allocated #CamelStoreInfo
**/
CamelStoreInfo *
camel_store_summary_info_new(CamelStoreSummary *s)
{
- CamelStoreInfo *mi;
+ CamelStoreInfo *info;
CAMEL_STORE_SUMMARY_LOCK(s, alloc_lock);
if (s->store_info_chunks == NULL)
s->store_info_chunks = e_memchunk_new(32, s->store_info_size);
- mi = e_memchunk_alloc0(s->store_info_chunks);
+ info = e_memchunk_alloc0(s->store_info_chunks);
CAMEL_STORE_SUMMARY_UNLOCK(s, alloc_lock);
- mi->refcount = 1;
- return mi;
+ info->refcount = 1;
+ return info;
}
-const char *camel_store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
+
+/**
+ * camel_store_info_string:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
+ * @type: specific string being requested
+ *
+ * Get a specific string from the @info.
+ *
+ * Returns the string value
+ **/
+const char *
+camel_store_info_string(CamelStoreSummary *s, const CamelStoreInfo *info, int type)
{
- return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_string(s, mi, type);
+ return ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_string(s, info, type);
}
-void camel_store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *value)
+
+/**
+ * camel_store_info_set_string:
+ * @summary: a #CamelStoreSummary object
+ * @info: a #CamelStoreInfo
+ * @type: specific string being set
+ * @value: string value to set
+ *
+ * Set a specific string on the @info.
+ **/
+void
+camel_store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *info, int type, const char *value)
{
- ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_set_string(s, mi, type, value);
+ ((CamelStoreSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->store_info_set_string(s, info, type, value);
}
static CamelStoreInfo *
store_info_new(CamelStoreSummary *s, const char *f)
{
- CamelStoreInfo *mi;
+ CamelStoreInfo *info;
- mi = camel_store_summary_info_new(s);
+ info = camel_store_summary_info_new(s);
- mi->path = g_strdup(f);
- mi->unread = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
- mi->total = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
+ info->path = g_strdup(f);
+ info->unread = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
+ info->total = CAMEL_STORE_INFO_FOLDER_UNKNOWN;
- return mi;
+ return info;
}
static CamelStoreInfo *
store_info_load(CamelStoreSummary *s, FILE *in)
{
- CamelStoreInfo *mi;
+ CamelStoreInfo *info;
- mi = camel_store_summary_info_new(s);
+ info = camel_store_summary_info_new(s);
io(printf("Loading folder info\n"));
- camel_file_util_decode_string(in, &mi->path);
- camel_file_util_decode_uint32(in, &mi->flags);
- camel_file_util_decode_uint32(in, &mi->unread);
- camel_file_util_decode_uint32(in, &mi->total);
+ camel_file_util_decode_string(in, &info->path);
+ camel_file_util_decode_uint32(in, &info->flags);
+ camel_file_util_decode_uint32(in, &info->unread);
+ camel_file_util_decode_uint32(in, &info->total);
/* Ok, brown paper bag bug - prior to version 2 of the file, flags are
stored using the bit number, not the bit. Try to recover as best we can */
if (s->version < CAMEL_STORE_SUMMARY_VERSION_2) {
guint32 flags = 0;
- if (mi->flags & 1)
+ if (info->flags & 1)
flags |= CAMEL_STORE_INFO_FOLDER_NOSELECT;
- if (mi->flags & 2)
+ if (info->flags & 2)
flags |= CAMEL_STORE_INFO_FOLDER_READONLY;
- if (mi->flags & 3)
+ if (info->flags & 3)
flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- if (mi->flags & 4)
+ if (info->flags & 4)
flags |= CAMEL_STORE_INFO_FOLDER_FLAGGED;
- mi->flags = flags;
+ info->flags = flags;
}
if (!ferror(in))
- return mi;
+ return info;
- camel_store_summary_info_free(s, mi);
+ camel_store_summary_info_free(s, info);
return NULL;
}
static int
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *info)
{
io(printf("Saving folder info\n"));
- camel_file_util_encode_string(out, camel_store_info_path(s, mi));
- camel_file_util_encode_uint32(out, mi->flags);
- camel_file_util_encode_uint32(out, mi->unread);
- camel_file_util_encode_uint32(out, mi->total);
+ camel_file_util_encode_string(out, camel_store_info_path(s, info));
+ camel_file_util_encode_uint32(out, info->flags);
+ camel_file_util_encode_uint32(out, info->unread);
+ camel_file_util_encode_uint32(out, info->total);
return ferror(out);
}
static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free(CamelStoreSummary *s, CamelStoreInfo *info)
{
- g_free(mi->path);
- g_free(mi->uri);
- e_memchunk_free(s->store_info_chunks, mi);
+ g_free(info->path);
+ g_free(info->uri);
+ e_memchunk_free(s->store_info_chunks, info);
}
static const char *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, int type)
+store_info_string(CamelStoreSummary *s, const CamelStoreInfo *info, int type)
{
const char *p;
/* FIXME: Locks? */
- g_assert (mi != NULL);
+ g_assert (info != NULL);
switch (type) {
case CAMEL_STORE_INFO_PATH:
- return mi->path;
+ return info->path;
case CAMEL_STORE_INFO_NAME:
- p = strrchr(mi->path, '/');
+ p = strrchr(info->path, '/');
if (p)
return p+1;
else
- return mi->path;
+ return info->path;
case CAMEL_STORE_INFO_URI:
- if (mi->uri == NULL) {
+ if (info->uri == NULL) {
CamelURL *uri;
- uri = camel_url_new_with_base(s->uri_base, mi->path);
- ((CamelStoreInfo *)mi)->uri = camel_url_to_string(uri, 0);
+ uri = camel_url_new_with_base(s->uri_base, info->path);
+ ((CamelStoreInfo *)info)->uri = camel_url_to_string(uri, 0);
camel_url_free(uri);
}
- return mi->uri;
+ return info->uri;
}
return "";
}
static void
-store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, int type, const char *str)
+store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *info, int type, const char *str)
{
const char *p;
char *v;
int len;
- g_assert (mi != NULL);
+ g_assert (info != NULL);
switch(type) {
case CAMEL_STORE_INFO_PATH:
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, mi));
- g_free(mi->path);
- g_free(mi->uri);
- mi->path = g_strdup(str);
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, mi), mi);
+ g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, info));
+ g_free(info->path);
+ g_free(info->uri);
+ info->path = g_strdup(str);
+ g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, info), info);
s->flags |= CAMEL_STORE_SUMMARY_DIRTY;
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
break;
case CAMEL_STORE_INFO_NAME:
CAMEL_STORE_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, mi));
- p = strrchr(mi->path, '/');
+ g_hash_table_remove(s->folders_path, (char *)camel_store_info_path(s, info));
+ p = strrchr(info->path, '/');
if (p) {
- len = p-mi->path+1;
+ len = p-info->path+1;
v = g_malloc(len+strlen(str)+1);
- memcpy(v, mi->path, len);
+ memcpy(v, info->path, len);
strcpy(v+len, str);
} else {
v = g_strdup(str);
}
- g_free(mi->path);
- mi->path = v;
- g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, mi), mi);
+ g_free(info->path);
+ info->path = v;
+ g_hash_table_insert(s->folders_path, (char *)camel_store_info_path(s, info), info);
CAMEL_STORE_SUMMARY_UNLOCK(s, summary_lock);
break;
case CAMEL_STORE_INFO_URI:
CamelType camel_store_summary_get_type (void);
CamelStoreSummary *camel_store_summary_new (void);
-void camel_store_summary_set_filename(CamelStoreSummary *, const char *);
-void camel_store_summary_set_uri_base(CamelStoreSummary *s, CamelURL *base);
+void camel_store_summary_set_filename(CamelStoreSummary *summary, const char *filename);
+void camel_store_summary_set_uri_base(CamelStoreSummary *summary, CamelURL *base);
/* load/save the summary in its entirety */
-int camel_store_summary_load(CamelStoreSummary *);
-int camel_store_summary_save(CamelStoreSummary *);
+int camel_store_summary_load(CamelStoreSummary *summary);
+int camel_store_summary_save(CamelStoreSummary *summary);
/* only load the header */
-int camel_store_summary_header_load(CamelStoreSummary *);
+int camel_store_summary_header_load(CamelStoreSummary *summary);
/* set the dirty bit on the summary */
-void camel_store_summary_touch(CamelStoreSummary *s);
+void camel_store_summary_touch(CamelStoreSummary *summary);
/* add a new raw summary item */
-void camel_store_summary_add(CamelStoreSummary *, CamelStoreInfo *info);
+void camel_store_summary_add(CamelStoreSummary *summary, CamelStoreInfo *info);
/* build/add raw summary items */
-CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *, const char *);
+CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *summary, const char *path);
/* Just build raw summary items */
-CamelStoreInfo *camel_store_summary_info_new(CamelStoreSummary *s);
-CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *s, const char *);
+CamelStoreInfo *camel_store_summary_info_new(CamelStoreSummary *summary);
+CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *summary, const char *path);
-void camel_store_summary_info_ref(CamelStoreSummary *, CamelStoreInfo *);
-void camel_store_summary_info_free(CamelStoreSummary *, CamelStoreInfo *);
+void camel_store_summary_info_ref(CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_info_free(CamelStoreSummary *summary, CamelStoreInfo *info);
/* removes a summary item */
-void camel_store_summary_remove(CamelStoreSummary *s, CamelStoreInfo *info);
-void camel_store_summary_remove_path(CamelStoreSummary *s, const char *path);
-void camel_store_summary_remove_index(CamelStoreSummary *s, int);
+void camel_store_summary_remove(CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_remove_path(CamelStoreSummary *summary, const char *path);
+void camel_store_summary_remove_index(CamelStoreSummary *summary, int index);
/* remove all items */
-void camel_store_summary_clear(CamelStoreSummary *s);
+void camel_store_summary_clear(CamelStoreSummary *summary);
/* lookup functions */
-int camel_store_summary_count(CamelStoreSummary *);
-CamelStoreInfo *camel_store_summary_index(CamelStoreSummary *, int);
-CamelStoreInfo *camel_store_summary_path(CamelStoreSummary *, const char *path);
-GPtrArray *camel_store_summary_array(CamelStoreSummary *s);
-void camel_store_summary_array_free(CamelStoreSummary *s, GPtrArray *array);
-
-const char *camel_store_info_string(CamelStoreSummary *, const CamelStoreInfo *, int type);
-void camel_store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int type, const char *value);
+int camel_store_summary_count(CamelStoreSummary *summary);
+CamelStoreInfo *camel_store_summary_index(CamelStoreSummary *summary, int index);
+CamelStoreInfo *camel_store_summary_path(CamelStoreSummary *summary, const char *path);
+GPtrArray *camel_store_summary_array(CamelStoreSummary *summary);
+void camel_store_summary_array_free(CamelStoreSummary *summary, GPtrArray *array);
+
+const char *camel_store_info_string(CamelStoreSummary *summary, const CamelStoreInfo *info, int type);
+void camel_store_info_set_string(CamelStoreSummary *summary, CamelStoreInfo *info, int type, const char *value);
/* helper macro's */
#define camel_store_info_path(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_PATH))
/**
* camel_vtrash_folder_new:
- * @parent_store: the parent CamelVeeStore
- * @type: type of vfolder, CAMEL_VTRASH_FOLDER_TRASH or CAMEL_VTRASH_FOLDER_JUNK currently.
- * @ex: a CamelException
+ * @parent_store: the parent #CamelVeeStore object
+ * @type: type of vfolder, #CAMEL_VTRASH_FOLDER_TRASH or #CAMEL_VTRASH_FOLDER_JUNK currently.
+ * @ex: a #CamelException
*
- * Create a new CamelVeeFolder object.
+ * Create a new CamelVTrashFolder object.
*
- * Return value: A new CamelVeeFolder widget.
+ * Returns a new #CamelVTrashFolder object
**/
CamelFolder *
camel_vtrash_folder_new (CamelStore *parent_store, camel_vtrash_folder_t type)