#include <DBusConnection.h>
A wrapper around DBus connection object.
◆ ~DBusConnection()
alexaClientSDK::bluetoothImplementations::blueZ::DBusConnection::~DBusConnection |
( |
| ) |
|
◆ close()
void alexaClientSDK::bluetoothImplementations::blueZ::DBusConnection::close |
( |
| ) |
|
Closes the connection. All the subscriptions are closed automatically.
◆ create()
static std::unique_ptr<DBusConnection> alexaClientSDK::bluetoothImplementations::blueZ::DBusConnection::create |
( |
GBusType |
connectionType = G_BUS_TYPE_SYSTEM | ) |
|
|
static |
Connects to DBus and returns a new instance of DBusConnection
.
- Parameters
-
connectionType | A GBusType of the connection. |
- Returns
- A pointer to
DBusConnection
instance or nullptr in case of error.
◆ getGDBusConnection()
GDBusConnection* alexaClientSDK::bluetoothImplementations::blueZ::DBusConnection::getGDBusConnection |
( |
| ) |
|
Get GDBusConnection
pointer
- Returns
- A pointer to
GDBusConnection
.
◆ subscribeToSignal()
unsigned int alexaClientSDK::bluetoothImplementations::blueZ::DBusConnection::subscribeToSignal |
( |
const char * |
serviceName, |
|
|
const char * |
interfaceName, |
|
|
const char * |
member, |
|
|
const char * |
firstArgumentFilter, |
|
|
GDBusSignalCallback |
callback, |
|
|
gpointer |
userData |
|
) |
| |
Subscribes a callback to DBus signal
- Parameters
-
serviceName | DBus service name. E.g.: "org.bluez" |
interfaceName | Name of the DBus interface to listen to. E.g.: "org.freedesktop.DBus.ObjectManager" |
member | Name of the interface member (event name). E.g.: "InterfacesAdded" |
firstArgumentFilter | A string to filter the first argument of the event callback with. Null if no filter applied. For BlueZ the first argument could contain the ObjectPath of the object that is being added/removed or changed. |
callback | Callback to be called by DBus |
userData | A pointer to be passed to a callback |
- Returns
- id of the callback created or 0 on error.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/DBusConnection.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0