Adaptive Framework
0.9.0
|
Modules | |
afw_adaptor_session | |
Data Structures | |
struct | afw_adaptor_session_s |
Interface afw_adaptor_session public struct. More... | |
struct | afw_adaptor_session_inf_s |
Interface afw_adaptor_session_inf_s struct. More... | |
Macros | |
#define | AFW_ADAPTOR_SESSION_INTERFACE_NAME "afw_adaptor_session" |
define for interface afw_adaptor_session name. | |
#define | afw_adaptor_session_destroy(instance, xctx) |
Call method destroy of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_retrieve_objects(instance, impl_request, object_type_id, criteria, context, callback, adaptor_type_specific, p, xctx) |
Call method retrieve_objects of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_get_object(instance, impl_request, object_type_id, object_id, context, callback, adaptor_type_specific, p, xctx) |
Call method get_object of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_add_object(instance, impl_request, object_type_id, suggested_object_id, object, adaptor_type_specific, xctx) |
Call method add_object of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_modify_object(instance, impl_request, object_type_id, object_id, entry, adaptor_type_specific, xctx) |
Call method modify_object of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_replace_object(instance, impl_request, object_type_id, object_id, replacement_object, adaptor_type_specific, xctx) |
Call method replace_object of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_delete_object(instance, impl_request, object_type_id, object_id, adaptor_type_specific, xctx) |
Call method delete_object of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_begin_transaction(instance, xctx) |
Call method begin_transaction of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_get_journal_interface(instance, xctx) |
Call method get_journal_interface of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_get_key_value_interface(instance, xctx) |
Call method get_key_value_interface of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_get_index_interface(instance, xctx) |
Call method get_index_interface of interface afw_adaptor_session. More... | |
#define | afw_adaptor_session_get_object_type_cache_interface(instance, xctx) |
Call method get_object_type_cache_interface of interface afw_adaptor_session. More... | |
Adaptor session interface.
#define afw_adaptor_session_add_object | ( | instance, | |
impl_request, | |||
object_type_id, | |||
suggested_object_id, | |||
object, | |||
adaptor_type_specific, | |||
xctx | |||
) |
Call method add_object of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | Object type of object to add. |
suggested_object_id | The suggested object id of the added object. This object id must be unique within the object type. If NULL or at the adaptor's option, the adaptor will generate a unique object id. |
object | Object to add. Unless documented otherwise by non-default options, this object only needs to exist for the life of the add_object() call. Some adaptors have options that require longer lifetimes for these objects. For example, a memory adaptor can be created with the option to not clone an object when added to memory store. In this case, it's the caller responsibility to create the object in a pool that has the minimal lifetime of the memory adaptor itself. For instance, the adaptor's pool can be used during object create. The memory adaptor then uses the object's pool's add_reference() and release() methods to manage the lifetime of the object. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_add_object where ${adaptorType} is the adaptor type id. |
xctx | This is the caller's xctx. |
Definition at line 662 of file afw_interface.h.
#define afw_adaptor_session_begin_transaction | ( | instance, | |
xctx | |||
) |
Call method begin_transaction of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
xctx | This is the caller's xctx. |
Definition at line 791 of file afw_interface.h.
#define afw_adaptor_session_delete_object | ( | instance, | |
impl_request, | |||
object_type_id, | |||
object_id, | |||
adaptor_type_specific, | |||
xctx | |||
) |
Call method delete_object of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | Object type of object to delete. |
object_id | Object id of object to delete. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_delete_object where ${adaptorType} is the adaptor type id. |
xctx | This is the caller's xctx. |
Definition at line 769 of file afw_interface.h.
#define afw_adaptor_session_destroy | ( | instance, | |
xctx | |||
) |
Call method destroy of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. Make sure to call commit or changes will be lost. |
xctx | This is the caller's xctx. |
Definition at line 526 of file afw_interface.h.
#define afw_adaptor_session_get_index_interface | ( | instance, | |
xctx | |||
) |
Call method get_index_interface of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
xctx | This is the caller's xctx. |
Definition at line 833 of file afw_interface.h.
#define afw_adaptor_session_get_journal_interface | ( | instance, | |
xctx | |||
) |
Call method get_journal_interface of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
xctx | This is the caller's xctx. |
Definition at line 805 of file afw_interface.h.
#define afw_adaptor_session_get_key_value_interface | ( | instance, | |
xctx | |||
) |
Call method get_key_value_interface of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
xctx | This is the caller's xctx. |
Definition at line 819 of file afw_interface.h.
#define afw_adaptor_session_get_object | ( | instance, | |
impl_request, | |||
object_type_id, | |||
object_id, | |||
context, | |||
callback, | |||
adaptor_type_specific, | |||
p, | |||
xctx | |||
) |
Call method get_object of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | Object type of object to get. |
object_id | Object id of object to get. |
context | Pointer passed to callback routine. |
callback | Callback function will be called once with either the object retrieved or a NULL object pointer if not found. The callback function will call afw_object_release() on the object when finished with it. If you want to have the object last past the callback, call afw_object_add_reference() on the object before calling the callback. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_get_object where ${adaptorType} is the adaptor type id. |
p | Pool used for object passed to callback. |
xctx | This is the caller's xctx. |
Definition at line 609 of file afw_interface.h.
#define afw_adaptor_session_get_object_type_cache_interface | ( | instance, | |
xctx | |||
) |
Call method get_object_type_cache_interface of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
xctx | This is the caller's xctx. |
Definition at line 848 of file afw_interface.h.
#define afw_adaptor_session_modify_object | ( | instance, | |
impl_request, | |||
object_type_id, | |||
object_id, | |||
entry, | |||
adaptor_type_specific, | |||
xctx | |||
) |
Call method modify_object of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | Object type of object to modify. |
object_id | Object id of object to modify. |
entry | NULL terminated list of pointers to adaptor modify entries. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_modify_object where ${adaptorType} is the adaptor type id. |
xctx | This is the caller's xctx. |
Definition at line 698 of file afw_interface.h.
#define afw_adaptor_session_replace_object | ( | instance, | |
impl_request, | |||
object_type_id, | |||
object_id, | |||
replacement_object, | |||
adaptor_type_specific, | |||
xctx | |||
) |
Call method replace_object of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | Object type of object to update. |
object_id | Object id of object to update. |
replacement_object | Replacement object. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_replace_object where ${adaptorType} is the adaptor type id. |
xctx | This is the caller's xctx. |
Definition at line 734 of file afw_interface.h.
#define afw_adaptor_session_retrieve_objects | ( | instance, | |
impl_request, | |||
object_type_id, | |||
criteria, | |||
context, | |||
callback, | |||
adaptor_type_specific, | |||
p, | |||
xctx | |||
) |
Call method retrieve_objects of interface afw_adaptor_session.
instance | Pointer to this adaptor session instance. |
impl_request | Pass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information. |
object_type_id | The object type of objects to be retrieved. |
criteria | Query criteria. Use member filter or normalized, whichever is easier, to filter the objects retrieved. See afw_query_criteria.h for more information. The other members should be ignored. |
context | Pointer passed to callback routine. |
callback | Callback function will be called each time an object is retrieved and once with a NULL object pointer when finished. The callback function will call afw_object_release() on the object when finished with it. If you want to have the object last past the callback, call afw_object_add_reference() on the object before calling the callback. |
adaptor_type_specific | This is an adaptor type specific object parameter or NULL. If the adaptor type supports this parameter, the object type of the object is available via the afw adaptor with an object type id of: AdaptiveAdaptorTypeSpecific${adaptorType}_retrieve_objects where ${adaptorType} is the adaptor type id. |
p | Pool used for objects passed to callback. |
xctx | This is the caller's xctx. |
Definition at line 562 of file afw_interface.h.
typedef const afw_utf8_t*(* afw_adaptor_session_add_object_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *suggested_object_id, const afw_object_t *object, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx) |
Definition at line 431 of file afw_interface.h.
typedef const afw_adaptor_transaction_t*(* afw_adaptor_session_begin_transaction_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 474 of file afw_interface.h.
typedef void(* afw_adaptor_session_delete_object_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx) |
Definition at line 464 of file afw_interface.h.
typedef void(* afw_adaptor_session_destroy_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 399 of file afw_interface.h.
typedef const afw_adaptor_impl_index_t*(* afw_adaptor_session_get_index_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 492 of file afw_interface.h.
typedef const afw_adaptor_journal_t*(* afw_adaptor_session_get_journal_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 480 of file afw_interface.h.
typedef const afw_adaptor_key_value_t*(* afw_adaptor_session_get_key_value_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 486 of file afw_interface.h.
typedef void(* afw_adaptor_session_get_object_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx) |
Definition at line 418 of file afw_interface.h.
typedef const afw_adaptor_object_type_cache_t*(* afw_adaptor_session_get_object_type_cache_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx) |
Definition at line 498 of file afw_interface.h.
typedef void(* afw_adaptor_session_modify_object_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_adaptor_modify_entry_t *const *entry, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx) |
Definition at line 442 of file afw_interface.h.
typedef void(* afw_adaptor_session_replace_object_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_object_t *replacement_object, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx) |
Definition at line 453 of file afw_interface.h.
typedef void(* afw_adaptor_session_retrieve_objects_t) (const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_query_criteria_t *criteria, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx) |
Definition at line 405 of file afw_interface.h.