Value

A secret value, like a password or other binary secret.

Constructors

this
this(SecretValue* secretValue, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string secret, ptrdiff_t length, string contentType)

Create a #SecretValue for the secret data passed in. The secret data is copied into non-pageable 'secure' memory.

this
this(string secret, ptrdiff_t length, string contentType, GDestroyNotify destroy)

Create a #SecretValue for the secret data passed in. The secret data is not copied, and will later be freed with the @destroy function.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

doref
Value doref()

Add another reference to the #SecretValue. For each reference secret_value_unref() should be called to unreference the value.

get
string get()

Get the secret data in the #SecretValue. The value is not necessarily null-terminated unless it was created with secret_value_new() or a null-terminated string was passed to secret_value_new_full().

getContentType
string getContentType()

Get the content type of the secret value, such as <literal>text/plain</literal>.

getStruct
void* getStruct()

the main Gtk struct as a void*

getText
string getText()

Get the secret data in the #SecretValue if it contains a textual value. The content type must be <literal>text/plain</literal>.

getValueStruct
SecretValue* getValueStruct(bool transferOwnership)

Get the main Gtk struct

unref
void unref()

Unreference a #SecretValue. When the last reference is gone, then the value will be freed.

Static functions

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
secretValue
SecretValue* secretValue;

the main Gtk struct

Meta