Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Public Types
  • Public Functions
  • Signals
  • Detailed Description

BaseStation Class

(Sailfish::Mdm::BaseStation)

Retrieves information about base stations. To use this class, clients must add the following to their qmake project: More...

Header: #include <mdm-basestation.h>
  • List of all members, including inherited members

Public Types

class BaseStationInfo

Public Functions

BaseStation(QObject *parent = 0)
virtual ~BaseStation()
QList<BaseStationInfo> getBaseStations()

Signals

void baseStationChanged(QList<BaseStationInfo> baseStations)

Detailed Description

Retrieves information about base stations. To use this class, clients must add the following to their qmake project:

 CONFIG += link_pkgconfig
 PKGCONFIG += sailfishmdm

and then #include <mdm-basestation.h>.

Example of usage:

 #include <mdm-basestation.h>

 void getBaseStations()
 {
     Sailfish::Mdm::BaseStation bs;
     QList<Sailfish::Mdm::BaseStation::BaseStationInfo> cells = bs.getBaseStations();
     qInfo() << "Base station:";
         for (Sailfish::Mdm::BaseStation::BaseStationInfo cell : cells) {
             if (cell.type == "gsm") {
                 qInfo() << cell.path << "gsm" << cell.registered
                         << "mcc:" << cell.mcc << "mnc:" << cell.mnc
                         << "lac:" << cell.lac << "cid:" << cell.cid
                         << "signalStrength:" << cell.signalStrength;
             } else if (cell.type == "wcdma") {
                 qInfo() << cell.path << "wcdma" << cell.registered
                         << "mcc:" << cell.mcc << "mnc:" << cell.mnc
                         << "lac:" << cell.lac << "cid:" << cell.cid
                         << "psc:" << cell.psc
                         << "signalStrength:" << cell.signalStrength;
             } else if (cell.type == "lte") {
                 qInfo() << cell.path << "lte" << cell.registered
                         << "mcc:" << cell.mcc << "mnc:" << cell.mnc
                         << "ci:" << cell.ci << "pci:" << cell.pci
                         << "tac:" << cell.tac
                         << "signalStrength:" << cell.signalStrength
                         << "rsrp:" << cell.rsrp << "rsrq:" << cell.rsrq
                         << "rssnr:" << cell.rssnr << "cqi:" << cell.cqi;
             } else {
                 qInfo() << cell.path << "unknown" << cell.registered;
             }
         }

 }

Member Function Documentation

BaseStation::BaseStation(QObject *parent = 0)

Constructs a BaseStation instance with the given parent.

[virtual] BaseStation::~BaseStation()

Destroys the BaseStation instance.

[signal] void BaseStation::baseStationChanged(QList<BaseStationInfo> baseStations)

QList<BaseStationInfo> BaseStation::getBaseStations()

Returns a list of BaseStationInfo instances.

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn