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

/thirdparty/liblastfm2/src/ws/mac/MNetworkConnectionMonitor.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 52 lines | 25 code | 8 blank | 19 comment | 0 complexity | 3600f1fec7184a013210136144f5d4a7 MD5 | raw file
 1/*
 2   Copyright 2009 Last.fm Ltd.
 3      - Primarily authored by Jono Cole and Michael Coffey
 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 MNETWORK_CONNECTION_MONITOR_H
22#define MNETWORK_CONNECTION_MONITOR_H
23
24#include "../NetworkConnectionMonitor.h"
25#include <lastfm/global.h>
26#include <QObject>
27
28#ifdef Q_WS_MAC
29#include <SystemConfiguration/SCNetwork.h> //TODO remove
30#include <SystemConfiguration/SCNetworkReachability.h>
31#endif
32
33class __SCNetworkReachability;
34
35class MNetworkConnectionMonitor : public NetworkConnectionMonitor
36{
37    Q_OBJECT
38public:
39    MNetworkConnectionMonitor( QObject* parent = 0 );
40    ~MNetworkConnectionMonitor();
41private slots:
42
43private:
44#ifdef Q_WS_MAC
45    static void callback( SCNetworkReachabilityRef target,
46                          SCNetworkConnectionFlags flags,
47                          void *info );
48#endif
49};
50
51#endif // MNETWORK_CONNECTION_MONITOR_H
52