Package ch.bailu.gtk.gio
Klasse Credentials
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.Credentials
- Alle implementierten Schnittstellen:
PointerInterface
The `GCredentials` type is a reference-counted wrapper for native
credentials.
The information in `GCredentials` is typically used for identifying,
authenticating and authorizing other processes.
Some operating systems supports looking up the credentials of the remote
peer of a communication endpoint - see e.g. [method@Gio.Socket.get_credentials].
Some operating systems supports securely sending and receiving
credentials over a Unix Domain Socket, see [class@Gio.UnixCredentialsMessage],
[method@Gio.UnixConnection.send_credentials] and
[method@Gio.UnixConnection.receive_credentials] for details.
On Linux, the native credential type is a `struct ucred` - see the
[`unix(7)` man page](man:unix(7)) for details. This corresponds to
`G_CREDENTIALS_TYPE_LINUX_UCRED`.
On Apple operating systems (including iOS, tvOS, and macOS), the native credential
type is a `struct xucred`. This corresponds to `G_CREDENTIALS_TYPE_APPLE_XUCRED`.
On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential type is a
`struct cmsgcred`. This corresponds to `G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED`.
On NetBSD, the native credential type is a `struct unpcbid`.
This corresponds to `G_CREDENTIALS_TYPE_NETBSD_UNPCBID`.
On OpenBSD, the native credential type is a `struct sockpeercred`.
This corresponds to `G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED`.
On Solaris (including OpenSolaris and its derivatives), the native credential type
is a `ucred_t`. This corresponds to `G_CREDENTIALS_TYPE_SOLARIS_UCRED`.
Since GLib 2.72, on Windows, the native credentials may contain the PID of a
process. This corresponds to `G_CREDENTIALS_TYPE_WIN32_PID`.
credentials.
The information in `GCredentials` is typically used for identifying,
authenticating and authorizing other processes.
Some operating systems supports looking up the credentials of the remote
peer of a communication endpoint - see e.g. [method@Gio.Socket.get_credentials].
Some operating systems supports securely sending and receiving
credentials over a Unix Domain Socket, see [class@Gio.UnixCredentialsMessage],
[method@Gio.UnixConnection.send_credentials] and
[method@Gio.UnixConnection.receive_credentials] for details.
On Linux, the native credential type is a `struct ucred` - see the
[`unix(7)` man page](man:unix(7)) for details. This corresponds to
`G_CREDENTIALS_TYPE_LINUX_UCRED`.
On Apple operating systems (including iOS, tvOS, and macOS), the native credential
type is a `struct xucred`. This corresponds to `G_CREDENTIALS_TYPE_APPLE_XUCRED`.
On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential type is a
`struct cmsgcred`. This corresponds to `G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED`.
On NetBSD, the native credential type is a `struct unpcbid`.
This corresponds to `G_CREDENTIALS_TYPE_NETBSD_UNPCBID`.
On OpenBSD, the native credential type is a `struct sockpeercred`.
This corresponds to `G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED`.
On Solaris (including OpenSolaris and its derivatives), the native credential type
is a `ucred_t`. This corresponds to `G_CREDENTIALS_TYPE_SOLARIS_UCRED`.
Since GLib 2.72, on Windows, the native credentials may contain the PID of a
process. This corresponds to `G_CREDENTIALS_TYPE_WIN32_PID`.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new #GCredentials object with credentials matching the
the current process.Credentials
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ClassHandler
static int
getNative
(int native_type) Gets a pointer to native credentials of type @native_type from
@credentials.static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
isSameUser
(Credentials other_credentials) Checks if @credentials and @other_credentials is the same user.void
Copies the native credentials of type @native_type from @native
into @credentials.toStr()
Creates a human-readable textual representation of @credentials
that can be used in logging and debug messages.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
Credentials
-
Credentials
public Credentials()Creates a new #GCredentials object with credentials matching the
the current process.
-
-
Methodendetails
-
getClassHandler
-
getNative
Gets a pointer to native credentials of type @native_type from
@credentials.
It is a programming error (which will cause a warning to be
logged) to use this method if there is no #GCredentials support for
the OS or if @native_type isn't supported by the OS.- Parameter:
native_type
- The type of native credentials to get.- Gibt zurück:
- The pointer to native credentials or %NULL if there is no #GCredentials support for the OS or if @native_type isn't supported by the OS. Do not free the returned data, it is owned by @credentials.
-
isSameUser
Checks if @credentials and @other_credentials is the same user.
This operation can fail if #GCredentials is not supported on the
the OS.- Parameter:
other_credentials
- A #GCredentials.- Gibt zurück:
- %TRUE if @credentials and @other_credentials has the same user, %FALSE otherwise or if @error is set.
- Löst aus:
AllocationError
-
setNative
Copies the native credentials of type @native_type from @native
into @credentials.
It is a programming error (which will cause a warning to be
logged) to use this method if there is no #GCredentials support for
the OS or if @native_type isn't supported by the OS.- Parameter:
native_type
- The type of native credentials to set._native
- A pointer to native credentials.
-
toStr
Creates a human-readable textual representation of @credentials
that can be used in logging and debug messages. The format of the
returned string may change in future GLib release.- Gibt zurück:
- A string that should be freed with g_free().
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-