Table of Contents

Class DBusConnection

Namespace
Gio
Assembly
Gio-2.0.dll
public class DBusConnection : Object, IObject, INotifyPropertyChanged, IDisposable, AsyncInitable, Initable, IHandle, GTypeProvider
Inheritance
DBusConnection
Implements
Inherited Members

Constructors

DBusConnection(bool, params ConstructArgument[])

protected DBusConnection(bool owned, params ConstructArgument[] constructArguments)

Parameters

owned bool
constructArguments ConstructArgument[]

DBusConnection(IntPtr, bool)

protected DBusConnection(IntPtr ptr, bool ownedRef)

Parameters

ptr IntPtr
ownedRef bool

Fields

CapabilitiesPropertyDefinition

public static readonly Property<DBusCapabilityFlags, DBusConnection> CapabilitiesPropertyDefinition

Field Value

Property<DBusCapabilityFlags, DBusConnection>

ClosedPropertyDefinition

public static readonly Property<bool, DBusConnection> ClosedPropertyDefinition

Field Value

Property<bool, DBusConnection>

ClosedSignal

Signal Descriptor for OnClosed.

public static readonly Signal<DBusConnection, DBusConnection.ClosedSignalArgs> ClosedSignal

Field Value

Signal<DBusConnection, DBusConnection.ClosedSignalArgs>

ExitOnClosePropertyDefinition

public static readonly Property<bool, DBusConnection> ExitOnClosePropertyDefinition

Field Value

Property<bool, DBusConnection>

FlagsPropertyDefinition

public static readonly Property<DBusConnectionFlags, DBusConnection> FlagsPropertyDefinition

Field Value

Property<DBusConnectionFlags, DBusConnection>

GuidPropertyDefinition

public static readonly Property<string?, DBusConnection> GuidPropertyDefinition

Field Value

Property<string, DBusConnection>

StreamPropertyDefinition

public static readonly Property<IOStream?, DBusConnection> StreamPropertyDefinition

Field Value

Property<IOStream, DBusConnection>

UniqueNamePropertyDefinition

public static readonly Property<string?, DBusConnection> UniqueNamePropertyDefinition

Field Value

Property<string, DBusConnection>

Properties

Capabilities

public DBusCapabilityFlags Capabilities { get; }

Property Value

DBusCapabilityFlags

Closed

public bool Closed { get; }

Property Value

bool

ExitOnClose

public bool ExitOnClose { get; set; }

Property Value

bool

Flags

public DBusConnectionFlags Flags { get; }

Property Value

DBusConnectionFlags

Guid

public string? Guid { get; }

Property Value

string

Stream

public IOStream? Stream { get; }

Property Value

IOStream

UniqueName

public string? UniqueName { get; }

Property Value

string

Methods

AddFilter(DBusMessageFilterFunction)

[Version("2.26")]
public uint AddFilter(DBusMessageFilterFunction filterFunction)

Parameters

filterFunction DBusMessageFilterFunction

Returns

uint

CallAsync(string, string, string, string, Variant?)

public Task<Variant> CallAsync(string busName, string objectPath, string interfaceName, string methodName, Variant? parameters = null)

Parameters

busName string
objectPath string
interfaceName string
methodName string
parameters Variant

Returns

Task<Variant>

CallFinish(AsyncResult)

[Version("2.26")]
public Variant CallFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

Variant

CallSync(string?, string, string, string, Variant?, VariantType?, DBusCallFlags, int, Cancellable?)

[Version("2.26")]
public Variant CallSync(string? busName, string objectPath, string interfaceName, string methodName, Variant? parameters, VariantType? replyType, DBusCallFlags flags, int timeoutMsec, Cancellable? cancellable)

Parameters

busName string
objectPath string
interfaceName string
methodName string
parameters Variant
replyType VariantType
flags DBusCallFlags
timeoutMsec int
cancellable Cancellable

Returns

Variant

CloseFinish(AsyncResult)

[Version("2.26")]
public bool CloseFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

bool

CloseSync(Cancellable?)

[Version("2.26")]
public bool CloseSync(Cancellable? cancellable)

Parameters

cancellable Cancellable

Returns

bool

EmitSignal(string?, string, string, string, Variant?)

[Version("2.26")]
public bool EmitSignal(string? destinationBusName, string objectPath, string interfaceName, string signalName, Variant? parameters)

Parameters

destinationBusName string
objectPath string
interfaceName string
signalName string
parameters Variant

Returns

bool

ExportActionGroup(string, ActionGroup)

[Version("2.32")]
public uint ExportActionGroup(string objectPath, ActionGroup actionGroup)

Parameters

objectPath string
actionGroup ActionGroup

Returns

uint

ExportMenuModel(string, MenuModel)

[Version("2.32")]
public uint ExportMenuModel(string objectPath, MenuModel menu)

Parameters

objectPath string
menu MenuModel

Returns

uint

FlushFinish(AsyncResult)

[Version("2.26")]
public bool FlushFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

bool

FlushSync(Cancellable?)

[Version("2.26")]
public bool FlushSync(Cancellable? cancellable)

Parameters

cancellable Cancellable

Returns

bool

Get(BusType)

public static DBusConnection Get(BusType busType)

Parameters

busType BusType

Returns

DBusConnection

GetCapabilities()

[Version("2.26")]
public DBusCapabilityFlags GetCapabilities()

Returns

DBusCapabilityFlags

GetExitOnClose()

