/src/libtomahawk/sip/SipInfo.h

http://github.com/tomahawk-player/tomahawk · C Header · 69 lines · 34 code · 18 blank · 17 comment · 0 complexity · 7282294c2ccd812e37f0679194903c1c MD5 · raw file

  1. /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
  2. *
  3. * Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
  4. *
  5. * Tomahawk 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. *
  10. * Tomahawk is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef SIPINFO_H
  19. #define SIPINFO_H
  20. #include <QSharedPointer>
  21. #include "DllMacro.h"
  22. class SipInfoPrivate;
  23. class DLLEXPORT SipInfo : public QObject
  24. {
  25. Q_OBJECT
  26. public:
  27. SipInfo();
  28. SipInfo(const SipInfo& other);
  29. virtual ~SipInfo();
  30. SipInfo& operator=(const SipInfo& info);
  31. void clear();
  32. bool isValid() const;
  33. void setVisible( bool visible );
  34. bool isVisible() const;
  35. void setHost( const QString& host );
  36. const QString host() const;
  37. void setPort( int port );
  38. int port() const;
  39. void setNodeId( const QString& nodeId );
  40. const QString nodeId() const;
  41. void setKey( const QString& key );
  42. const QString key() const;
  43. const QString toJson() const;
  44. static const SipInfo fromJson( QString json );
  45. const QString debugString() const;
  46. private:
  47. QSharedDataPointer<SipInfoPrivate> d;
  48. };
  49. DLLEXPORT QDebug operator<<( QDebug dbg, const SipInfo &info );
  50. DLLEXPORT bool operator==( const SipInfo& one, const SipInfo& two );
  51. #endif // SIPINFO_H