ModemManager::ModemLocation Class
class ModemManager::ModemLocationThe ModemLocation class. More...
| Header: | #include <ModemManagerQt/ModemLocation> |
| CMake: | find_package(KF6 REQUIRED COMPONENTS ModemManagerQt)target_link_libraries(mytarget PRIVATE KF6::ModemManagerQt) |
| Inherits: | ModemManager::Interface |
Public Types
Public Functions
| ModemLocation(const QString &path, QObject *parent = nullptr) | |
(since 6.24.0) QStringList | assistanceDataServers() const |
| ModemManager::ModemLocation::LocationSources | capabilities() const |
| ModemManager::ModemLocation::LocationSources | enabledCapabilities() const |
| QDBusPendingReply<ModemManager::LocationInformationMap> | getLocation() |
(since 6.24.0) uint | gpsRefreshRate() const |
(since 6.24.0) QDBusPendingReply<void> | injectAssistanceData(const QByteArray &data) |
| bool | isEnabled() const |
| ModemManager::LocationInformationMap | location() const |
(since 6.24.0) QDBusPendingReply<void> | setGpsRefreshRate(uint rate) |
(since 6.24.0) QDBusPendingReply<void> | setSuplServer(const QString &server) |
| void | setTimeout(int timeout) |
| QDBusPendingReply<void> | setup(ModemManager::ModemLocation::LocationSources sources, bool signalLocation) |
| bool | signalsLocation() const |
(since 6.24.0) QString | suplServer() const |
(since 6.24.0) ModemManager::ModemLocation::AssistanceDataTypes | supportedAssistanceData() const |
| int | timeout() const |
Signals
(since 6.24.0) void | assistanceDataServersChanged(const QStringList &servers) |
| void | capabilitiesChanged(QFlags<MMModemLocationSource> capabilities) |
| void | enabledCapabilitiesChanged(QFlags<MMModemLocationSource> capabilities) |
(since 6.24.0) void | gpsRefreshRateChanged(uint rate) |
| void | locationChanged(const ModemManager::LocationInformationMap &location) |
| void | signalsLocationChanged(bool signalsLocation) |
(since 6.24.0) void | suplServerChanged(const QString &server) |
(since 6.24.0) void | supportedAssistanceDataChanged(QFlags<MMModemLocationAssistanceDataType> supported) |
Detailed Description
The Location class allows devices to provide location information to client applications. Not all devices can provide this information, or even if they do, they may not be able to provide it while a data session is active.
Member Type Documentation
ModemLocation::List
ModemLocation::Ptr
Member Function Documentation
[explicit] ModemLocation::ModemLocation(const QString &path, QObject *parent = nullptr)
[since 6.24.0] QStringList ModemLocation::assistanceDataServers() const
Returns the list of assistance data servers.
This function was introduced in 6.24.0.
[signal, since 6.24.0] void ModemLocation::assistanceDataServersChanged(const QStringList &servers)
This function was introduced in 6.24.0.
ModemManager::ModemLocation::LocationSources ModemLocation::capabilities() const
Returns QFlags of MMModemLocationSource values, specifying the supported location sources.
[signal] void ModemLocation::capabilitiesChanged(QFlags<MMModemLocationSource> capabilities)
ModemManager::ModemLocation::LocationSources ModemLocation::enabledCapabilities() const
Returns QFlags specifying which of the supported MMModemLocationSource location sources is currently enabled in the device.
[signal] void ModemLocation::enabledCapabilitiesChanged(QFlags<MMModemLocationSource> capabilities)
QDBusPendingReply<ModemManager::LocationInformationMap> ModemLocation::getLocation()
Returns current location information, if any. If the modem supports multiple location types it may return more than one. See the "Location" property for more information on the dictionary returned at location.
This method may require the client to authenticate itself.
[since 6.24.0] uint ModemLocation::gpsRefreshRate() const
Returns the GPS refresh rate in seconds.
This function was introduced in 6.24.0.
See also setGpsRefreshRate().
[signal, since 6.24.0] void ModemLocation::gpsRefreshRateChanged(uint rate)
This function was introduced in 6.24.0.
[since 6.24.0] QDBusPendingReply<void> ModemLocation::injectAssistanceData(const QByteArray &data)
Inject assistance data into the modem.
This function was introduced in 6.24.0.
bool ModemLocation::isEnabled() const
Returns whether the device has any location capabilities
ModemManager::LocationInformationMap ModemLocation::location() const
Returns Dictionary of available location information when location information gathering is enabled. If the modem supports multiple location types it may return more than one here. Note that if the device was told not to emit updated location information when location information gathering was initially enabled, this property may not return any location information for security reasons.
[signal] void ModemLocation::locationChanged(const ModemManager::LocationInformationMap &location)
Emitted when the location has changed
[since 6.24.0] QDBusPendingReply<void> ModemLocation::setGpsRefreshRate(uint rate)
Set the refresh rate for the GPS engine.
This function was introduced in 6.24.0.
See also gpsRefreshRate().
[since 6.24.0] QDBusPendingReply<void> ModemLocation::setSuplServer(const QString &server)
Set the SUPL server to use for A-GPS.
This function was introduced in 6.24.0.
See also suplServer().
void ModemLocation::setTimeout(int timeout)
Sets the timeout in milliseconds for all async method DBus calls. -1 means the default DBus timeout (usually 25 seconds).
See also timeout().
QDBusPendingReply<void> ModemLocation::setup(ModemManager::ModemLocation::LocationSources sources, bool signalLocation)
Configure the location sources to use when gathering location information. Also enable or disable location information gathering. This method may require the client to authenticate itself.
When signals are emitted, any client application (including malicious ones!) can listen for location updates unless D-Bus permissions restrict these signals from certain users. If further security is desired, the signLocation argument can be set to FALSE to disable location updates via the locationChanged() signal and require applications to call authenticated APIs (like GetLocation() ) to get location information.
bool ModemLocation::signalsLocation() const
Returns TRUE if location updates will be emitted via the locationChanged() signal, FALSE if location updates will not be emitted.
See the setup() method for more information.
[signal] void ModemLocation::signalsLocationChanged(bool signalsLocation)
[since 6.24.0] QString ModemLocation::suplServer() const
Returns the configured SUPL server.
This function was introduced in 6.24.0.
See also setSuplServer().
[signal, since 6.24.0] void ModemLocation::suplServerChanged(const QString &server)
This function was introduced in 6.24.0.
[since 6.24.0] ModemManager::ModemLocation::AssistanceDataTypes ModemLocation::supportedAssistanceData() const
Returns supported assistance data types.
This function was introduced in 6.24.0.
[signal, since 6.24.0] void ModemLocation::supportedAssistanceDataChanged(QFlags<MMModemLocationAssistanceDataType> supported)
This function was introduced in 6.24.0.
int ModemLocation::timeout() const
Returns the current value of the DBus timeout in milliseconds. -1 means the default DBus timeout (usually 25 seconds).
See also setTimeout().