Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Modules | Data Structures | Macros | Typedefs

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...
 

Typedefs

typedef void(* afw_adaptor_session_destroy_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
typedef const afw_adaptor_transaction_t *(* afw_adaptor_session_begin_transaction_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
 
typedef const afw_adaptor_journal_t *(* afw_adaptor_session_get_journal_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
 
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)
 
typedef const afw_adaptor_impl_index_t *(* afw_adaptor_session_get_index_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
 
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)
 

Detailed Description

Adaptor session interface.

Macro Definition Documentation

◆ afw_adaptor_session_add_object

#define afw_adaptor_session_add_object (   instance,
  impl_request,
  object_type_id,
  suggested_object_id,
  object,
  adaptor_type_specific,
  xctx 
)
Value:
(instance)->inf->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.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idObject type of object to add.
suggested_object_idThe 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.
objectObject 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_specificThis 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.
xctxThis is the caller's xctx.

Definition at line 662 of file afw_interface.h.

◆ afw_adaptor_session_begin_transaction

#define afw_adaptor_session_begin_transaction (   instance,
  xctx 
)
Value:
(instance)->inf->begin_transaction( \
(instance), \
(xctx) \
)

Call method begin_transaction of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
xctxThis is the caller's xctx.

Definition at line 791 of file afw_interface.h.

◆ afw_adaptor_session_delete_object

#define afw_adaptor_session_delete_object (   instance,
  impl_request,
  object_type_id,
  object_id,
  adaptor_type_specific,
  xctx 
)
Value:
(instance)->inf->delete_object( \
(instance), \
(impl_request), \
(object_type_id), \
(object_id), \
(adaptor_type_specific), \
(xctx) \
)

Call method delete_object of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idObject type of object to delete.
object_idObject id of object to delete.
adaptor_type_specificThis 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.
xctxThis is the caller's xctx.

Definition at line 769 of file afw_interface.h.

◆ afw_adaptor_session_destroy

#define afw_adaptor_session_destroy (   instance,
  xctx 
)
Value:
(instance)->inf->destroy( \
(instance), \
(xctx) \
)

Call method destroy of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance. Make sure to call commit or changes will be lost.
xctxThis is the caller's xctx.

Definition at line 526 of file afw_interface.h.

◆ afw_adaptor_session_get_index_interface

#define afw_adaptor_session_get_index_interface (   instance,
  xctx 
)
Value:
(instance)->inf->get_index_interface( \
(instance), \
(xctx) \
)

Call method get_index_interface of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
xctxThis is the caller's xctx.

Definition at line 833 of file afw_interface.h.

◆ afw_adaptor_session_get_journal_interface

#define afw_adaptor_session_get_journal_interface (   instance,
  xctx 
)
Value:
(instance)->inf->get_journal_interface( \
(instance), \
(xctx) \
)

Call method get_journal_interface of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
xctxThis is the caller's xctx.

Definition at line 805 of file afw_interface.h.

◆ afw_adaptor_session_get_key_value_interface

#define afw_adaptor_session_get_key_value_interface (   instance,
  xctx 
)
Value:
(instance)->inf->get_key_value_interface( \
(instance), \
(xctx) \
)

Call method get_key_value_interface of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
xctxThis is the caller's xctx.

Definition at line 819 of file afw_interface.h.

◆ afw_adaptor_session_get_object

#define afw_adaptor_session_get_object (   instance,
  impl_request,
  object_type_id,
  object_id,
  context,
  callback,
  adaptor_type_specific,
  p,
  xctx 
)
Value:
(instance)->inf->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.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idObject type of object to get.
object_idObject id of object to get.
contextPointer passed to callback routine.
callbackCallback 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_specificThis 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.
pPool used for object passed to callback.
xctxThis is the caller's xctx.

Definition at line 609 of file afw_interface.h.

◆ afw_adaptor_session_get_object_type_cache_interface

#define afw_adaptor_session_get_object_type_cache_interface (   instance,
  xctx 
)
Value:
(instance)->inf->get_object_type_cache_interface( \
(instance), \
(xctx) \
)

