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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/contentdirectory/hcontentdirectory_info.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 "hcontentdirectory_info.h"
 
23
 
 
24
#include <HUpnpCore/HResourceType>
 
25
#include <HUpnpCore/HActionArguments>
 
26
#include <HUpnpCore/HActionsSetupData>
 
27
#include <HUpnpCore/HStateVariablesSetupData>
 
28
 
 
29
#include <QtCore/QString>
 
30
 
 
31
/*!
 
32
 * \defgroup hupnp_av_cds Content Directory
 
33
 * \ingroup hupnp_av
 
34
 *
 
35
 * \brief This page discusses the design and use of the HUPnPAv's ContentDirectory
 
36
 * functionality.
 
37
 */
 
38
 
 
39
namespace Herqq
 
40
{
 
41
 
 
42
namespace Upnp
 
43
{
 
44
 
 
45
namespace Av
 
46
{
 
47
 
 
48
/*******************************************************************************
 
49
 * HContentDirectoryInfo
 
50
 ******************************************************************************/
 
51
HContentDirectoryInfo::HContentDirectoryInfo()
 
52
{
 
53
}
 
54
 
 
55
HContentDirectoryInfo::~HContentDirectoryInfo()
 
56
{
 
57
}
 
58
 
 
59
QString HContentDirectoryInfo::browseFlagToString(BrowseFlag flag)
 
60
{
 
61
    QString retVal = "";
 
62
    switch(flag)
 
63
    {
 
64
    case Undefined:
 
65
        break;;
 
66
    case BrowseMetadata:
 
67
        retVal = "BrowseMetadata";
 
68
        break;
 
69
    case BrowseDirectChildren:
 
70
        retVal = "BrowseDirectChildren";
 
71
        break;
 
72
    default:
 
73
        Q_ASSERT(false);
 
74
        break;
 
75
    };
 
76
    return retVal;
 
77
}
 
78
 
 
79
HContentDirectoryInfo::BrowseFlag
 
80
    HContentDirectoryInfo::browseFlagFromString(const QString& arg)
 
81
{
 
82
    BrowseFlag retVal = Undefined;
 
83
    if (arg.compare("BrowseMetadata", Qt::CaseInsensitive) == 0)
 
84
    {
 
85
        retVal = BrowseMetadata;
 
86
    }
 
87
    else if (arg.compare("BrowseDirectChildren", Qt::CaseInsensitive) == 0)
 
88
    {
 
89
        retVal = BrowseDirectChildren;
 
90
    }
 
91
    return retVal;
 
92
}
 
93
 
 
94
const HResourceType& HContentDirectoryInfo::supportedServiceType()
 
95
{
 
96
    static HResourceType retVal(
 
97
        "urn:schemas-upnp-org:service:ContentDirectory:3");
 
98
 
 
99
    return retVal;
 
100
}
 
101
 
 
102
HActionsSetupData HContentDirectoryInfo::actionsSetupData()
 
103
{
 
104
    HActionsSetupData retVal;
 
105
 
 
106
    retVal.insert(HActionSetup("GetSearchCapabilities"));
 
107
    retVal.insert(HActionSetup("GetSortCapabilities"));
 
108
 
 
109
    HActionSetup setup("GetSortExtensionCapabilities", InclusionOptional);
 
110
    setup.setVersion(2);
 
111
    retVal.insert(setup);
 
112
 
 
113
    setup = HActionSetup("GetFeatureList");
 
114
    setup.setVersion(2);
 
115
    retVal.insert(setup);
 
116
 
 
117
    retVal.insert(HActionSetup("GetSystemUpdateID"));
 
118
 
 
119
    setup = HActionSetup("GetServiceResetToken");
 
120
    setup.setVersion(3);
 
121
    retVal.insert(setup);
 
122
 
 
123
    retVal.insert(HActionSetup("Browse"));
 
124
    retVal.insert(HActionSetup("Search", InclusionOptional));
 
125
    retVal.insert(HActionSetup("CreateObject", InclusionOptional));
 
126
    retVal.insert(HActionSetup("DestroyObject", InclusionOptional));
 
127
    retVal.insert(HActionSetup("UpdateObject", InclusionOptional));
 
128
    retVal.insert(HActionSetup("MoveObject", InclusionOptional));
 
129
    retVal.insert(HActionSetup("ImportResource", InclusionOptional));
 
130
    retVal.insert(HActionSetup("ExportResource", InclusionOptional));
 
131
    retVal.insert(HActionSetup("DeleteResource", InclusionOptional));
 
132
    retVal.insert(HActionSetup("StopTransferResource", InclusionOptional));
 
133
    retVal.insert(HActionSetup("GetTransferProgress", InclusionOptional));
 
134
    retVal.insert(HActionSetup("CreateReference", InclusionOptional));
 
135
 
 
136
    setup = HActionSetup("FreeFormQuery", InclusionOptional);
 
137
    setup.setVersion(3);
 
138
    retVal.insert(setup);
 
139
 
 
140
    setup = HActionSetup("GetFreeFormQueryCapabilities", InclusionOptional);
 
141
    setup.setVersion(3);
 
142
    retVal.insert(setup);
 
143
 
 
144
    return retVal;
 
145
}
 
146
 
 
147
HStateVariablesSetupData HContentDirectoryInfo::stateVariablesSetupData()
 
148
{
 
149
    HStateVariablesSetupData retVal;
 
150
 
 
151
    retVal.insert(HStateVariableInfo("SearchCapabilities", HUpnpDataTypes::string));
 
152
    retVal.insert(HStateVariableInfo("SortCapabilities", HUpnpDataTypes::string));
 
153
 
 
154
    HStateVariableInfo svInfo("SortExtensionCapabilities", HUpnpDataTypes::string, InclusionOptional);
 
155
    svInfo.setVersion(2);
 
156
    retVal.insert(svInfo);
 
157
 
 
158
    retVal.insert(HStateVariableInfo("SystemUpdateID", HUpnpDataTypes::ui4));
 
159
    retVal.insert(HStateVariableInfo("ContainerUpdateIDs", HUpnpDataTypes::string, InclusionOptional));
 
160
 
 
161
    svInfo = HStateVariableInfo("ServiceResetToken", HUpnpDataTypes::string);
 
162
    svInfo.setVersion(3);
 
163
    retVal.insert(svInfo);
 
164
 
 
165
    svInfo = HStateVariableInfo("LastChange", HUpnpDataTypes::string, InclusionOptional);
 
166
    svInfo.setVersion(3);
 
167
    retVal.insert(svInfo);
 
168
 
 
169
    retVal.insert(HStateVariableInfo("TransferIDs", HUpnpDataTypes::string, InclusionOptional));
 
170
 
 
171
    svInfo = HStateVariableInfo("FeatureList", HUpnpDataTypes::string);
 
172
    svInfo.setVersion(2);
 
173
    retVal.insert(svInfo);
 
174
 
 
175
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_ObjectID", HUpnpDataTypes::string));
 
176
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_Result", HUpnpDataTypes::string));
 
177
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_SearchCriteria", HUpnpDataTypes::string, InclusionOptional));
 
178
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_BrowseFlag", HUpnpDataTypes::string));
 
179
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_Filter", HUpnpDataTypes::string));
 
180
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_SortCriteria", HUpnpDataTypes::string));
 
181
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_Index", HUpnpDataTypes::ui4));
 
182
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_Count", HUpnpDataTypes::ui4));
 
183
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_UpdateID", HUpnpDataTypes::ui4));
 
184
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_TransferID", HUpnpDataTypes::ui4, InclusionOptional));
 
185
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_TransferStatus", HUpnpDataTypes::string, InclusionOptional));
 
186
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_TransferLength", HUpnpDataTypes::string, InclusionOptional));
 
187
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_TransferTotal", HUpnpDataTypes::string, InclusionOptional));
 
188
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_TagValueList", HUpnpDataTypes::string, InclusionOptional));
 
189
    retVal.insert(HStateVariableInfo("A_ARG_TYPE_URI", HUpnpDataTypes::uri, InclusionOptional));
 
190
 
 
191
    svInfo = HStateVariableInfo("A_ARG_TYPE_CDSView", HUpnpDataTypes::ui4, InclusionOptional);
 
192
    svInfo.setVersion(3);
 
193
    retVal.insert(svInfo);
 
194
 
 
195
    svInfo = HStateVariableInfo("A_ARG_TYPE_TagValueList", HUpnpDataTypes::string, InclusionOptional);
 
196
    svInfo.setVersion(3);
 
197
    retVal.insert(svInfo);
 
198
 
 
199
    svInfo = HStateVariableInfo("A_ARG_TYPE_QueryRequest", HUpnpDataTypes::string, InclusionOptional);
 
200
    svInfo.setVersion(3);
 
201
    retVal.insert(svInfo);
 
202
 
 
203
    svInfo = HStateVariableInfo("A_ARG_TYPE_QueryResult", HUpnpDataTypes::string, InclusionOptional);
 
204
    svInfo.setVersion(3);
 
205
    retVal.insert(svInfo);
 
206
 
 
207
    svInfo = HStateVariableInfo("A_ARG_TYPE_FFQCapabilities", HUpnpDataTypes::string, InclusionOptional);
 
208
    svInfo.setVersion(3);
 
209
    retVal.insert(svInfo);
 
210
 
 
211
    return retVal;
 
212
}
 
213
 
 
214
}
 
215
}
 
216
}