/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. 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 NETWORK_CONNECTION_MONITOR_H
  17. #define NETWORK_CONNECTION_MONITOR_H
  18. #include <lastfm/global.h>
  19. #include <QObject>
  20. class LASTFM_DLLEXPORT NetworkConnectionMonitor : public QObject
  21. {
  22. Q_OBJECT
  23. public:
  24. NetworkConnectionMonitor( QObject *parent = 0 );
  25. ~NetworkConnectionMonitor();
  26. bool isConnected() const;
  27. signals:
  28. void networkUp();
  29. void networkDown();
  30. protected:
  31. void setConnected( bool connected );
  32. private:
  33. bool m_connected;
  34. };
  35. #endif // NETWORK_CONNECTION_MONITOR_H