Call method get_object_type_cache_interface of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
xctxThis is the caller's xctx.

Definition at line 848 of file afw_interface.h.

◆ afw_adaptor_session_modify_object

#define afw_adaptor_session_modify_object (   instance,
  impl_request,
  object_type_id,
  object_id,
  entry,
  adaptor_type_specific,
  xctx 
)
Value:
(instance)->inf->modify_object( \
(instance), \
(impl_request), \
(object_type_id), \
(object_id), \
(entry), \
(adaptor_type_specific), \
(xctx) \
)

Call method modify_object of interface afw_adaptor_session.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idObject type of object to modify.
object_idObject id of object to modify.
entryNULL terminated list of pointers to adaptor modify entries.
adaptor_type_specificThis 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.
xctxThis is the caller's xctx.

Definition at line 698 of file afw_interface.h.

◆ afw_adaptor_session_replace_object

#define afw_adaptor_session_replace_object (   instance,
  impl_request,
  object_type_id,
  object_id,
  replacement_object,
  adaptor_type_specific,
  xctx 
)
Value:
(instance)->inf->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.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idObject type of object to update.
object_idObject id of object to update.
replacement_objectReplacement object.
adaptor_type_specificThis 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.
xctxThis is the caller's xctx.

Definition at line 734 of file afw_interface.h.

◆ afw_adaptor_session_retrieve_objects

#define afw_adaptor_session_retrieve_objects (   instance,
  impl_request,
  object_type_id,
  criteria,
  context,
  callback,
  adaptor_type_specific,
  p,
  xctx 
)
Value:
(instance)->inf->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.

Parameters
instancePointer to this adaptor session instance.
impl_requestPass this as first parameter of afw_adaptor_impl_request_*() functions. See afw_adaptor_impl.h for more information.
object_type_idThe object type of objects to be retrieved.
criteriaQuery 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.
contextPointer passed to callback routine.
callbackCallback 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_specificThis 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.
pPool used for objects passed to callback.
xctxThis is the caller's xctx.

Definition at line 562 of file afw_interface.h.

Typedef Documentation

◆ afw_adaptor_session_add_object_t

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)
See also
afw_adaptor_session_add_object()

Definition at line 431 of file afw_interface.h.

◆ afw_adaptor_session_begin_transaction_t

typedef const afw_adaptor_transaction_t*(* afw_adaptor_session_begin_transaction_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
See also
afw_adaptor_session_begin_transaction()

Definition at line 474 of file afw_interface.h.

◆ afw_adaptor_session_delete_object_t

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)
See also
afw_adaptor_session_delete_object()

Definition at line 464 of file afw_interface.h.

◆ afw_adaptor_session_destroy_t

typedef void(* afw_adaptor_session_destroy_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
See also
afw_adaptor_session_destroy()

Definition at line 399 of file afw_interface.h.

◆ afw_adaptor_session_get_index_interface_t

typedef const afw_adaptor_impl_index_t*(* afw_adaptor_session_get_index_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
See also
afw_adaptor_session_get_index_interface()

Definition at line 492 of file afw_interface.h.

◆ afw_adaptor_session_get_journal_interface_t

typedef const afw_adaptor_journal_t*(* afw_adaptor_session_get_journal_interface_t) (const afw_adaptor_session_t *instance, afw_xctx_t *xctx)

◆ afw_adaptor_session_get_key_value_interface_t

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)

◆ afw_adaptor_session_get_object_t

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)
See also
afw_adaptor_session_get_object()

Definition at line 418 of file afw_interface.h.

◆ afw_adaptor_session_get_object_type_cache_interface_t

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)

◆ afw_adaptor_session_modify_object_t

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)
See also
afw_adaptor_session_modify_object()

Definition at line 442 of file afw_interface.h.

◆ afw_adaptor_session_replace_object_t

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)
See also
afw_adaptor_session_replace_object()

Definition at line 453 of file afw_interface.h.

◆ afw_adaptor_session_retrieve_objects_t

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)
See also
afw_adaptor_session_retrieve_objects()

Definition at line 405 of file afw_interface.h.