OBEX manager.
More...
#include <BluezQt/ObexManager>
|
bool | initialized |
|
bool | operational |
|
QList< ObexSessionPtr > | sessions |
|
|
void | operationalChanged (bool operational) |
| Indicates that operational state have changed.
|
|
void | sessionAdded (ObexSessionPtr session) |
| Indicates that the session was added.
|
|
void | sessionRemoved (ObexSessionPtr session) |
| Indicates that the session was removed.
|
|
OBEX manager.
The entry point to communicate with session BlueZ obex daemon.
You must call init() before other functions can be used.
- Note
- If manager is not operational, all methods that returns a PendingCall will fail with PendingCall::InternalError.
◆ ObexManager()
BluezQt::ObexManager::ObexManager |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ ~ObexManager()
BluezQt::ObexManager::~ObexManager |
( |
| ) |
|
|
override |
◆ createSession
PendingCall * BluezQt::ObexManager::createSession |
( |
const QString & |
destination, |
|
|
const QVariantMap & |
args |
|
) |
| |
|
slot |
Creates a new OBEX session.
The args
parameter is a dictionary to hold optional or type-specific parameters.
Typical parameters:
-
QString target - type of session to be created
-
QString source - device address to be used
Supported targets:
Possible errors: PendingCall::InvalidArguments, PendingCall::Failed
- Parameters
-
destination | address of target device |
args | session parameters |
- Returns
- QDBusObjectPath pending call
◆ init()
Creates a new init job.
- Returns
- init manager job
◆ isInitialized()
bool BluezQt::ObexManager::isInitialized |
( |
| ) |
const |
Returns whether the manager is initialized.
- Returns
- true if manager is initialized
◆ isOperational()
bool BluezQt::ObexManager::isOperational |
( |
| ) |
const |
Returns whether the manager is operational.
The manager is operational when initialization was successful and BlueZ session daemon is running.
- Returns
- true if manager is operational
◆ operationalChanged
void BluezQt::ObexManager::operationalChanged |
( |
bool |
operational | ) |
|
|
signal |
Indicates that operational state have changed.
◆ registerAgent
Registers agent.
This agent will be used to authorize an incoming object push requests.
Possible errors: PendingCall::AlreadyExists
- Parameters
-
agent | agent to be registered |
- Returns
- void pending call
◆ removeSession
PendingCall * BluezQt::ObexManager::removeSession |
( |
const QDBusObjectPath & |
session | ) |
|
|
slot |
◆ sessionAdded
void BluezQt::ObexManager::sessionAdded |
( |
ObexSessionPtr |
session | ) |
|
|
signal |
Indicates that the session was added.
◆ sessionForPath()
ObexSessionPtr BluezQt::ObexManager::sessionForPath |
( |
const QDBusObjectPath & |
path | ) |
const |
Returns a session for specified path.
The path
does not need to be equal to ObexSession path, startsWith test is performed in the search. That means you can use this method to get ObexSession from path returned by createSession().
- Parameters
-
- Returns
- null if there is no session with specified path
◆ sessionRemoved
void BluezQt::ObexManager::sessionRemoved |
( |
ObexSessionPtr |
session | ) |
|
|
signal |
Indicates that the session was removed.
◆ sessions()
QList< ObexSessionPtr > BluezQt::ObexManager::sessions |
( |
| ) |
const |
Returns a list of all sessions.
- Returns
- list of sessions
◆ startService()
static PendingCall * BluezQt::ObexManager::startService |
( |
| ) |
|
|
static |
Attempts to start org.bluez.obex service by D-Bus activation.
Possible return values are 1 if the service was started, 2 if the service is already running or error if the service could not be started.
- Returns
- quint32 pending call
◆ unregisterAgent
Unregisters agent.
Possible errors: PendingCall::DoesNotExist
- Parameters
-
agent | agent to be unregistered |
- Returns
- void pending call