PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/thirdparty/liblastfm2/src/ws/linux/LNetworkConnectionMonitor.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 54 lines | 26 code | 9 blank | 19 comment | 0 complexity | 70e2f126f08808bc894e99a97044fa79 MD5 | raw file
 1/*
 2   Copyright 2010 Last.fm Ltd.
 3      - Primarily authored by Max Howell, Jono Cole and Doug Mansell
 4
 5   This file is part of liblastfm.
 6
 7   liblastfm is free software: you can redistribute it and/or modify
 8   it under the terms of the GNU General Public License as published by
 9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   liblastfm is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with liblastfm.  If not, see <http://www.gnu.org/licenses/>.
19*/
20
21
22#ifndef LNETWORK_CONNECTION_MONITOR_H
23#define LNETWORK_CONNECTION_MONITOR_H
24
25#include "../NetworkConnectionMonitor.h"
26#include <lastfm/global.h>
27#include <QObject>
28
29class QDBusConnection;
30class QDBusInterface;
31
32class LNetworkConnectionMonitor : public NetworkConnectionMonitor
33{
34    Q_OBJECT
35
36    enum NMState
37    {
38        Unknown=1,
39        Asleep,
40        Connected,
41        Disconnected
42    };
43
44public:
45    LNetworkConnectionMonitor( QObject* parent = 0 );
46    ~LNetworkConnectionMonitor();
47private slots:
48    void onStateChange( uint newState );
49private:
50    QDBusInterface* m_nmInterface;
51};
52
53#endif // LNETWORK_CONNECTION_MONITOR_H
54