org.freedesktop

Interface DBus

public interface DBus extends DBusInterface

Nested Class Summary
static interfaceDBus.Binding
Contains Binding-test interfaces
static interfaceDBus.Error
Contains standard errors that can be thrown from methods.
static interfaceDBus.GLib
Contains GLib-specific annotations
static interfaceDBus.Introspectable
Objects can provide introspection data via this interface and method.
static interfaceDBus.Local
Messages generated locally in the application.
static interfaceDBus.Method
Contains method-specific annotations
static classDBus.NameAcquired
Signal sent to a connection when it aquires a name
static classDBus.NameLost
Signal sent to a connection when it loses a name
static classDBus.NameOwnerChanged
Signal sent when the owner of a name changes
static interfaceDBus.Peer
All DBus Applications should respond to the Ping method on this interface
static interfaceDBus.Properties
A standard properties interface.
Field Summary
static intDBUS_NAME_FLAG_ALLOW_REPLACEMENT
static intDBUS_NAME_FLAG_DO_NOT_QUEUE
static intDBUS_NAME_FLAG_REPLACE_EXISTING
static intDBUS_RELEASE_NAME_REPLY_NON_EXISTANT
static intDBUS_RELEASE_NAME_REPLY_NOT_OWNER
static intDBUS_RELEASE_NAME_REPLY_RELEASED
static intDBUS_REQUEST_NAME_REPLY_ALREADY_OWNER
static intDBUS_REQUEST_NAME_REPLY_EXISTS
static intDBUS_REQUEST_NAME_REPLY_IN_QUEUE
static intDBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER
static intDBUS_START_REPLY_ALREADY_RUNNING
static intDBUS_START_REPLY_SUCCESS
Method Summary
voidAddMatch(String matchrule)
Add a match rule.
Byte[]GetConnectionSELinuxSecurityContext(String a)
Does something undocumented.
UInt32GetConnectionUnixProcessID(String connection_name)
Returns the proccess ID associated with a connection.
UInt32GetConnectionUnixUser(String connection_name)
Get the Unix UID that owns a connection name.
StringGetNameOwner(String name)
Get the connection unique name that owns the given name.
StringHello()
Initial message to register ourselves on the Bus.
String[]ListNames()
Lists all connected names on the Bus.
String[]ListQueuedOwners(String name)
List the connections currently queued for a name.
booleanNameHasOwner(String name)
Determine if a name has an owner.
UInt32ReleaseName(String name)
Release a name on the bus.
voidReloadConfig()
Does something undocumented.
voidRemoveMatch(String matchrule)
Remove a match rule.
UInt32RequestName(String name, UInt32 flags)
Request a name on the bus.
UInt32StartServiceByName(String name, UInt32 flags)
Start a service.

Field Detail

DBUS_NAME_FLAG_ALLOW_REPLACEMENT

public static final int DBUS_NAME_FLAG_ALLOW_REPLACEMENT

DBUS_NAME_FLAG_DO_NOT_QUEUE

public static final int DBUS_NAME_FLAG_DO_NOT_QUEUE

DBUS_NAME_FLAG_REPLACE_EXISTING

public static final int DBUS_NAME_FLAG_REPLACE_EXISTING

DBUS_RELEASE_NAME_REPLY_NON_EXISTANT

public static final int DBUS_RELEASE_NAME_REPLY_NON_EXISTANT

DBUS_RELEASE_NAME_REPLY_NOT_OWNER

public static final int DBUS_RELEASE_NAME_REPLY_NOT_OWNER

DBUS_RELEASE_NAME_REPLY_RELEASED

public static final int DBUS_RELEASE_NAME_REPLY_RELEASED

DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER

public static final int DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER

DBUS_REQUEST_NAME_REPLY_EXISTS

public static final int DBUS_REQUEST_NAME_REPLY_EXISTS

DBUS_REQUEST_NAME_REPLY_IN_QUEUE

public static final int DBUS_REQUEST_NAME_REPLY_IN_QUEUE

DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER

public static final int DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER

DBUS_START_REPLY_ALREADY_RUNNING

public static final int DBUS_START_REPLY_ALREADY_RUNNING

DBUS_START_REPLY_SUCCESS

public static final int DBUS_START_REPLY_SUCCESS

Method Detail

AddMatch

public void AddMatch(String matchrule)
Add a match rule. Will cause you to receive messages that aren't directed to you which match this rule.

Parameters: matchrule The Match rule as a string. Format Undocumented.

GetConnectionSELinuxSecurityContext

public Byte[] GetConnectionSELinuxSecurityContext(String a)
Does something undocumented.

GetConnectionUnixProcessID

public UInt32 GetConnectionUnixProcessID(String connection_name)
Returns the proccess ID associated with a connection.

Parameters: connection_name The name of the connection

Returns: The PID of the connection.

GetConnectionUnixUser

public UInt32 GetConnectionUnixUser(String connection_name)
Get the Unix UID that owns a connection name.

Parameters: connection_name The connection name.

Returns: The Unix UID that owns it.

GetNameOwner

public String GetNameOwner(String name)
Get the connection unique name that owns the given name.

Parameters: name The name to query.

Returns: The connection which owns the name.

Hello

public String Hello()
Initial message to register ourselves on the Bus.

Returns: The unique name of this connection to the Bus.

ListNames

public String[] ListNames()
Lists all connected names on the Bus.

Returns: An array of all connected names.

ListQueuedOwners

public String[] ListQueuedOwners(String name)
List the connections currently queued for a name.

Parameters: name The name to query

Returns: A list of unique connection IDs.

NameHasOwner

public boolean NameHasOwner(String name)
Determine if a name has an owner.

Parameters: name The name to query.

Returns: true if the name has an owner.

ReleaseName

public UInt32 ReleaseName(String name)
Release a name on the bus.

Parameters: name The name to release.

Returns: DBUS_RELEASE_NAME_REPLY constants.

ReloadConfig

public void ReloadConfig()
Does something undocumented.

RemoveMatch

public void RemoveMatch(String matchrule)
Remove a match rule. Will cause you to stop receiving messages that aren't directed to you which match this rule.

Parameters: matchrule The Match rule as a string. Format Undocumented.

RequestName

public UInt32 RequestName(String name, UInt32 flags)
Request a name on the bus.

Parameters: name The name to request. flags DBUS_NAME flags.

Returns: DBUS_REQUEST_NAME_REPLY constants.

StartServiceByName

public UInt32 StartServiceByName(String name, UInt32 flags)
Start a service. If the given service is not provided by any application, it will be started according to the .service file for that service.

Parameters: name The service name to start. flags Unused.

Returns: DBUS_START_REPLY constants.