Class TlsPassword
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gio.TlsPassword
- All Implemented Interfaces:
Proxy
An abstract interface representing a password used in TLS. Often used in
user interaction such as unlocking a key storage token.
- Since:
- 2.30
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTlsPassword.Builder<B extends TlsPassword.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classClass structure forGTlsPassword.Nested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new TlsPassword.TlsPassword(MemorySegment address) Create a TlsPassword instance for the provided memory address.TlsPassword(Set<TlsPasswordFlags> flags, String description) Create a newGTlsPasswordobject.TlsPassword(TlsPasswordFlags flags, String description) Create a newGTlsPasswordobject. -
Method Summary
Modifier and TypeMethodDescriptionprotected TlsPasswordasParent()Return this instance as if it were its parent type.static TlsPassword.Builder<? extends TlsPassword.Builder> builder()ATlsPassword.Builderobject constructs aTlsPasswordwith the specified properties.protected Stringvirtual method for g_tls_password_get_warning() if no value has been set using g_tls_password_set_warning()Get a description string about what the password will be used for.getFlags()Get flags about the password.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the TlsPassword class.byte[]getValue()Get the password value.Get a user readable translated warning.voidsetDescription(String description) Set a description string about what the password will be used for.voidsetFlags(Set<TlsPasswordFlags> flags) Set flags about the password.voidsetFlags(TlsPasswordFlags... flags) Set flags about the password.voidsetValue(@Nullable byte @Nullable [] value) Set the value for this password.voidsetValueFull(@Nullable byte @Nullable [] value) Provide the value for this password.voidsetWarning(String warning) Set a user readable translated warning.Methods inherited from class 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 TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TlsPassword
Create a TlsPassword instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TlsPassword
Create a newGTlsPasswordobject.- Parameters:
flags- the password flagsdescription- description of what the password is for
-
TlsPassword
Create a newGTlsPasswordobject.- Parameters:
flags- the password flagsdescription- description of what the password is for
-
TlsPassword
public TlsPassword()Create a new TlsPassword.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
getDescription
Get a description string about what the password will be used for.- Returns:
- The description of the password.
- Since:
- 2.30
-
getFlags
Get flags about the password.- Returns:
- The flags about the password.
- Since:
- 2.30
-
getValue
public byte[] getValue()Get the password value. Iflengthis notnullthen it will be filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only passnullforlengthin contexts where you know the password will have a certain fixed length.)- Returns:
- The password value (owned by the password object).
- Since:
- 2.30
-
getWarning
Get a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags().- Returns:
- The warning.
- Since:
- 2.30
-
setDescription
Set a description string about what the password will be used for.- Parameters:
description- The description of the password- Since:
- 2.30
-
setFlags
Set flags about the password.- Parameters:
flags- The flags about the password- Since:
- 2.30
-
setFlags
Set flags about the password.- Parameters:
flags- The flags about the password- Since:
- 2.30
-
setValue
public void setValue(@Nullable byte @Nullable [] value) Set the value for this password. The
valuewill be copied by the password object.Specify the
length,for a non-nul-terminated password. Pass -1 aslengthif using a nul-terminated password, andlengthwill be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.)- Parameters:
value- the new password value- Since:
- 2.30
-
setValueFull
public void setValueFull(@Nullable byte @Nullable [] value) Provide the value for this password.
The
valuewill be owned by the password object, and later freed using thedestroyfunction callback.Specify the
length,for a non-nul-terminated password. Pass -1 aslengthif using a nul-terminated password, andlengthwill be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.)- Parameters:
value- the value for the password- Since:
- 2.30
-
setWarning
Set a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags().- Parameters:
warning- The user readable warning- Since:
- 2.30
-
getDefaultWarning
virtual method for g_tls_password_get_warning() if no value has been set using g_tls_password_set_warning() -
builder
ATlsPassword.Builderobject constructs aTlsPasswordwith the specified properties. Use the variousset...()methods to set properties, and finish construction withTlsPassword.Builder.build().- Returns:
- the builder object
-