[Version("2.26")]
public bool GetExitOnClose()

Returns

bool

GetFlags()

[Version("2.60")]
public DBusConnectionFlags GetFlags()

Returns

DBusConnectionFlags

GetGType()

public static Type GetGType()

Returns

Type

GetGuid()

[Version("2.26")]
public string GetGuid()

Returns

string

GetLastSerial()

[Version("2.34")]
public uint GetLastSerial()

Returns

uint

GetPeerCredentials()

[Version("2.26")]
public Credentials? GetPeerCredentials()

Returns

Credentials

GetStream()

[Version("2.26")]
public IOStream GetStream()

Returns

IOStream

GetUniqueName()

[Version("2.26")]
public string? GetUniqueName()

Returns

string

Init(Cancellable?)

[Version("2.22")]
public bool Init(Cancellable? cancellable)

Parameters

cancellable Cancellable

Returns

bool

InitFinish(AsyncResult)

[Version("2.22")]
public bool InitFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

bool

IsClosed()

[Version("2.26")]
public bool IsClosed()

Returns

bool

NewFinish(AsyncResult)

[Version("2.26")]
public static DBusConnection NewFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

DBusConnection

NewForAddressFinish(AsyncResult)

[Version("2.26")]
public static DBusConnection NewForAddressFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

DBusConnection

NewForAddressSync(string, DBusConnectionFlags, DBusAuthObserver?, Cancellable?)

[Version("2.26")]
public static DBusConnection NewForAddressSync(string address, DBusConnectionFlags flags, DBusAuthObserver? observer, Cancellable? cancellable)

Parameters

address string
flags DBusConnectionFlags
observer DBusAuthObserver
cancellable Cancellable

Returns

DBusConnection

NewSync(IOStream, string?, DBusConnectionFlags, DBusAuthObserver?, Cancellable?)

[Version("2.26")]
public static DBusConnection NewSync(IOStream stream, string? guid, DBusConnectionFlags flags, DBusAuthObserver? observer, Cancellable? cancellable)

Parameters

stream IOStream
guid string
flags DBusConnectionFlags
observer DBusAuthObserver
cancellable Cancellable

Returns

DBusConnection

RegisterObject(string, DBusInterfaceInfo, Closure?, Closure?, Closure?)

[Version("2.46")]
public uint RegisterObject(string objectPath, DBusInterfaceInfo interfaceInfo, Closure? methodCallClosure, Closure? getPropertyClosure, Closure? setPropertyClosure)

Parameters

objectPath string
interfaceInfo DBusInterfaceInfo
methodCallClosure Closure
getPropertyClosure Closure
setPropertyClosure Closure

Returns

uint

RemoveFilter(uint)

[Version("2.26")]
public void RemoveFilter(uint filterId)

Parameters

filterId uint

SendMessage(DBusMessage, DBusSendMessageFlags, out uint)

[Version("2.26")]
public bool SendMessage(DBusMessage message, DBusSendMessageFlags flags, out uint outSerial)

Parameters

message DBusMessage
flags DBusSendMessageFlags
outSerial uint

Returns

bool

SendMessageWithReplyFinish(AsyncResult)

[Version("2.26")]
public DBusMessage SendMessageWithReplyFinish(AsyncResult res)

Parameters

res AsyncResult

Returns

DBusMessage

SendMessageWithReplySync(DBusMessage, DBusSendMessageFlags, int, out uint, Cancellable?)

[Version("2.26")]
public DBusMessage SendMessageWithReplySync(DBusMessage message, DBusSendMessageFlags flags, int timeoutMsec, out uint outSerial, Cancellable? cancellable)

Parameters

message DBusMessage
flags DBusSendMessageFlags
timeoutMsec int
outSerial uint
cancellable Cancellable

Returns

DBusMessage

SetExitOnClose(bool)

[Version("2.26")]
public void SetExitOnClose(bool exitOnClose)

Parameters

exitOnClose bool

SignalSubscribe(string?, string?, string?, string?, string?, DBusSignalFlags, DBusSignalCallback)

[Version("2.26")]
public uint SignalSubscribe(string? sender, string? interfaceName, string? member, string? objectPath, string? arg0, DBusSignalFlags flags, DBusSignalCallback callback)

Parameters

sender string
interfaceName string
member string
objectPath string
arg0 string
flags DBusSignalFlags
callback DBusSignalCallback

Returns

uint

SignalUnsubscribe(uint)

[Version("2.26")]
public void SignalUnsubscribe(uint subscriptionId)

Parameters

subscriptionId uint

StartMessageProcessing()

[Version("2.26")]
public void StartMessageProcessing()

UnexportActionGroup(uint)

[Version("2.32")]
public void UnexportActionGroup(uint exportId)

Parameters

exportId uint

UnexportMenuModel(uint)

[Version("2.32")]
public void UnexportMenuModel(uint exportId)

Parameters

exportId uint

UnregisterObject(uint)

[Version("2.26")]
public bool UnregisterObject(uint registrationId)

Parameters

registrationId uint

Returns

bool

UnregisterSubtree(uint)

[Version("2.26")]
public bool UnregisterSubtree(uint registrationId)

Parameters

registrationId uint

Returns

bool

Events

OnClosed

public event SignalHandler<DBusConnection, DBusConnection.ClosedSignalArgs> OnClosed

Event Type

SignalHandler<DBusConnection, DBusConnection.ClosedSignalArgs>