Package org.gnome.gio
Class TlsPassword
java.lang.Object
io.github.jwharm.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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TlsPassword.Builder<B extends TlsPassword.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Class structure forGTlsPassword
.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionTlsPassword
(MemorySegment address) Create a TlsPassword proxy instance for the provided memory address.TlsPassword
(Set<TlsPasswordFlags> flags, String description) Create a newGTlsPassword
object.TlsPassword
(TlsPasswordFlags flags, String description) Create a newGTlsPassword
object. -
Method Summary
Modifier and TypeMethodDescriptionprotected TlsPassword
asParent()
Returns this instance as if it were its parent type.static TlsPassword.Builder
<? extends TlsPassword.Builder> builder()
ATlsPassword.Builder
object constructs aTlsPassword
with the specified properties.protected String
virtual 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 MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the TlsPassword classbyte[]
getValue()
Get the password value.Get a user readable translated warning.void
setDescription
(String description) Set a description string about what the password will be used for.void
setFlags
(Set<TlsPasswordFlags> flags) Set flags about the password.void
setFlags
(TlsPasswordFlags... flags) Set flags about the password.void
setValue
(byte[] value) Set the value for this password.void
setValueFull
(byte[] value) Provide the value for this password.void
setWarning
(String warning) Set a user readable translated warning.Methods 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TlsPassword
Create a TlsPassword proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
TlsPassword
Create a newGTlsPassword
object.- Parameters:
flags
- the password flagsdescription
- description of what the password is for
-
TlsPassword
Create a newGTlsPassword
object.- Parameters:
flags
- the password flagsdescription
- description of what the password is for
-
-
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 Javasuper
keyword, 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. -
getDescription
Get a description string about what the password will be used for.- Returns:
- The description of the password.
-
getFlags
Get flags about the password.- Returns:
- The flags about the password.
-
getValue
public byte[] getValue()Get the password value. Iflength
is notnull
then 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 passnull
forlength
in contexts where you know the password will have a certain fixed length.)- Returns:
- The password value (owned by the password object).
-
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.
-
setDescription
Set a description string about what the password will be used for.- Parameters:
description
- The description of the password
-
setFlags
Set flags about the password.- Parameters:
flags
- The flags about the password
-
setFlags
Set flags about the password.- Parameters:
flags
- The flags about the password
-
setValue
public void setValue(byte[] value) Set the value for this password. Thevalue
will be copied by the password object.Specify the
length
, for a non-nul-terminated password. Pass -1 aslength
if using a nul-terminated password, andlength
will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.)- Parameters:
value
- the new password value
-
setValueFull
public void setValueFull(byte[] value) Provide the value for this password.The
value
will be owned by the password object, and later freed using thedestroy
function callback.Specify the
length
, for a non-nul-terminated password. Pass -1 aslength
if using a nul-terminated password, andlength
will 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
-
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
-
getDefaultWarning
virtual method for g_tls_password_get_warning() if no value has been set using g_tls_password_set_warning() -
builder
ATlsPassword.Builder
object constructs aTlsPassword
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withTlsPassword.Builder.build()
.
-