Top |
Functions
GckAttributes * | gck_object_cache_get_attributes () |
void | gck_object_cache_set_attributes () |
void | gck_object_cache_fill () |
GckAttributes * | gck_object_cache_lookup () |
void | gck_object_cache_lookup_async () |
GckAttributes * | gck_object_cache_lookup_finish () |
gboolean | gck_object_cache_update () |
void | gck_object_cache_update_async () |
gboolean | gck_object_cache_update_finish () |
Description
GckObjectCache is an interface implemented by derived classes of GckObject to indicate which attributes they'd like an enumerator to retrieve. These attributes are then cached on the object and can be retrieved through the “attributes” property.
Functions
gck_object_cache_get_attributes ()
GckAttributes *
gck_object_cache_get_attributes (GckObjectCache *object
);
gck_object_cache_set_attributes ()
void gck_object_cache_set_attributes (GckObjectCache *object
,GckAttributes *attrs
);
Sets the attributes cached on this object.
If the attrs
GckAttributes is floating, it is consumed.
gck_object_cache_fill ()
void gck_object_cache_fill (GckObjectCache *object
,GckAttributes *attrs
);
Adds the attributes to the set cached on this object. If an attribute is already present in the cache it will be overridden by this value.
This will be done in a thread-safe manner.
If the attrs
GckAttributes is floating, it is consumed.
gck_object_cache_lookup ()
GckAttributes * gck_object_cache_lookup (GckObject *object
,const gulong *attr_types
,gint n_attr_types
,GCancellable *cancellable
,GError **error
);
Lookup attributes in the cache, or retrieve them from the object if necessary.
If object
is a GckObjectCache then this will lookup the attributes there
first if available, otherwise will read them from the object and update
the cache.
If object
is not a GckObjectCache, then the attributes will simply be
read from the object.
This may block, use the asynchronous version when this is not desirable
gck_object_cache_lookup_async ()
void gck_object_cache_lookup_async (GckObject *object
,const gulong *attr_types
,gint n_attr_types
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Lookup attributes in the cache, or retrieve them from the object if necessary.
If object
is a GckObjectCache then this will lookup the attributes there
first if available, otherwise will read them from the object and update
the cache.
If object
is not a GckObjectCache, then the attributes will simply be
read from the object.
This will return immediately and complete asynchronously
gck_object_cache_lookup_finish ()
GckAttributes * gck_object_cache_lookup_finish (GckObject *object
,GAsyncResult *result
,GError **error
);
Complete an operation to lookup attributes in the cache or retrieve them from the object if necessary.
gck_object_cache_update ()
gboolean gck_object_cache_update (GckObjectCache *object
,const gulong *attr_types
,gint n_attr_types
,GCancellable *cancellable
,GError **error
);
Update the object cache with given attributes. If an attribute already exists in the cache, it will be updated, and if it doesn't it will be added.
This may block, use the asynchronous version when this is not desirable
gck_object_cache_update_async ()
void gck_object_cache_update_async (GckObjectCache *object
,const gulong *attr_types
,gint n_attr_types
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Update the object cache with given attributes. If an attribute already exists in the cache, it will be updated, and if it doesn't it will be added.
This call will return immediately and complete asynchronously.
gck_object_cache_update_finish ()
gboolean gck_object_cache_update_finish (GckObjectCache *object
,GAsyncResult *result
,GError **error
);
Complete an asynchronous operation to update the object cache with given attributes.
Types and Values
GckObjectCache
typedef struct _GckObjectCache GckObjectCache;
An interface implemented on an GckObject which contains a cache of attributes.
struct GckObjectCacheIface
struct GckObjectCacheIface { GTypeInterface interface; const gulong * default_types; gint n_default_types; void (* fill) (GckObjectCache *object, GckAttributes *attrs); };
Interface for GckObjectCache. If the default_types
field is set by
a implementing class, then the a GckEnumerator which has been setup using
gck_enumerator_set_object_type()
The implementation for populate
should add the attributes to the
cache. It must be thread safe.
Property Details
The “attributes”
property
“attributes” GckAttributes *
The attributes cached on this object.
Flags: Read / Write