~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp/src/devicehosting/messages/hsid_p.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2010, 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP (HUPnP) library.
 
7
 *
 
8
 *  Herqq UPnP is free software: you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU Lesser General Public License as published by
 
10
 *  the Free Software Foundation, either version 3 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  Herqq UPnP is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
 *  GNU Lesser General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU Lesser General Public License
 
19
 *  along with Herqq UPnP. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#ifndef HSID_H_
 
23
#define HSID_H_
 
24
 
 
25
#include <QtCore/QUuid>
 
26
#include <QtCore/QString>
 
27
 
 
28
//
 
29
// !! Warning !!
 
30
//
 
31
// This file is not part of public API and it should
 
32
// never be included in client code. The contents of this file may
 
33
// change or the file may be removed without of notice.
 
34
//
 
35
 
 
36
namespace Herqq
 
37
{
 
38
 
 
39
namespace Upnp
 
40
{
 
41
 
 
42
//
 
43
// Implementation note: this class cannot enforce the requirement of a valid UUID,
 
44
// since there are UPnP software that do not generate and use valid UUIDs.
 
45
// Because of this, the class "accepts" any string. However, validity can be checked
 
46
// with the isValid(). **Do NOT change the semantics of this class**
 
47
class HSid
 
48
{
 
49
friend quint32 qHash(const HSid& key);
 
50
friend bool operator==(const HSid&, const HSid&);
 
51
 
 
52
private:
 
53
 
 
54
    QUuid m_value;
 
55
    QString m_valueAsStr;
 
56
 
 
57
public:
 
58
 
 
59
    HSid();
 
60
    explicit HSid(const QUuid&);
 
61
    explicit HSid(const QString&);
 
62
    HSid(const HSid&);
 
63
 
 
64
    ~HSid();
 
65
 
 
66
    HSid& operator=(const HSid&);
 
67
    HSid& operator=(const QUuid&);
 
68
    HSid& operator=(const QString&);
 
69
 
 
70
    inline QUuid value() const
 
71
    {
 
72
        return m_value;
 
73
    }
 
74
 
 
75
    inline QString toString() const
 
76
    {
 
77
        return m_valueAsStr;
 
78
    }
 
79
 
 
80
    inline bool isValid()const
 
81
    {
 
82
        return !m_value.isNull();
 
83
    }
 
84
 
 
85
    inline bool isEmpty() const
 
86
    {
 
87
        return m_valueAsStr.isEmpty();
 
88
    }
 
89
};
 
90
 
 
91
bool operator==(const HSid&, const HSid&);
 
92
inline bool operator!=(const HSid& obj1, const HSid& obj2)
 
93
{
 
94
    return !(obj1 == obj2);
 
95
}
 
96
 
 
97
quint32 qHash(const HSid& key);
 
98
 
 
99
}
 
100
}
 
101
 
 
102
#endif /* HSID_H_ */