/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. This file is part of liblastfm.
  5. liblastfm is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. liblastfm is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with liblastfm. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef MNETWORK_CONNECTION_MONITOR_H
  17. #define MNETWORK_CONNECTION_MONITOR_H
  18. #include "../NetworkConnectionMonitor.h"
  19. #include <lastfm/global.h>
  20. #include <QObject>
  21. #ifdef Q_WS_MAC
  22. #include <SystemConfiguration/SCNetwork.h> //TODO remove
  23. #include <SystemConfiguration/SCNetworkReachability.h>
  24. #endif
  25. class __SCNetworkReachability;
  26. class MNetworkConnectionMonitor : public NetworkConnectionMonitor
  27. {
  28. Q_OBJECT
  29. public:
  30. MNetworkConnectionMonitor( QObject* parent = 0 );
  31. ~MNetworkConnectionMonitor();
  32. private slots:
  33. private:
  34. #ifdef Q_WS_MAC
  35. static void callback( SCNetworkReachabilityRef target,
  36. SCNetworkConnectionFlags flags,
  37. void *info );
  38. #endif
  39. };
  40. #endif // MNETWORK_CONNECTION_MONITOR_H