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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/transport/htransportsettings.cpp

  • 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
#include "htransportsettings.h"
 
23
 
 
24
#include <HUpnpAv/HPlayMode>
 
25
#include <HUpnpAv/HRecordQualityMode>
 
26
 
 
27
#include <QtCore/QString>
 
28
 
 
29
namespace Herqq
 
30
{
 
31
 
 
32
namespace Upnp
 
33
{
 
34
 
 
35
namespace Av
 
36
{
 
37
 
 
38
/*******************************************************************************
 
39
 * HTransportSettingsPrivate
 
40
 ******************************************************************************/
 
41
class HTransportSettingsPrivate :
 
42
    public QSharedData
 
43
{
 
44
H_DISABLE_ASSIGN(HTransportSettingsPrivate)
 
45
 
 
46
public:
 
47
    HPlayMode m_playMode;
 
48
    HRecordQualityMode m_rQualityMode;
 
49
 
 
50
    HTransportSettingsPrivate() :
 
51
        m_playMode(), m_rQualityMode()
 
52
    {
 
53
    }
 
54
};
 
55
 
 
56
/*******************************************************************************
 
57
 * HTransportSettings
 
58
 ******************************************************************************/
 
59
HTransportSettings::HTransportSettings() :
 
60
    h_ptr(new HTransportSettingsPrivate())
 
61
{
 
62
}
 
63
 
 
64
HTransportSettings::HTransportSettings(
 
65
    const HPlayMode& pm, const HRecordQualityMode& rqm) :
 
66
        h_ptr(new HTransportSettingsPrivate())
 
67
{
 
68
    h_ptr->m_playMode = pm;
 
69
    h_ptr->m_rQualityMode = rqm;
 
70
}
 
71
 
 
72
HTransportSettings::HTransportSettings(const HTransportSettings& other) :
 
73
    h_ptr(other.h_ptr)
 
74
{
 
75
    Q_ASSERT(&other != this);
 
76
}
 
77
 
 
78
HTransportSettings& HTransportSettings::operator=(const HTransportSettings& other)
 
79
{
 
80
    Q_ASSERT(&other != this);
 
81
    h_ptr = other.h_ptr;
 
82
    return *this;
 
83
}
 
84
 
 
85
HTransportSettings::~HTransportSettings()
 
86
{
 
87
}
 
88
 
 
89
bool HTransportSettings::isEmpty() const
 
90
{
 
91
    return !h_ptr->m_playMode.isValid() && !h_ptr->m_rQualityMode.isValid();
 
92
}
 
93
 
 
94
const HPlayMode& HTransportSettings::playMode() const
 
95
{
 
96
    return h_ptr->m_playMode;
 
97
}
 
98
 
 
99
HRecordQualityMode HTransportSettings::recordQualityMode() const
 
100
{
 
101
    return h_ptr->m_rQualityMode;
 
102
}
 
103
 
 
104
void HTransportSettings::setPlayMode(const HPlayMode& arg)
 
105
{
 
106
    h_ptr->m_playMode = arg;
 
107
}
 
108
 
 
109
void HTransportSettings::setRecordQualityMode(const HRecordQualityMode& arg)
 
110
{
 
111
    h_ptr->m_rQualityMode = arg;
 
112
}
 
113
 
 
114
bool operator==(const HTransportSettings& obj1, const HTransportSettings& obj2)
 
115
{
 
116
    return obj1.playMode() == obj2.playMode() &&
 
117
           obj1.recordQualityMode() == obj2.recordQualityMode();
 
118
}
 
119
 
 
120
}
 
121
}
 
122
}