Gck.ObjectCache¶
- Implementations:
None
Methods¶
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
PKCS#11 Attributes |
Signals¶
None
Fields¶
None
Class Details¶
- class Gck.ObjectCache¶
- Bases:
- Structure:
An interface implemented by derived classes of [class`Object`] 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 [property`ObjectCache`:py:data::attributes<Gck.ObjectCache.props.attributes>] property.
- fill(attrs)[source]¶
- Parameters:
attrs (
Gck.Attributes
) – the attributes to cache
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.
- set_attributes(attrs)[source]¶
- Parameters:
attrs (
Gck.Attributes
orNone
) – the attributes to set
Sets the attributes cached on this object.
- update(attr_types, cancellable)[source]¶
- Parameters:
attr_types ([
int
]) – the types of attributes to updatecancellable (
Gio.Cancellable
orNone
) – optional cancellation object
- Raises:
- Returns:
whether the cache update was successful
- Return type:
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
- update_async(attr_types, cancellable, callback, *user_data)[source]¶
- Parameters:
attr_types ([
int
]) – the types of attributes to updatecancellable (
Gio.Cancellable
orNone
) – optional cancellation objectcallback (
Gio.AsyncReadyCallback
orNone
) – called when the operation completesuser_data (
object
orNone
) – data to be passed to the callback
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.
- update_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – the asynchronous result passed to the callback- Raises:
- Returns:
whether the cache update was successful
- Return type:
Complete an asynchronous operation to update the object cache with given attributes.
- do_fill(attrs) virtual¶
- Parameters:
attrs (
Gck.Attributes
) – the attributes to cache
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.
Property Details¶
- Gck.ObjectCache.props.attributes¶
- Name:
attributes
- Type:
- Default Value:
- Flags:
The attributes cached on this object.