Item
Object Hierarchy:
Secret.Item
Secret.Item
Secret.Item
GLib.DBusProxy
GLib.DBusProxy
GLib.DBusProxy->Secret.Item
GLib.Object
GLib.Object
GLib.Object->GLib.DBusProxy
GLib.AsyncInitable
GLib.AsyncInitable
GLib.AsyncInitable->Secret.Item
GLib.AsyncInitable->GLib.DBusProxy
GLib.DBusInterface
GLib.DBusInterface
GLib.DBusInterface->Secret.Item
GLib.DBusInterface->GLib.DBusProxy
GLib.Initable
GLib.Initable
GLib.Initable->Secret.Item
GLib.Initable->GLib.DBusProxy
Secret.Retrievable
Secret.Retrievable
Secret.Retrievable->Secret.Item
Description:
[
CCode ( type_id =
"secret_item_get_type ()" ) ]
public class Item :
DBusProxy ,
AsyncInitable ,
DBusInterface ,
Initable ,
Retrievable
A secret item
Item represents a secret item stored in the Secret Service.
Each item has a value, represented by a [structValue
], which can be retrieved by [methodItem.get_secret
] or set
by [methodItem.set_secret
]. The item is only available when the item is not locked.
Items can be locked or unlocked using the [methodService.lock
] or [methodService.unlock
] functions. The Secret
Service may not be able to unlock individual items, and may unlock an entire collection when a single item is unlocked.
Each item has a set of attributes, which are used to locate the item later. These are not stored or transferred in a secure manner. Each
attribute has a string name and a string value. Use [methodService.search
] to search for items based on their attributes, and
[methodItem.set_attributes
] to change the attributes associated with an item.
Items can be created with [funcItem.create
] or [methodService.store
].
Content:
Properties:
public ItemFlags flags { get ; construct ; }
A set of flags describing which parts of the secret item have been
initialized.
public bool locked { get ; }
Whether the item is locked or not.
public Service service { get ; construct ; }
The [classService
] object that this item is associated
with and uses to interact with the actual D-Bus Secret Service.
Static methods:
public static async Item create (Collection collection, Schema ? schema, HashTable <string ,string > attributes, string label, Value value, ItemCreateFlags flags, Cancellable ? cancellable) throws Error
Create a new item in the secret service.
public static Item create_sync (Collection collection, Schema ? schema, HashTable <string ,string > attributes, string label, Value value, ItemCreateFlags flags, Cancellable ? cancellable = null ) throws Error
Create a new item in the secret service.
public static async bool load_secrets (List <Item > items, Cancellable ? cancellable) throws Error
Load the secret values for a secret item stored in the service.
public static bool load_secrets_sync (List <Item > items, Cancellable ? cancellable = null ) throws Error
Load the secret values for a secret item stored in the service.
Creation methods:
Methods:
public async bool @delete (Cancellable ? cancellable) throws Error
Delete this item.
public bool delete_sync (Cancellable ? cancellable = null ) throws Error
Delete this secret item.
public HashTable <string ,string > get_attributes ()
Set the attributes of this item.
public uint64 get_created ()
Get the created date and time of the item.
public ItemFlags get_flags ()
Get the flags representing what features of the
Item proxy have been initialized.
public string get_label ()
Get the label of this item.
public bool get_locked ()
Get whether the item is locked or not.
public uint64 get_modified ()
Get the modified date and time of the item.
public string ? get_schema_name ()
Gets the name of the schema that this item was stored with.
public Value ? get_secret ()
Get the secret value of this item.
public unowned Service get_service ()
Get the Secret Service object that this item was created with.
public async bool load_secret (Cancellable ? cancellable) throws Error
Load the secret value of this item.
public bool load_secret_sync (Cancellable ? cancellable = null ) throws Error
Load the secret value of this item.
public void refresh ()
Refresh the properties on this item.
public async bool set_attributes (Schema ? schema, HashTable <string ,string > attributes, Cancellable ? cancellable) throws Error
Set the attributes of this item.
public bool set_attributes_sync (Schema ? schema, HashTable <string ,string > attributes, Cancellable ? cancellable = null ) throws Error
Set the attributes of this item.
public async bool set_label (string label, Cancellable ? cancellable) throws Error
Set the label of this item.
public bool set_label_sync (string label, Cancellable ? cancellable = null ) throws Error
Set the label of this item.
public async bool set_secret (Value value, Cancellable ? cancellable) throws Error
Set the secret value of this item.
public bool set_secret_sync (Value value, Cancellable ? cancellable = null ) throws Error
Set the secret value of this item.
Inherited Members:
All known members inherited from class GLib.DBusProxy
@new
call
call_sync
call_with_unix_fd_list
call_with_unix_fd_list_sync
create_for_bus
g_bus_type
g_connection
g_default_timeout
g_flags
g_interface_info
g_interface_name
g_name
g_name_owner
g_object_path
g_properties_changed
g_signal
get_cached_property
get_cached_property_names
get_connection
get_default_timeout
get_flags
get_interface_info
get_interface_name
get_name
get_name_owner
get_object_path
set_cached_property
set_default_timeout
set_interface_info
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.DBusInterface
All known members inherited from interface GLib.Initable
All known members inherited from interface Secret.Retrievable