OCPF context API.
More...
Functions |
struct ocpf_context * | ocpf_context_add (struct ocpf *ocpf_ctx, const char *filename, uint32_t *context_id, uint8_t flags, bool *existing) |
int | ocpf_context_delete (struct ocpf *ocpf_ctx, struct ocpf_context *ctx) |
stat h stat h struct ocpf_context * | ocpf_context_init (TALLOC_CTX *mem_ctx, const char *filename, uint8_t flags, uint32_t context_id) |
struct ocpf_context * | ocpf_context_search_by_context_id (struct ocpf_context *ctx, uint32_t context_id) |
struct ocpf_context * | ocpf_context_search_by_filename (struct ocpf_context *ctx, const char *filename) |
Detailed Description
Function Documentation
struct ocpf_context* ocpf_context_add |
( |
struct ocpf * |
ocpf_ctx, |
|
|
const char * |
filename, |
|
|
uint32_t * |
context_id, |
|
|
uint8_t |
flags, |
|
|
bool * |
existing |
|
) |
| |
|
read |
Add an OCPF context to the list
- Parameters
-
ocpf_ctx | pointer to the global ocpf context |
filename | pointer to the |
context_id | pointer to the context_id the function returns |
flags | Flags controlling how the OCPF should be opened |
existing | boolean returned by the function to specify if the context was already existing or not |
- Returns
- valid ocpf context pointer on success, otherwise NULL
References ocpf_context_init().
Referenced by ocpf_new_context().
int ocpf_context_delete |
( |
struct ocpf * |
ocpf_ctx, |
|
|
struct ocpf_context * |
ctx |
|
) |
| |
Delete an OCPF context
- Parameters
-
ocpf_ctx | pointer to the global ocpf context |
ctx | pointer to the OCPF context to delete |
- Returns
- 0 on success, 1 if there were still a ref_count, otherwise -1 on errors.
Referenced by ocpf_del_context().
stat h stat h struct ocpf_context* ocpf_context_init |
( |
TALLOC_CTX * |
mem_ctx, |
|
|
const char * |
filename, |
|
|
uint8_t |
flags, |
|
|
uint32_t |
context_id |
|
) |
| |
|
read |
Initialize a new OCPF context
- Parameters
-
mem_ctx | pointer to the memory context |
filename | the OCPF filename used for this context |
flags | Flags controlling how the OCPF should be opened |
context_id | the identifier representing the context |
context_id | the context identifier to use for this context |
- Returns
- new allocated OCPF context on success, otherwise NULL
References ctx.
Referenced by ocpf_context_add().
struct ocpf_context* ocpf_context_search_by_context_id |
( |
struct ocpf_context * |
ctx, |
|
|
uint32_t |
context_id |
|
) |
| |
|
read |
Search a context given its context identifier
- Parameters
-
ctx | pointer to the ocpf context list |
context_id | the context identifier to use for search |
- Returns
- pointer to valid ocpf context on success, otherwise NULL
Referenced by ocpf_clear_props(), ocpf_del_context(), ocpf_dump_folder(), ocpf_dump_named_property(), ocpf_dump_oleguid(), ocpf_dump_property(), ocpf_dump_recipients(), ocpf_dump_type(), ocpf_dump_variable(), ocpf_get_recipients(), ocpf_get_SPropValue(), ocpf_OpenFolder(), ocpf_parse(), ocpf_server_add_SPropValue(), ocpf_server_set_SPropValue(), ocpf_server_set_type(), ocpf_server_sync(), ocpf_set_Recipients(), ocpf_set_SPropValue(), ocpf_write_auto(), ocpf_write_commit(), and ocpf_write_init().
struct ocpf_context* ocpf_context_search_by_filename |
( |
struct ocpf_context * |
ctx, |
|
|
const char * |
filename |
|
) |
| |
|
read |
Search a context given its filename
- Parameters
-
ctx | pointer to the ocpf context list |
filename | the filename to use for search |
- Returns
- pointer to valid ocpf context on success, otherwise NULL