PageRenderTime 62ms CodeModel.GetById 37ms app.highlight 3ms RepoModel.GetById 13ms app.codeStats 8ms

/thirdparty/liblastfm2/src/ws/NetworkConnectionMonitor.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 46 lines | 20 code | 7 blank | 19 comment | 0 complexity | c0f2c10b5994e18e3d5283b8081a191e MD5 | raw file
 1/*
 2   Copyright 2010 Last.fm Ltd.
 3      - Primarily authored by Jono Cole, Michael Coffey, and William Viana
 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#ifndef NETWORK_CONNECTION_MONITOR_H
22#define NETWORK_CONNECTION_MONITOR_H
23
24#include <lastfm/global.h>
25#include <QObject>
26
27class LASTFM_DLLEXPORT NetworkConnectionMonitor : public QObject
28{
29    Q_OBJECT
30public:
31    NetworkConnectionMonitor( QObject *parent = 0 );
32    ~NetworkConnectionMonitor();
33    bool isConnected() const;
34
35signals:
36    void networkUp();
37    void networkDown();
38
39protected:
40    void setConnected( bool connected );
41
42private:
43    bool m_connected;
44};
45
46#endif // NETWORK_CONNECTION_MONITOR_H