~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/hdatetimerange.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-09-27 21:41:30 UTC
  • mfrom: (1.2.43)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20120927214130-i8v3ufr21nesp29i
Tags: 4:3.0.0~beta1a-1
* New upstream release

* Fix "wrongly conflicts phonon-backend-vlc" dropped (Closes: #688142)
* debian/watch include download.kde.org

* digikam 3.0.0 uses features from unreleased kdegraphics >=4.10 & ships 
a private version of the kdegraphics libs - this is not the Debian way :-(
* Unsatisfactory Conflicts: libkipi8, libkexiv2-10, libkdcraw20, libksane0
* Suspend digikam-dbg >130Mb

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 HDATETIMERANGE_H_
 
23
#define HDATETIMERANGE_H_
 
24
 
 
25
#include <HUpnpAv/HUpnpAv>
 
26
 
 
27
#include <QtCore/QMetaType>
 
28
#include <QtCore/QSharedDataPointer>
 
29
 
 
30
class QDateTime;
 
31
 
 
32
namespace Herqq
 
33
{
 
34
 
 
35
namespace Upnp
 
36
{
 
37
 
 
38
namespace Av
 
39
{
 
40
 
 
41
class HDateTimeRangePrivate;
 
42
 
 
43
/*!
 
44
 * \brief This class is used to specify a time range.
 
45
 *
 
46
 * \headerfile hdatetimerange.h HDateTimeRange
 
47
 *
 
48
 * \ingroup hupnp_av_cds_common
 
49
 *
 
50
 * \remarks This class is not thread-safe.
 
51
 */
 
52
class H_UPNP_AV_EXPORT HDateTimeRange
 
53
{
 
54
private:
 
55
 
 
56
    QSharedDataPointer<HDateTimeRangePrivate> h_ptr;
 
57
 
 
58
public:
 
59
 
 
60
    /*!
 
61
     * Creates a new, invalid instance.
 
62
     *
 
63
     * \sa isValid()
 
64
     */
 
65
    HDateTimeRange();
 
66
 
 
67
    /*!
 
68
     * \brief Creates a new instance.
 
69
     *
 
70
     * \param value specifies the date time range. The expected format is:
 
71
     * <c>start datetime value '/' end datetime value</c>. The datetime values
 
72
     * are expected to follow ISO 8601.
 
73
     *
 
74
     * \param dlSaving specifies the daylight saving reference point.
 
75
     *
 
76
     * \sa isValid()
 
77
     */
 
78
    HDateTimeRange(const QString& value, HDaylightSaving dlSaving = Unknown_DaylightSaving);
 
79
 
 
80
    /*!
 
81
     * \brief Copy constructor.
 
82
     *
 
83
     * Creates a copy of \c other.
 
84
     */
 
85
    HDateTimeRange(const HDateTimeRange&);
 
86
 
 
87
    /*!
 
88
     * \brief Assignment operator.
 
89
     *
 
90
     * Copies the contents of \c other to this.
 
91
     */
 
92
    HDateTimeRange& operator=(const HDateTimeRange&);
 
93
 
 
94
    /*!
 
95
     * \brief Destroys the instance.
 
96
     */
 
97
    ~HDateTimeRange();
 
98
 
 
99
    /*!
 
100
     * \brief Indicates if the object is valid.
 
101
     *
 
102
     * \return \e true when the object is valid, i.e. the startTime() and endTime()
 
103
     * are defined.
 
104
     */
 
105
    bool isValid() const;
 
106
 
 
107
    /*!
 
108
     * \brief Returns the starting date time value.
 
109
     *
 
110
     * \return The starting date time value.
 
111
     *
 
112
     * \sa setStartTime()
 
113
     */
 
114
    QDateTime startTime() const;
 
115
 
 
116
    /*!
 
117
     * \brief Returns the ending date time value.
 
118
     *
 
119
     * \return The ending date time value.
 
120
     *
 
121
     * \sa setEndTime()
 
122
     */
 
123
    QDateTime endTime() const;
 
124
 
 
125
    /*!
 
126
     * \brief Indicates whether the range is expressed using either Daylight Saving
 
127
     * or Standard Time as a point of reference.
 
128
     *
 
129
     * \return a value indicating whether the range is expressed using either
 
130
     * Daylight Saving or Standard Time as a point of reference.
 
131
     *
 
132
     * \sa setDaylightSaving()
 
133
     */
 
134
    HDaylightSaving daylightSaving() const;
 
135
 
 
136
    /*!
 
137
     * \brief Returns a string representation of the object.
 
138
     *
 
139
     * \return a string representation of the object.
 
140
     */
 
141
    QString toString() const;
 
142
 
 
143
    /*!
 
144
     * \brief Specifies the starting date time value.
 
145
     *
 
146
     * \param value specifies the starting date time value.
 
147
     *
 
148
     * \sa startTime()
 
149
     */
 
150
    void setStartTime(const QDateTime& value);
 
151
 
 
152
    /*!
 
153
     * \brief Specifies the ending date time value.
 
154
     *
 
155
     * \param value specifies the ending date time value.
 
156
     *
 
157
     * \sa endTime()
 
158
     */
 
159
    void setEndTime(const QDateTime& value);
 
160
 
 
161
    /*!
 
162
     * \brief Specifies whether the value() is expressed using either Daylight Saving
 
163
     * or Standard Time as a point of reference.
 
164
     *
 
165
     * \param arg specifies whether the value() is expressed using either Daylight Saving
 
166
     * or Standard Time as a point of reference.
 
167
     *
 
168
     * \sa daylightSaving()
 
169
     */
 
170
    void setDaylightSaving(HDaylightSaving arg);
 
171
};
 
172
 
 
173
/*!
 
174
 * Compares the two objects for equality.
 
175
 *
 
176
 * \return \e true in case the objects are logically equivalent.
 
177
 *
 
178
 * \relates HDateTimeRange
 
179
 */
 
180
H_UPNP_AV_EXPORT bool operator==(const HDateTimeRange& obj1, const HDateTimeRange& obj2);
 
181
 
 
182
/*!
 
183
 * Compares the two objects for inequality.
 
184
 *
 
185
 * \return \e true in case the objects are not logically equivalent.
 
186
 *
 
187
 * \relates HDateTimeRange
 
188
 */
 
189
inline bool operator!=(const HDateTimeRange& obj1, const HDateTimeRange& obj2)
 
190
{
 
191
    return !(obj1 == obj2);
 
192
}
 
193
 
 
194
}
 
195
}
 
196
}
 
197
 
 
198
Q_DECLARE_METATYPE(Herqq::Upnp::Av::HDateTimeRange)
 
199
 
 
200
#endif /* HDATETIMERANGE_H_ */