Asterisk - The Open Source Telephony Project GIT-master-f36a736
Data Fields
ast_sorcery_wizard Struct Reference

Interface for a sorcery wizard. More...

#include <sorcery.h>

Collaboration diagram for ast_sorcery_wizard:
Collaboration graph
[legend]

Data Fields

void(* close )(void *data)
 Callback for closing a wizard. More...
 
int(* create )(const struct ast_sorcery *sorcery, void *data, void *object)
 Callback for creating an object. More...
 
int(* delete )(const struct ast_sorcery *sorcery, void *data, void *object)
 Callback for deleting an object. More...
 
void(* force_reload )(void *data, const struct ast_sorcery *sorcery, const char *type)
 Optional callback for forcing a reload to occur, even if wizard has determined no changes. More...
 
int(* is_stale )(const struct ast_sorcery *sorcery, void *data, void *object)
 Callback for whether or not the wizard believes the object is stale. More...
 
void(* load )(void *data, const struct ast_sorcery *sorcery, const char *type)
 Optional callback for loading persistent objects. More...
 
struct ast_modulemodule
 Pointer to the Asterisk module this wizard is implemented by. More...
 
const char * name
 Name of the wizard. More...
 
void *(* open )(const char *data)
 Callback for opening a wizard. More...
 
void(* reload )(void *data, const struct ast_sorcery *sorcery, const char *type)
 Optional callback for reloading persistent objects. More...
 
void *(* retrieve_fields )(const struct ast_sorcery *sorcery, void *data, const char *type, const struct ast_variable *fields)
 Optional callback for retrieving an object using fields. More...
 
void *(* retrieve_id )(const struct ast_sorcery *sorcery, void *data, const char *type, const char *id)
 Callback for retrieving an object using an id. More...
 
void(* retrieve_multiple )(const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields)
 Optional callback for retrieving multiple objects using some optional field criteria. More...
 
void(* retrieve_prefix )(const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *prefix, const size_t prefix_len)
 Optional callback for retrieving multiple objects by matching their id with a prefix. More...
 
void(* retrieve_regex )(const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex)
 Callback for retrieving multiple objects using a regex on their id. More...
 
int(* update )(const struct ast_sorcery *sorcery, void *data, void *object)
 Callback for updating an object. More...
 

Detailed Description

Interface for a sorcery wizard.

Definition at line 276 of file sorcery.h.

Field Documentation

◆ close

void(* close) (void *data)

Callback for closing a wizard.

Definition at line 322 of file sorcery.h.

Referenced by AST_TEST_DEFINE(), and sorcery_object_wizard_destructor().

◆ create

int(* create) (const struct ast_sorcery *sorcery, void *data, void *object)

◆ delete

int(* delete) (const struct ast_sorcery *sorcery, void *data, void *object)

◆ force_reload

void(* force_reload) (void *data, const struct ast_sorcery *sorcery, const char *type)

Optional callback for forcing a reload to occur, even if wizard has determined no changes.

Definition at line 328 of file sorcery.h.

Referenced by sorcery_wizard_load().

◆ is_stale

int(* is_stale) (const struct ast_sorcery *sorcery, void *data, void *object)

Callback for whether or not the wizard believes the object is stale.

Definition at line 325 of file sorcery.h.

Referenced by ast_sorcery_is_stale(), and bucket_wizard_is_stale().

◆ load

void(* load) (void *data, const struct ast_sorcery *sorcery, const char *type)

Optional callback for loading persistent objects.

Definition at line 287 of file sorcery.h.

Referenced by ApiDeclaration::load_file(), ResourceListing::load_file(), and sorcery_wizard_load().

◆ module

struct ast_module* module

Pointer to the Asterisk module this wizard is implemented by.

Definition at line 281 of file sorcery.h.

Referenced by __ast_bucket_scheme_register(), __ast_sorcery_wizard_register(), and sorcery_object_wizard_destructor().

◆ name

const char* name

◆ open

void *(* open) (const char *data)

Callback for opening a wizard.

Definition at line 284 of file sorcery.h.

◆ reload

void(* reload) (void *data, const struct ast_sorcery *sorcery, const char *type)

Optional callback for reloading persistent objects.

Definition at line 290 of file sorcery.h.

Referenced by sorcery_wizard_load().

◆ retrieve_fields

void *(* retrieve_fields) (const struct ast_sorcery *sorcery, void *data, const char *type, const struct ast_variable *fields)

Optional callback for retrieving an object using fields.

Definition at line 310 of file sorcery.h.

Referenced by ast_sorcery_retrieve_by_fields().

◆ retrieve_id

void *(* retrieve_id) (const struct ast_sorcery *sorcery, void *data, const char *type, const char *id)

Callback for retrieving an object using an id.

Definition at line 296 of file sorcery.h.

Referenced by __ast_bucket_scheme_register(), ast_sorcery_retrieve_by_id(), handle_auth(), handle_identify(), and handle_phoneprov().

◆ retrieve_multiple

void(* retrieve_multiple) (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields)

Optional callback for retrieving multiple objects using some optional field criteria.

Definition at line 313 of file sorcery.h.

Referenced by ast_sorcery_retrieve_by_fields(), handle_registrations(), and object_type_loaded_observer().

◆ retrieve_prefix

void(* retrieve_prefix) (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *prefix, const size_t prefix_len)

Optional callback for retrieving multiple objects by matching their id with a prefix.

Definition at line 302 of file sorcery.h.

Referenced by ast_sorcery_retrieve_by_prefix().

◆ retrieve_regex

void(* retrieve_regex) (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex)

Callback for retrieving multiple objects using a regex on their id.

Definition at line 299 of file sorcery.h.

Referenced by ast_sorcery_retrieve_by_regex().

◆ update

int(* update) (const struct ast_sorcery *sorcery, void *data, void *object)

Callback for updating an object.

Definition at line 316 of file sorcery.h.

Referenced by handle_aor(), handle_auth(), handle_endpoint(), handle_identify(), handle_phoneprov(), handle_registrations(), and sorcery_wizard_update().


The documentation for this struct was generated from the following file: