DBusUtilities

Description Various utility routines related to D-Bus.

class DBusUtilities {}

Members

Static functions

addressGetForBusSync
string addressGetForBusSync(GBusType busType, Cancellable cancellable)

Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus_type. This may involve using various platform specific mechanisms. Since 2.26

addressGetStream
void addressGetStream(string address, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. When the operation is finished, callback will be invoked. You can then call g_dbus_address_get_stream_finish() to get the result of the operation. This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version. Since 2.26

addressGetStreamFinish
IOStream addressGetStreamFinish(AsyncResultIF res, string outGuid)

Finishes an operation started with g_dbus_address_get_stream(). Since 2.26

addressGetStreamSync
IOStream addressGetStreamSync(string address, string outGuid, Cancellable cancellable)

Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version. Since 2.26

annotationInfoLookup
string annotationInfoLookup(GDBusAnnotationInfo** annotations, string name)

Looks up the value of an annotation. This cost of this function is O(n) in number of annotations. Since 2.26

annotationInfoRef
GDBusAnnotationInfo* annotationInfoRef(GDBusAnnotationInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

annotationInfoUnref
void annotationInfoUnref(GDBusAnnotationInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

argInfoRef
GDBusArgInfo* argInfoRef(GDBusArgInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

argInfoUnref
void argInfoUnref(GDBusArgInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

generateGuid
string generateGuid()

Generate a D-Bus GUID that can be used with e.g. g_dbus_connection_new(). See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). Since 2.26

interfaceInfoGenerateXml
void interfaceInfoGenerateXml(GDBusInterfaceInfo* info, uint indent, StringG stringBuilder)

Appends an XML representation of info (and its children) to string_builder. This function is typically used for generating introspection XML documents at run-time for handling the org.freedesktop.DBus.Introspectable.Introspect method. Since 2.26

interfaceInfoLookupMethod
GDBusMethodInfo* interfaceInfoLookupMethod(GDBusInterfaceInfo* info, string name)

Looks up information about a method. This cost of this function is O(n) in number of methods. Since 2.26

interfaceInfoLookupProperty
GDBusPropertyInfo* interfaceInfoLookupProperty(GDBusInterfaceInfo* info, string name)

Looks up information about a property. This cost of this function is O(n) in number of properties. Since 2.26

interfaceInfoLookupSignal
GDBusSignalInfo* interfaceInfoLookupSignal(GDBusInterfaceInfo* info, string name)

Looks up information about a signal. This cost of this function is O(n) in number of signals. Since 2.26

interfaceInfoRef
GDBusInterfaceInfo* interfaceInfoRef(GDBusInterfaceInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

interfaceInfoUnref
void interfaceInfoUnref(GDBusInterfaceInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

isAddress
int isAddress(string string)

Checks if string is a D-Bus address. This doesn't check if string is actually supported by GDBusServer or GDBusConnection - use g_dbus_is_supported_address() to do more checks. Since 2.26

isGuid
int isGuid(string string)

Checks if string is a D-Bus GUID. See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). Since 2.26

isInterfaceName
int isInterfaceName(string string)

Checks if string is a valid D-Bus interface name. Since 2.26

isMemberName
int isMemberName(string string)

Checks if string is a valid D-Bus member (e.g. signal or method) name. Since 2.26

isName
int isName(string string)

Checks if string is a valid D-Bus bus name (either unique or well-known). Since 2.26

isSupportedAddress
int isSupportedAddress(string string)

Like g_dbus_is_address() but also checks if the library suppors the transports in string and that key/value pairs for each transport are valid. Since 2.26

isUniqueName
int isUniqueName(string string)

Checks if string is a valid D-Bus unique bus name. Since 2.26

methodInfoRef
GDBusMethodInfo* methodInfoRef(GDBusMethodInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

methodInfoUnref
void methodInfoUnref(GDBusMethodInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

nodeInfoGenerateXml
void nodeInfoGenerateXml(GDBusNodeInfo* info, uint indent, StringG stringBuilder)

Appends an XML representation of info (and its children) to string_builder. This function is typically used for generating introspection XML documents at run-time for handling the org.freedesktop.DBus.Introspectable.Introspect method. Since 2.26

nodeInfoLookupInterface
GDBusInterfaceInfo* nodeInfoLookupInterface(GDBusNodeInfo* info, string name)

Looks up information about an interface. This cost of this function is O(n) in number of interfaces. Since 2.26

nodeInfoNewForXml
GDBusNodeInfo* nodeInfoNewForXml(string xmlData)

Parses xml_data and returns a GDBusNodeInfo representing the data. Since 2.26

nodeInfoRef
GDBusNodeInfo* nodeInfoRef(GDBusNodeInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

nodeInfoUnref
void nodeInfoUnref(GDBusNodeInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

propertyInfoRef
GDBusPropertyInfo* propertyInfoRef(GDBusPropertyInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

propertyInfoUnref
void propertyInfoUnref(GDBusPropertyInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

signalInfoRef
GDBusSignalInfo* signalInfoRef(GDBusSignalInfo* info)

If info is statically allocated does nothing. Otherwise increases the reference count. Since 2.26

signalInfoUnref
void signalInfoUnref(GDBusSignalInfo* info)

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed. Since 2.26

Meta