lomiri::connectivity::NetworkingStatus Class Reference

Overall system networking status. More...

`#include <lomiri/connectivity/networking-status.h>`

Inheritance diagram for lomiri::connectivity::NetworkingStatus:
[legend]
Collaboration diagram for lomiri::connectivity::NetworkingStatus:
[legend]

## Public Types

enum | Limitations { Bandwidth }
| enum for networking limitations More...
enum | Status { Offline , Connecting , Online }
| enum for networking status More...

## Public Slots

void | limitationsUpdated (const QVector< connectivityqt::Connectivity::Limitations > &)
void | statusUpdated (connectivityqt::Connectivity::Status value)

## Signals

Q_DECL_DEPRECATED void | limitationsChanged ()
Q_DECL_DEPRECATED void | statusChanged (Status value)

## Public Member Functions

| Private (NetworkingStatus &parent)
| NetworkingStatus (QObject *parent=0)
virtual | ~NetworkingStatus ()
Q_DECL_DEPRECATED QVector< Limitations > | limitations () const
Q_DECL_DEPRECATED Status | status () const

## Public Attributes

NetworkingStatus & | p
connectivityqt::Connectivity::SPtr | m_connectivity

## Properties

QVector< Limitations > | limitations
lomiri::connectivity::NetworkingStatus::Status | status

## Detailed Description

Overall system networking status.

NOTE: This class is deprecated, please move to using connectivityqt::Connectivity

This is the top-level class for accessing networking information.

- For system networking status, see NetworkingStatus::status.
- For connection limitations, see NetworkingStatus::limitations.

Examples:

- Getting the networking status.

## Member Enumeration Documentation

## Limitations

enum lomiri::connectivity::NetworkingStatus::Limitations

enum for networking limitations

Networking limitations may be accessed through the NetworkingStatus::limitations property.

Enumerator
Bandwidth | indicates that the bandwidth of the Internet connection has limitations. Applications should minimize their bandwidth usage if possible.

## Status

enum lomiri::connectivity::NetworkingStatus::Status

enum for networking status

Networking status may be accessed through the NetworkingStatus::status property.

Enumerator
Offline | No Internet connection available.
Connecting | System is actively establising a connection.
Online | System is connected to the Internet.

## Constructor & Destructor Documentation

## NetworkingStatus()

lomiri::connectivity::NetworkingStatus::NetworkingStatus | ( | QObject * | parent = `0` | ) |

explicit

## ~NetworkingStatus()

lomiri::connectivity::NetworkingStatus::~NetworkingStatus | ( |  | ) |

virtual

## Member Function Documentation

## limitations()

QVector< NetworkingStatus::Limitations > lomiri::connectivity::NetworkingStatus::limitations | ( |  | ) | const

See also
  NetworkingStatus::limitations

## limitationsChanged

Q_DECL_DEPRECATED void lomiri::connectivity::NetworkingStatus::limitationsChanged | ( |  | ) |

signal

See also
  NetworkingStatus::limitations

## limitationsUpdated

void lomiri::connectivity::NetworkingStatus::limitationsUpdated | ( | const QVector< connectivityqt::Connectivity::Limitations > & |  | ) |

inline slot

## Private()

lomiri::connectivity::NetworkingStatus::Private | ( | NetworkingStatus & | parent | ) |

inline

## status()

NetworkingStatus::Status lomiri::connectivity::NetworkingStatus::status | ( |  | ) | const

See also
  NetworkingStatus::status

## statusChanged

Q_DECL_DEPRECATED void lomiri::connectivity::NetworkingStatus::statusChanged | ( | Status | value | ) |

signal

See also
  NetworkingStatus::status

## statusUpdated

void lomiri::connectivity::NetworkingStatus::statusUpdated | ( | connectivityqt::Connectivity::Status | value | ) |

inline slot

## Member Data Documentation

## m_connectivity

connectivityqt::Connectivity::SPtr lomiri::connectivity::NetworkingStatus::m_connectivity

## p

NetworkingStatus& lomiri::connectivity::NetworkingStatus::p

## Property Documentation

## limitations

QVector<Limitations> lomiri::connectivity::NetworkingStatus::limitations

read

limitations of the overall system networking

@initvalue {} @accessors limitations() @notify limitationsChanged()

// normal getter
if (ns->limitations().isEmpty())
qDebug() << "No limitations";
// Subscribe to limitation changes
QObject::connect(ns.data(),
&Connectivity::limitationsUpdated,
[&ns](){
if (ns->limitations().isEmpty())
{
qDebug() << "No limitations.";
return;
}
qDebug() << "Limitations:";
if (ns->limitations().contains(Connectivity::Limitations::Bandwidth))
{
qDebug() << " - Bandwidth";
}
});

## status

lomiri::connectivity::NetworkingStatus::Status lomiri::connectivity::NetworkingStatus::status

read

status of the overall system networking

@initvalue NetworkingStatus::Online @accessors status() @notify statusChanged()

// normal getter
if (ns->status() == Connectivity::Status::Online)
{
qDebug() << "We are online.";
}
// Subscribe to system networking changes
QObject::connect(ns.data(),
&Connectivity::statusUpdated,
[](Connectivity::Status value)
{
qDebug() << "System networking status changed to: " + STATUS_MAP[value];
});

The documentation for this class was generated from the following files:

- networking-status.cpp
- networking-status.h