Back to Seed Clases

Gio


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker Gio.DBusAuthObserver

Class Gio.DBusAuthObserver

Import line: Gio = imports.gi.Gio;
GIR File: Gio-2.0.gir
C documentation: GDBusAuthObserver
Class : DBusAuthObserver
Extends: GObject.Object
The GDBusAuthObserver type provides a mechanism for participating
in how a GDBusServer (or a GDBusConnection) authenticates remote
peers. Simply instantiate a GDBusAuthObserver and connect to the
signals you are interested in. Note that new signals may be added
in the future
For example, if you only want to allow D-Bus connections from
processes owned by the same uid as the server, you would use a
signal handler like the following:
Controlling Authentication
static gboolean
on_authorize_authenticated_peer (GDBusAuthObserver *observer,
GIOStream *stream,
GCredentials *credentials,
gpointer user_data)
{
gboolean authorized;
authorized = FALSE;
if (credentials != NULL)
{
GCredentials *own_credentials;
own_credentials = g_credentials_new ();
if (g_credentials_is_same_user (credentials, own_credentials, NULL))
authorized = TRUE;
g_object_unref (own_credentials);
}
return authorized;
}
Properties
None
Methods / Constructors
Method / Constructor Defined By
 
new Gio.DBusAuthObserver ()
Create a new Gio.DBusAuthObserver
Create a new Gio.DBusAuthObserver
 
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gio.DBusConnection
Property
authentication_observer : Gio.DBusAuthObserver
A GDBusAuthObserver object to assist in the authentication process or NULL.
Gio.DBusConnection
Method
new Gio.DBusConnection.for_address_sync (String address, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable) : Gio.DBusConnection
Create a new Gio.DBusConnection
Gio.DBusConnection
Method
new Gio.DBusConnection.sync (IOStream stream, String guid, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable) : Gio.DBusConnection
Create a new Gio.DBusConnection
Gio.DBusConnection
Method
Gio.DBusConnection.c_new (IOStream stream, String guid, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable, Function callback, void* user_data) : none
Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by stream.
Gio.DBusConnection
Method
Gio.DBusConnection.new_for_address (String address, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable, Function callback, void* user_data) : none
Asynchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by address
which must be in the D-Bus address format.
Gio.DBusServer
Property
authentication_observer : Gio.DBusAuthObserver
A GDBusAuthObserver object to assist in the authentication process or NULL.
Gio.DBusServer
Method
new Gio.DBusServer.sync (String address, DBusServerFlags flags, String guid, DBusAuthObserver observer, Cancellable cancellable) : Gio.DBusServer
Create a new Gio.DBusServer
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:11:09 GMT+0800 (HKT)