« Previous -
Version 3/18
(diff) -
Next » -
Current version
Julien Kerihuel, 2011-10-13 01:34 pm
MAPIStore 1.0 backend.folder structure¶
folder.open_folder¶
This function opens a folder in the backend. It should only perform an action when the folder is not a root/mapistore folder (referenced in openchange.ldb), since these specific root folders are opened during context creation and morphed/returned as a folder object when context.get_root_folder returns.
For any folders within a backend and different from the root folder, the folder should be opened. The function takes in parameter:- void *parent_folder: the parent folder object of the folder to open
- TALLOC_CTX *: a memory context to allocate folder_object with
- uint64_t fid: the folder identifier of the folder to open
- void **folder_object: the opened folder object to return
Folders are opened within a given context, which folder object is retrieved through context.get_root_folder call. While this specifically apply to folder underneath the root folder, the same logic apply to sub folders which parent is not the root folder object within the context. It requires either to keep a reference to the root folder along newly created folder objects or be able to walk through the associated MAPIStore URI and figure out what the root folder URI is.
folder.create_folder¶
This function only creates a folder within a existing context. The resulting created folder will have a URI using the same backend that the context it is using.