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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/cds_model/hcontentduration.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) 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP Av (HUPnPAv) library.
 
7
 *
 
8
 *  Herqq UPnP Av is free software: you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU 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 Av 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 General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with Herqq UPnP Av. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#ifndef HCONTENTDURATION_H_
 
23
#define HCONTENTDURATION_H_
 
24
 
 
25
#include <HUpnpAv/HUpnpAv>
 
26
 
 
27
#include <QtCore/QMetaType>
 
28
#include <QtCore/QSharedDataPointer>
 
29
 
 
30
class QTime;
 
31
 
 
32
namespace Herqq
 
33
{
 
34
 
 
35
namespace Upnp
 
36
{
 
37
 
 
38
namespace Av
 
39
{
 
40
 
 
41
class HContentDurationPrivate;
 
42
 
 
43
/*!
 
44
 * \brief This class is used to represent duration of media content as specified
 
45
 * in the ContentDirectory:3 specification.
 
46
 *
 
47
 * \headerfile hcontentduration.h HContentDuration
 
48
 *
 
49
 * \ingroup hupnp_av_cds_common
 
50
 *
 
51
 * \remarks This class is not thread-safe.
 
52
 */
 
53
class H_UPNP_AV_EXPORT HContentDuration
 
54
{
 
55
private:
 
56
 
 
57
    QSharedDataPointer<HContentDurationPrivate> h_ptr;
 
58
 
 
59
public:
 
60
 
 
61
    /*!
 
62
     * \brief Creates a new, empty instance.
 
63
     */
 
64
    HContentDuration();
 
65
 
 
66
    /*!
 
67
     * \brief Creates a new instance.
 
68
     *
 
69
     * \param arg specifies the duration. The expected format is:
 
70
     * <c>'P' [n 'D'] time</c>, where n is an integer, P and D are constant
 
71
     * characters and time is a ISO 8601 compatible value for time.
 
72
     * The number of days component is optional.
 
73
     *
 
74
     * \sa isValid()
 
75
     */
 
76
    HContentDuration(const QString& arg);
 
77
 
 
78
    /*!
 
79
     * \brief Copy constructor.
 
80
     *
 
81
     * Creates a copy of \c other.
 
82
     */
 
83
    HContentDuration(const HContentDuration&);
 
84
 
 
85
    /*!
 
86
     * \brief Assignment operator.
 
87
     *
 
88
     * Copies the contents of \c other to this.
 
89
     */
 
90
    HContentDuration& operator=(const HContentDuration&);
 
91
 
 
92
    /*!
 
93
     * \brief Destroys the instance.
 
94
     */
 
95
    ~HContentDuration();
 
96
 
 
97
    /*!
 
98
     * \brief Indicates if the object is valid.
 
99
     *
 
100
     * \return \e if the object is valid.
 
101
     */
 
102
    bool isValid() const;
 
103
 
 
104
    /*!
 
105
     * \brief Returns the number of days of the duration.
 
106
     *
 
107
     * \return The number of days of the duration.
 
108
     */
 
109
    qint32 days() const;
 
110
 
 
111
    /*!
 
112
     * \brief Returns the time component of the duration.
 
113
     *
 
114
     * \return The time component of the duration.
 
115
     */
 
116
    QTime time() const;
 
117
 
 
118
    /*!
 
119
     * \brief Returns a string representation of the object.
 
120
     *
 
121
     * \return a string representation of the object.
 
122
     */
 
123
    QString toString() const;
 
124
 
 
125
    /*!
 
126
     * \brief Specifies the number of days of the duration.
 
127
     *
 
128
     * \param arg the number of days of the duration.
 
129
     */
 
130
    void setDays(qint32 arg);
 
131
 
 
132
    /*!
 
133
     * \brief Specifies the time component of the duration.
 
134
     *
 
135
     * \param arg specifies the time component of the duration.
 
136
     */
 
137
    void setTime(const QTime& arg);
 
138
};
 
139
 
 
140
/*!
 
141
 * Compares the two objects for equality.
 
142
 *
 
143
 * \return \e true in case the objects are logically equivalent.
 
144
 *
 
145
 * \relates HContentDuration
 
146
 */
 
147
H_UPNP_AV_EXPORT bool operator==(const HContentDuration& obj1, const HContentDuration& obj2);
 
148
 
 
149
/*!
 
150
 * Compares the two objects for inequality.
 
151
 *
 
152
 * \return \e true in case the objects are not logically equivalent.
 
153
 *
 
154
 * \relates HSoHContentDurationrtInfo
 
155
 */
 
156
inline bool operator!=(const HContentDuration& obj1, const HContentDuration& obj2)
 
157
{
 
158
    return !(obj1 == obj2);
 
159
}
 
160
 
 
161
}
 
162
}
 
163
}
 
164
 
 
165
Q_DECLARE_METATYPE(Herqq::Upnp::Av::HContentDuration)
 
166
 
 
167
#endif /* HCONTENTDURATION_H_ */