connectivity.h
QAbstractListModel
QDBusConnection
QObject
QStringList
functional
memory
unity/util/DefinesPtrs.h
connectivityqt/vpn-connections-list-model.h
connectivityqt/connectivity.cpp
ubuntu/connectivity/networking-status.cpp
functional
QObject
QDBusObjectPath
connectivityqt/connectivity.h
connectivityqt/vpn-connection.h
unity/util/DefinesPtrs.h
QDBusConnection
QAbstractItemModel
connectivityqt/vpn-connections-list-model.h
QAbstractListModel
QStringList
memory
ubuntu/connectivity/networking-status.cpp
connectivityqt/connectivity.h
connectivityqt/connectivity.cpp
connectivityqt::Connectivity
connectivityqt

    /*
    *Copyright©2014CanonicalLtd.
    *
    *Thisprogramisfreesoftware:youcanredistributeitand/ormodifyit
    *underthetermsoftheGNULesserGeneralPublicLicenseversion3,
    *aspublishedbytheFreeSoftwareFoundation.
    *
    *Thisprogramisdistributedinthehopethatitwillbeuseful,
    *butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof
    *MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe
    *GNULesserGeneralPublicLicenseformoredetails.
    *
    *YoushouldhavereceivedacopyoftheGNULesserGeneralPublicLicense
    *alongwiththisprogram.Ifnot,see<http://www.gnu.org/licenses/>.
    *
    *Authors:
    *PeteWoods<pete.woods@canonical.com>
    */

    #pragmaonce

    #include<QAbstractListModel>
    #include<QDBusConnection>
    #include<QObject>
    #include<QStringList>
    #include<functional>
    #include<memory>

    #include<unity/util/DefinesPtrs.h>

    #include<connectivityqt/vpn-connections-list-model.h>

    namespaceconnectivityqt
    {

    classQ_DECL_EXPORTConnectivity:publicQObject
    {
    Q_OBJECT

    public:
    UNITY_DEFINES_PTRS(Connectivity);

    Q_DISABLE_COPY(Connectivity)

    Q_ENUMS(Limitations)
    Q_ENUMS(Status)

    staticvoidregisterMetaTypes();

    enumclassLimitations
    {
    Bandwith
    };

    enumclassStatus
    {
    Offline,
    Connecting,
    Online
    };

    Connectivity(constQDBusConnection&sessionConnection=QDBusConnection::sessionBus(),QObject*parent=0);

    Connectivity(conststd::function<void(QObject*)>&objectOwner,
    constQDBusConnection&sessionConnection=QDBusConnection::sessionBus(),
    QObject*parent=0);

    ~Connectivity();

    Q_PROPERTY(boolflightModeREADflightModeWRITEsetFlightModeNOTIFYflightModeUpdated)
    boolflightMode()const;

    Q_PROPERTY(boolonlineREADonlineNOTIFYonlineUpdated)
    boolonline()const;

    Q_PROPERTY(boollimitedBandwithREADlimitedBandwithNOTIFYlimitedBandwithUpdated)
    boollimitedBandwith()const;

    Q_PROPERTY(QVector<Limitations>LimitationsREADlimitationsNOTIFYlimitationsUpdated)
    QVector<Limitations>limitations()const;

    Q_PROPERTY(connectivityqt::Connectivity::StatusstatusREADstatusNOTIFYstatusUpdated)
    connectivityqt::Connectivity::Statusstatus()const;

    Q_PROPERTY(boolwifiEnabledREADwifiEnabledWRITEsetwifiEnabledNOTIFYwifiEnabledUpdated)
    boolwifiEnabled()const;

    Q_PROPERTY(boolunstoppableOperationHappeningREADunstoppableOperationHappeningNOTIFYunstoppableOperationHappeningUpdated)
    boolunstoppableOperationHappening()const;

    Q_PROPERTY(boolflightModeSwitchEnabledREADflightModeSwitchEnabledNOTIFYflightModeSwitchEnabledUpdated)
    boolflightModeSwitchEnabled()const;

    Q_PROPERTY(boolwifiSwitchEnabledREADwifiSwitchEnabledNOTIFYwifiSwitchEnabledUpdated)
    boolwifiSwitchEnabled()const;

    Q_PROPERTY(boolhotspotSwitchEnabledREADhotspotSwitchEnabledNOTIFYhotspotSwitchEnabledUpdated)
    boolhotspotSwitchEnabled()const;

    Q_PROPERTY(boolmodemAvailableREADmodemAvailableNOTIFYmodemAvailableUpdated)
    boolmodemAvailable()const;

    Q_PROPERTY(QByteArrayhotspotSsidREADhotspotSsidWRITEsetHotspotSsidNOTIFYhotspotSsidUpdated)
    QByteArrayhotspotSsid()const;

    Q_PROPERTY(QStringhotspotPasswordREADhotspotPasswordWRITEsetHotspotPasswordNOTIFYhotspotPasswordUpdated)
    QStringhotspotPassword()const;

    Q_PROPERTY(boolhotspotEnabledREADhotspotEnabledWRITEsetHotspotEnabledNOTIFYhotspotEnabledUpdated)
    boolhotspotEnabled()const;

    Q_PROPERTY(QStringhotspotModeREADhotspotModeWRITEsetHotspotModeNOTIFYhotspotModeUpdated)
    QStringhotspotMode()const;

    Q_PROPERTY(QStringhotspotAuthREADhotspotAuthWRITEsetHotspotAuthNOTIFYhotspotAuthUpdated)
    QStringhotspotAuth()const;

    Q_PROPERTY(boolhotspotStoredREADhotspotStoredNOTIFYhotspotStoredUpdated)
    boolhotspotStored()const;

    Q_PROPERTY(boolinitializedREADisInitializedNOTIFYinitialized)
    boolisInitialized()const;

    Q_PROPERTY(QAbstractItemModel*vpnConnectionsREADvpnConnectionsNOTIFYvpnConnectionsUpdated)
    QAbstractItemModel*vpnConnections()const;

    publicQ_SLOTS:
    voidsetFlightMode(boolenabled);

    voidsetwifiEnabled(boolenabled);

    voidsetHotspotEnabled(boolactive);

    voidsetHotspotSsid(constQByteArray&ssid);

    voidsetHotspotPassword(constQString&password);

    voidsetHotspotMode(constQString&mode);

    voidsetHotspotAuth(constQString&auth);

    Q_SIGNALS:
    voidflightModeUpdated(bool);

    voidonlineUpdated(boolvalue);

    voidlimitedBandwithUpdated(boolvalue);

    voidlimitationsUpdated(constQVector<Limitations>&);

    voidstatusUpdated(connectivityqt::Connectivity::Statusvalue);

    voidwifiEnabledUpdated(bool);

    voidunstoppableOperationHappeningUpdated(bool);

    voidflightModeSwitchEnabledUpdated(bool);

    voidwifiSwitchEnabledUpdated(bool);

    voidhotspotSwitchEnabledUpdated(bool);

    voidhotspotSsidUpdated(constQByteArray&name);

    voidhotspotPasswordUpdated(constQString&password);

    voidmodemAvailableUpdated(bool);

    voidhotspotEnabledUpdated(bool);

    voidhotspotModeUpdated(constQString&mode);

    voidhotspotAuthUpdated(constQString&auth);

    voidhotspotStoredUpdated(bool);

    voidreportError(intreason);

    voidinitialized();

    voidvpnConnectionsUpdated(QAbstractItemModel*);

    protected:
    classPriv;
    std::shared_ptr<Priv>d;
    };

    }

    Q_DECLARE_METATYPE(connectivityqt::Connectivity::Limitations)
    Q_DECLARE_METATYPE(QVector<connectivityqt::Connectivity::Limitations>)
    Q_DECLARE_METATYPE(connectivityqt::Connectivity::Status)