Class Item
- All Implemented Interfaces:
AsyncInitable,DBusInterface,Initable,Retrievable,Proxy
SecretItem represents a secret item stored in the Secret Service.
Each item has a value, represented by a Value, which can be
retrieved by getSecret() or set by setSecret(org.gnome.secret.Value, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback).
The item is only available when the item is not locked.
Items can be locked or unlocked using the Service.lock(org.gnome.glib.List<org.gnome.gio.DBusProxy>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) or
Service.unlock(org.gnome.glib.List<org.gnome.gio.DBusProxy>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) 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 Service.search(org.gnome.secret.Schema, org.gnome.glib.HashTable<java.lang.String, java.lang.String>, java.util.Set<org.gnome.secret.SearchFlags>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) to search for
items based on their attributes, and setAttributes(org.gnome.secret.Schema, org.gnome.glib.HashTable<java.lang.String, java.lang.String>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) to change
the attributes associated with an item.
Items can be created with create(org.gnome.secret.Collection, org.gnome.secret.Schema, org.gnome.glib.HashTable<java.lang.String, java.lang.String>, java.lang.String, org.gnome.secret.Value, java.util.Set<org.gnome.secret.ItemCreateFlags>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback) or Service.store(org.gnome.secret.Schema, org.gnome.glib.HashTable<java.lang.String, java.lang.String>, java.lang.String, java.lang.String, org.gnome.secret.Value, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classItem.Builder<B extends Item.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classThe class forSecretItem.Nested classes/interfaces inherited from class org.gnome.gio.DBusProxy
DBusProxy.DBusProxyClass, DBusProxy.GPropertiesChangedCallback, DBusProxy.GSignalCallbackNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface org.gnome.gio.AsyncInitable
AsyncInitable.AsyncInitable$Impl, AsyncInitable.AsyncInitableIfaceNested classes/interfaces inherited from interface org.gnome.gio.DBusInterface
DBusInterface.DBusInterface$Impl, DBusInterface.DBusInterfaceIfaceNested classes/interfaces inherited from interface org.gnome.gio.Initable
Initable.Initable$Impl, Initable.InitableIfaceNested classes/interfaces inherited from interface org.gnome.secret.Retrievable
Retrievable.Retrievable$Impl, Retrievable.RetrievableInterface -
Constructor Summary
ConstructorsConstructorDescriptionItem()Creates a new Item.Item(MemorySegment address) Create a Item proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemasParent()Returns this instance as if it were its parent type.static Item.Builder<? extends Item.Builder> builder()AItem.Builderobject constructs aItemwith the specified properties.static voidcreate(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, Set<ItemCreateFlags> flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Create a new item in the secret service.static voidcreate(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, ItemCreateFlags flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Create a new item in the secret service.static ItemcreateFinish(AsyncResult result) Finish operation to create a new item in the secret service.static ItemcreateSync(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, Set<ItemCreateFlags> flags, @Nullable Cancellable cancellable) Create a new item in the secret service.static ItemcreateSync(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, ItemCreateFlags flags, @Nullable Cancellable cancellable) Create a new item in the secret service.voiddelete(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Delete this item.booleandeleteFinish(AsyncResult result) Complete asynchronous operation to delete the secret item.booleandeleteSync(@Nullable Cancellable cancellable) Delete this secret item.static ItemforDbusPathFinish(AsyncResult result) Finish asynchronous operation to get a new item proxy for a secret item in the secret service.static ItemforDbusPathSync(@Nullable Service service, String itemPath, Set<ItemFlags> flags, @Nullable Cancellable cancellable) Get a new item proxy for a secret item in the secret service.static ItemforDbusPathSync(@Nullable Service service, String itemPath, ItemFlags flags, @Nullable Cancellable cancellable) Get a new item proxy for a secret item in the secret service.Set the attributes of this item.longGet the created date and time of the item.Get the flags representing what features of theSecretItemproxy have been initialized.getLabel()Get the label of this item.booleanGet whether the item is locked or not.static MemoryLayoutThe memory layout of the native struct.longGet the modified date and time of the item.@Nullable StringGets the name of the schema that this item was stored with.@Nullable ValueGet the secret value of this item.Get the Secret Service object that this item was created with.static @Nullable TypegetType()Get the GType of the Item classvoidloadSecret(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Load the secret value of this item.booleanloadSecretFinish(AsyncResult result) Complete asynchronous operation to load the secret value of this item.static voidloadSecrets(List<Item> items, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Load the secret values for a secret item stored in the service.static booleanloadSecretsFinish(AsyncResult result) Complete asynchronous operation to load the secret values for secret items stored in the service.static booleanloadSecretsSync(List<Item> items, @Nullable Cancellable cancellable) Load the secret values for a secret item stored in the service.booleanloadSecretSync(@Nullable Cancellable cancellable) Load the secret value of this item.static voidnewForDbusPath(@Nullable Service service, String itemPath, Set<ItemFlags> flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Get a new item proxy for a secret item in the secret service.static voidnewForDbusPath(@Nullable Service service, String itemPath, ItemFlags flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Get a new item proxy for a secret item in the secret service.voidrefresh()Refresh the properties on this item.voidsetAttributes(@Nullable Schema schema, HashTable<String, String> attributes, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the attributes of this item.booleansetAttributesFinish(AsyncResult result) Complete operation to set the attributes of this item.booleansetAttributesSync(@Nullable Schema schema, HashTable<String, String> attributes, @Nullable Cancellable cancellable) Set the attributes of this item.voidsetLabel(String label, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the label of this item.booleansetLabelFinish(AsyncResult result) Complete asynchronous operation to set the label of this collection.booleansetLabelSync(String label, @Nullable Cancellable cancellable) Set the label of this item.voidsetSecret(Value value, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the secret value of this item.booleansetSecretFinish(AsyncResult result) Complete asynchronous operation to set the secret value of this item.booleansetSecretSync(Value value, @Nullable Cancellable cancellable) Set the secret value of this item.Methods inherited from class org.gnome.gio.DBusProxy
call, call, callFinish, callSync, callSync, callWithUnixFdList, callWithUnixFdList, callWithUnixFdListFinish, callWithUnixFdListSync, callWithUnixFdListSync, emitGPropertiesChanged, emitGSignal, finish, forBusFinish, forBusSync, forBusSync, getCachedProperty, getCachedPropertyNames, getConnection, getDefaultTimeout, getFlags, getInterfaceInfo, getInterfaceName, getName, getNameOwner, getObjectPath, gPropertiesChanged, gSignal, new_, new_, newForBus, newForBus, onGPropertiesChanged, onGSignal, setCachedProperty, setDefaultTimeout, setInterfaceInfo, sync, syncMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gio.AsyncInitable
initAsync, initFinishMethods inherited from interface org.gnome.gio.DBusInterface
getInfo, getObject, setObjectMethods inherited from interface org.gnome.secret.Retrievable
retrieveSecret, retrieveSecretFinish, retrieveSecretSync
-
Constructor Details
-
Item
Create a Item proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Item
public Item()Creates a new Item.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
forDbusPathFinish
Finish asynchronous operation to get a new item proxy for a secret item in the secret service.- Parameters:
result- the asynchronous result passed to the callback- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
forDbusPathSync
public static Item forDbusPathSync(@Nullable Service service, String itemPath, Set<ItemFlags> flags, @Nullable Cancellable cancellable) throws GErrorException Get a new item proxy for a secret item in the secret service.If
serviceisnull, thenService.getSync(java.util.Set<org.gnome.secret.ServiceFlags>, org.gnome.gio.Cancellable)will be called to get the defaultServiceproxy.This method may block indefinitely and should not be used in user interface threads.
- Parameters:
service- a secret service objectitemPath- the D-Bus path of the itemflags- initialization flags for the new itemcancellable- optional cancellation object- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
forDbusPathSync
public static Item forDbusPathSync(@Nullable Service service, String itemPath, ItemFlags flags, @Nullable Cancellable cancellable) throws GErrorException Get a new item proxy for a secret item in the secret service.If
serviceisnull, thenService.getSync(java.util.Set<org.gnome.secret.ServiceFlags>, org.gnome.gio.Cancellable)will be called to get the defaultServiceproxy.This method may block indefinitely and should not be used in user interface threads.
- Parameters:
service- a secret service objectitemPath- the D-Bus path of the itemflags- initialization flags for the new itemcancellable- optional cancellation object- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
create
public static void create(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, Set<ItemCreateFlags> flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Create a new item in the secret service.If the
flagscontainsItemCreateFlags.REPLACE, then the secret service will search for an item matching theattributes,and update that item instead of creating a new one.This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that are required.- Parameters:
collection- a secret collection to create this item inschema- the schema for the attributesattributes- attributes for the new itemlabel- label for the new itemvalue- secret value for the new itemflags- flags for the creation of the new itemcancellable- optional cancellation objectcallback- called when the operation completes
-
create
public static void create(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, ItemCreateFlags flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Create a new item in the secret service.If the
flagscontainsItemCreateFlags.REPLACE, then the secret service will search for an item matching theattributes,and update that item instead of creating a new one.This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that are required.- Parameters:
collection- a secret collection to create this item inschema- the schema for the attributesattributes- attributes for the new itemlabel- label for the new itemvalue- secret value for the new itemflags- flags for the creation of the new itemcancellable- optional cancellation objectcallback- called when the operation completes
-
createFinish
Finish operation to create a new item in the secret service.- Parameters:
result- the asynchronous result passed to the callback- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
createSync
public static Item createSync(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, Set<ItemCreateFlags> flags, @Nullable Cancellable cancellable) throws GErrorExceptionCreate a new item in the secret service.If the
flagscontainsItemCreateFlags.REPLACE, then the secret service will search for an item matching theattributes,and update that item instead of creating a new one.This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that are required.- Parameters:
collection- a secret collection to create this item inschema- the schema for the attributesattributes- attributes for the new itemlabel- label for the new itemvalue- secret value for the new itemflags- flags for the creation of the new itemcancellable- optional cancellation object- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
createSync
public static Item createSync(Collection collection, @Nullable Schema schema, HashTable<String, String> attributes, String label, Value value, ItemCreateFlags flags, @Nullable Cancellable cancellable) throws GErrorExceptionCreate a new item in the secret service.If the
flagscontainsItemCreateFlags.REPLACE, then the secret service will search for an item matching theattributes,and update that item instead of creating a new one.This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that are required.- Parameters:
collection- a secret collection to create this item inschema- the schema for the attributesattributes- attributes for the new itemlabel- label for the new itemvalue- secret value for the new itemflags- flags for the creation of the new itemcancellable- optional cancellation object- Returns:
- the new item, which should be unreferenced
with
GObject.unref() - Throws:
GErrorException- seeGError
-
loadSecrets
public static void loadSecrets(List<Item> items, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Load the secret values for a secret item stored in the service.The
itemsmust all have the sameItem:serviceproperty.This function returns immediately and completes asynchronously.
- Parameters:
items- the items to retrieve secrets forcancellable- optional cancellation objectcallback- called when the operation completes
-
loadSecretsFinish
Complete asynchronous operation to load the secret values for secret items stored in the service.Items that are locked will not have their secrets loaded.
- Parameters:
result- asynchronous result passed to callback- Returns:
- whether the operation succeeded or not
- Throws:
GErrorException- seeGError
-
loadSecretsSync
public static boolean loadSecretsSync(List<Item> items, @Nullable Cancellable cancellable) throws GErrorException Load the secret values for a secret item stored in the service.The
itemsmust all have the sameItem:serviceproperty.This method may block indefinitely and should not be used in user interface threads.
Items that are locked will not have their secrets loaded.
- Parameters:
items- the items to retrieve secrets forcancellable- optional cancellation object- Returns:
- whether the operation succeeded or not
- Throws:
GErrorException- seeGError
-
newForDbusPath
public static void newForDbusPath(@Nullable Service service, String itemPath, Set<ItemFlags> flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Get a new item proxy for a secret item in the secret service.If
serviceisnull, thenService.get(java.util.Set<org.gnome.secret.ServiceFlags>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be called to get the defaultServiceproxy.This method will return immediately and complete asynchronously.
- Parameters:
service- a secret service objectitemPath- the D-Bus path of the collectionflags- initialization flags for the new itemcancellable- optional cancellation objectcallback- called when the operation completes
-
newForDbusPath
public static void newForDbusPath(@Nullable Service service, String itemPath, ItemFlags flags, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Get a new item proxy for a secret item in the secret service.If
serviceisnull, thenService.get(java.util.Set<org.gnome.secret.ServiceFlags>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be called to get the defaultServiceproxy.This method will return immediately and complete asynchronously.
- Parameters:
service- a secret service objectitemPath- the D-Bus path of the collectionflags- initialization flags for the new itemcancellable- optional cancellation objectcallback- called when the operation completes
-
delete
Delete this item.This method returns immediately and completes asynchronously. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that show up.- Parameters:
cancellable- optional cancellation objectcallback- called when the operation completes
-
deleteFinish
Complete asynchronous operation to delete the secret item.- Parameters:
result- asynchronous result passed to the callback- Returns:
- whether the item was successfully deleted or not
- Throws:
GErrorException- seeGError
-
deleteSync
Delete this secret item.This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user.
Service.prompt(org.gnome.secret.Prompt, org.gnome.glib.VariantType, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)will be used to handle any prompts that show up.- Parameters:
cancellable- optional cancellation object- Returns:
- whether the item was successfully deleted or not
- Throws:
GErrorException- seeGError
-
getAttributes
Set the attributes of this item.The
attributesare a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.Do not modify the attributes returned by this method. Use
setAttributes(org.gnome.secret.Schema, org.gnome.glib.HashTable<java.lang.String, java.lang.String>, org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)instead.- Specified by:
getAttributesin interfaceRetrievable- Returns:
- a new reference
to the attributes, which should not be modified, and
released with
HashTable.unref()
-
getCreated
public long getCreated()Get the created date and time of the item.The return value is the number of seconds since the unix epoch, January 1st 1970.
- Specified by:
getCreatedin interfaceRetrievable- Returns:
- the created date and time
-
getItemFlags
Get the flags representing what features of theSecretItemproxy have been initialized.Use
loadSecret(org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)to initialize further features and change the flags.- Returns:
- the flags for features initialized
-
getLabel
Get the label of this item.- Specified by:
getLabelin interfaceRetrievable- Returns:
- the label, which should be freed with
GLib.free(java.lang.foreign.MemorySegment)
-
getLocked
public boolean getLocked()Get whether the item is locked or not.Depending on the secret service an item may not be able to be locked independently from the collection that it is in.
- Returns:
- whether the item is locked or not
-
getModified
public long getModified()Get the modified date and time of the item.The return value is the number of seconds since the unix epoch, January 1st 1970.
- Specified by:
getModifiedin interfaceRetrievable- Returns:
- the modified date and time
-
getSchemaName
Gets the name of the schema that this item was stored with. This is also available at thexdg:schemaattribute.- Returns:
- the schema name
-
getSecret
Get the secret value of this item.If this item is locked or the secret has not yet been loaded then this will return
null.To load the secret call the
loadSecret(org.gnome.gio.Cancellable, org.gnome.gio.AsyncReadyCallback)method.- Returns:
- the secret value which should be
released with
Value.unref(), ornull
-
getService
Get the Secret Service object that this item was created with.- Returns:
- the Secret Service object
-
loadSecret
Load the secret value of this item.Each item has a single secret which might be a password or some other secret binary value.
This function will fail if the secret item is locked.
This function returns immediately and completes asynchronously.
- Parameters:
cancellable- optional cancellation objectcallback- called when the operation completes
-
loadSecretFinish
Complete asynchronous operation to load the secret value of this item.The newly loaded secret value can be accessed by calling
getSecret().- Parameters:
result- asynchronous result passed to callback- Returns:
- whether the secret item successfully loaded or not
- Throws:
GErrorException- seeGError
-
loadSecretSync
Load the secret value of this item.Each item has a single secret which might be a password or some other secret binary value.
This function may block indefinitely. Use the asynchronous version in user interface threads.
- Parameters:
cancellable- optional cancellation object- Returns:
- whether the secret item successfully loaded or not
- Throws:
GErrorException- seeGError
-
refresh
public void refresh()Refresh the properties on this item.This fires off a request to refresh, and the properties will be updated later.
Calling this method is not normally necessary, as the secret service will notify the client when properties change.
-
setAttributes
public void setAttributes(@Nullable Schema schema, HashTable<String, String> attributes, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the attributes of this item.The
attributesare a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.This function returns immediately and completes asynchronously.
- Parameters:
schema- the schema for the attributesattributes- a new set of attributescancellable- optional cancellation objectcallback- called when the asynchronous operation completes
-
setAttributesFinish
Complete operation to set the attributes of this item.- Parameters:
result- asynchronous result passed to the callback- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
setAttributesSync
public boolean setAttributesSync(@Nullable Schema schema, HashTable<String, String> attributes, @Nullable Cancellable cancellable) throws GErrorExceptionSet the attributes of this item.The
attributesare a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.This function may block indefinitely. Use the asynchronous version in user interface threads.
- Parameters:
schema- the schema for the attributesattributes- a new set of attributescancellable- optional cancellation object- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
setLabel
public void setLabel(String label, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the label of this item.This function returns immediately and completes asynchronously.
- Parameters:
label- a new labelcancellable- optional cancellation objectcallback- called when the operation completes
-
setLabelFinish
Complete asynchronous operation to set the label of this collection.- Parameters:
result- asynchronous result passed to callback- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
setLabelSync
Set the label of this item.This function may block indefinitely. Use the asynchronous version in user interface threads.
- Parameters:
label- a new labelcancellable- optional cancellation object- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
setSecret
public void setSecret(Value value, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Set the secret value of this item.Each item has a single secret which might be a password or some other secret binary value.
This function returns immediately and completes asynchronously.
- Parameters:
value- a new secret valuecancellable- optional cancellation objectcallback- called when the operation completes
-
setSecretFinish
Complete asynchronous operation to set the secret value of this item.- Parameters:
result- asynchronous result passed to callback- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
setSecretSync
Set the secret value of this item.Each item has a single secret which might be a password or some other secret binary value.
This function may block indefinitely. Use the asynchronous version in user interface threads.
- Parameters:
value- a new secret valuecancellable- optional cancellation object- Returns:
- whether the change was successful or not
- Throws:
GErrorException- seeGError
-
builder
AItem.Builderobject constructs aItemwith the specified properties. Use the variousset...()methods to set properties, and finish construction withItem.Builder.build().- Returns:
- the builder object
-