summaryrefslogtreecommitdiffstats
path: root/lib/libUPnP/patches/0014-platinum-switch-to-NPT_UInt64-for-bitmask-flags.patch
blob: 288ccbd19765fa9ab23653dde26107a0767ad40c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
From 7f93296d158095f59169d12c4181af060f4b9884 Mon Sep 17 00:00:00 2001
From: Alasdair Campbell <alcoheca@gmail.com>
Date: Fri, 26 Oct 2012 12:30:04 +0100
Subject: [PATCH 14/24] platinum: switch to NPT_UInt64 for bitmask flags

---
 .../Source/Devices/MediaServer/PltDidl.cpp         |  6 +-
 .../Platinum/Source/Devices/MediaServer/PltDidl.h  | 68 +++++++++++-----------
 .../Source/Devices/MediaServer/PltMediaItem.cpp    |  6 +-
 .../Source/Devices/MediaServer/PltMediaItem.h      |  6 +-
 .../Devices/MediaServer/PltSyncMediaBrowser.h      |  2 +-
 5 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
index 6ad2ec4..6f72dda 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
@@ -56,7 +56,7 @@ const char* didl_namespace_dlna = "urn:schemas-dlna-org:metadata-1-0/";
 /*----------------------------------------------------------------------
 |   PLT_Didl::ConvertFilterToMask
 +---------------------------------------------------------------------*/
-NPT_UInt32 
+NPT_UInt64
 PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
 {
     // easy out
@@ -66,7 +66,7 @@ PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
     // a given DIDL property (or set of properties).  
     // These fields are or start with: upnp:, @, res@, res, dc:, container@
 
-    NPT_UInt32  mask = 0;
+    NPT_UInt64  mask = 0;
     const char* s = filter;
     int         i = 0;
 
@@ -301,7 +301,7 @@ PLT_Didl::ParseTimeStamp(const NPT_String& timestamp, NPT_UInt32& seconds)
 NPT_Result
 PLT_Didl::ToDidl(PLT_MediaObject& object, const NPT_String& filter, NPT_String& didl)
 {
-    NPT_UInt32 mask = ConvertFilterToMask(filter);
+    NPT_UInt64 mask = ConvertFilterToMask(filter);
 
     // Allocate enough space for the didl
     didl.Reserve(2048);
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
index 8d9704f..29ce9ca 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
@@ -48,43 +48,43 @@
 /*----------------------------------------------------------------------
 |   constants
 +---------------------------------------------------------------------*/
-#define PLT_FILTER_MASK_ALL                         0xFFFFFFFF
+#define PLT_FILTER_MASK_ALL                         0xFFFFFFFFFFFFFFFF
 
-#define PLT_FILTER_MASK_CREATOR                     0x00000001
-#define PLT_FILTER_MASK_ARTIST                      0x00000002
-#define PLT_FILTER_MASK_ALBUM                       0x00000004
-#define PLT_FILTER_MASK_GENRE                       0x00000008
-#define PLT_FILTER_MASK_ALBUMARTURI                 0x00000010
-#define PLT_FILTER_MASK_DESCRIPTION                 0x00000020
-#define PLT_FILTER_MASK_SEARCHABLE                  0x00000040
-#define PLT_FILTER_MASK_CHILDCOUNT                  0x00000080
-#define PLT_FILTER_MASK_ORIGINALTRACK               0x00000100
-#define PLT_FILTER_MASK_ACTOR                       0x00000200
-#define PLT_FILTER_MASK_AUTHOR                      0x00000400
-#define PLT_FILTER_MASK_DIRECTOR                    0x00000800
-#define PLT_FILTER_MASK_DATE                        0x00001000
-#define PLT_FILTER_MASK_PROGRAMTITLE                0x00002000
-#define PLT_FILTER_MASK_SERIESTITLE                 0x00004000
-#define PLT_FILTER_MASK_EPISODE                     0x00008000
-#define PLT_FILTER_MASK_TITLE                       0x00010000
+#define PLT_FILTER_MASK_CREATOR                     0x0000000000000001
+#define PLT_FILTER_MASK_ARTIST                      0x0000000000000002
+#define PLT_FILTER_MASK_ALBUM                       0x0000000000000004
+#define PLT_FILTER_MASK_GENRE                       0x0000000000000008
+#define PLT_FILTER_MASK_ALBUMARTURI                 0x0000000000000010
+#define PLT_FILTER_MASK_DESCRIPTION                 0x0000000000000020
+#define PLT_FILTER_MASK_SEARCHABLE                  0x0000000000000040
+#define PLT_FILTER_MASK_CHILDCOUNT                  0x0000000000000080
+#define PLT_FILTER_MASK_ORIGINALTRACK               0x0000000000000100
+#define PLT_FILTER_MASK_ACTOR                       0x0000000000000200
+#define PLT_FILTER_MASK_AUTHOR                      0x0000000000000400
+#define PLT_FILTER_MASK_DIRECTOR                    0x0000000000000800
+#define PLT_FILTER_MASK_DATE                        0x0000000000001000
+#define PLT_FILTER_MASK_PROGRAMTITLE                0x0000000000002000
+#define PLT_FILTER_MASK_SERIESTITLE                 0x0000000000004000
+#define PLT_FILTER_MASK_EPISODE                     0x0000000000008000
+#define PLT_FILTER_MASK_TITLE                       0x0000000000010000
 
-#define PLT_FILTER_MASK_RES                         0x00020000
-#define PLT_FILTER_MASK_RES_DURATION                0x00040000
-#define PLT_FILTER_MASK_RES_SIZE                    0x00080000
-#define PLT_FILTER_MASK_RES_PROTECTION              0x00100000
-#define PLT_FILTER_MASK_RES_RESOLUTION              0x00200000
-#define PLT_FILTER_MASK_RES_BITRATE                 0x00400000
-#define PLT_FILTER_MASK_RES_BITSPERSAMPLE           0x00800000
-#define PLT_FILTER_MASK_RES_NRAUDIOCHANNELS         0x01000000
-#define PLT_FILTER_MASK_RES_SAMPLEFREQUENCY         0x02000000
+#define PLT_FILTER_MASK_RES                         0x0000000000020000
+#define PLT_FILTER_MASK_RES_DURATION                0x0000000000040000
+#define PLT_FILTER_MASK_RES_SIZE                    0x0000000000080000
+#define PLT_FILTER_MASK_RES_PROTECTION              0x0000000000100000
+#define PLT_FILTER_MASK_RES_RESOLUTION              0x0000000000200000
+#define PLT_FILTER_MASK_RES_BITRATE                 0x0000000000400000
+#define PLT_FILTER_MASK_RES_BITSPERSAMPLE           0x0000000000800000
+#define PLT_FILTER_MASK_RES_NRAUDIOCHANNELS         0x0000000001000000
+#define PLT_FILTER_MASK_RES_SAMPLEFREQUENCY         0x0000000002000000
 
-#define PLT_FILTER_MASK_LONGDESCRIPTION             0x04000000
-#define PLT_FILTER_MASK_ICON                        0x08000000
-#define PLT_FILTER_MASK_RATING                      0x10000000
+#define PLT_FILTER_MASK_LONGDESCRIPTION             0x0000000004000000
+#define PLT_FILTER_MASK_ICON                        0x0000000008000000
+#define PLT_FILTER_MASK_RATING                      0x0000000010000000
 
-#define PLT_FILTER_MASK_TOC                         0x20000000
-#define PLT_FILTER_MASK_SEARCHCLASS                 0x40000000
-#define PLT_FILTER_MASK_REFID                       0x80000000
+#define PLT_FILTER_MASK_TOC                         0x0000000020000000
+#define PLT_FILTER_MASK_SEARCHCLASS                 0x0000000040000000
+#define PLT_FILTER_MASK_REFID                       0x0000000080000000
 
 #define PLT_FILTER_FIELD_TITLE                      "dc:title"
 #define PLT_FILTER_FIELD_CREATOR                    "dc:creator"
@@ -156,7 +156,7 @@ public:
         return res;
     }
 
-    static NPT_UInt32  ConvertFilterToMask(const NPT_String& filter);
+    static NPT_UInt64  ConvertFilterToMask(const NPT_String& filter);
 };
 
 #endif /* _PLT_DIDL_H_ */
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
index b10d75a..31bc16c 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
@@ -215,7 +215,7 @@ PLT_MediaObject::ToDidl(const NPT_String& filter, NPT_String& didl)
 |   PLT_MediaObject::ToDidl
 +---------------------------------------------------------------------*/
 NPT_Result
-PLT_MediaObject::ToDidl(NPT_UInt32 mask, NPT_String& didl)
+PLT_MediaObject::ToDidl(NPT_UInt64 mask, NPT_String& didl)
 {
     // title is required
     didl += "<dc:title>";
@@ -682,7 +682,7 @@ PLT_MediaItem::ToDidl(const NPT_String& filter, NPT_String& didl)
 |   PLT_MediaItem::ToDidl
 +---------------------------------------------------------------------*/
 NPT_Result
-PLT_MediaItem::ToDidl(NPT_UInt32 mask, NPT_String& didl)
+PLT_MediaItem::ToDidl(NPT_UInt64 mask, NPT_String& didl)
 {
     didl += "<item id=\"";
 
@@ -773,7 +773,7 @@ PLT_MediaContainer::ToDidl(const NPT_String& filter, NPT_String& didl)
 |   PLT_MediaContainer::ToDidl
 +---------------------------------------------------------------------*/
 NPT_Result
-PLT_MediaContainer::ToDidl(NPT_UInt32 mask, NPT_String& didl)
+PLT_MediaContainer::ToDidl(NPT_UInt64 mask, NPT_String& didl)
 {
 	// container id property
     didl += "<container id=\"";
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
index fe04f34..2449276 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
@@ -196,7 +196,7 @@ public:
 
     virtual NPT_Result Reset();
     virtual NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    virtual NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
+    virtual NPT_Result ToDidl(NPT_UInt64 mask, NPT_String& didl);
     virtual NPT_Result FromDidl(NPT_XmlElementNode* entry);
 
 public:
@@ -248,7 +248,7 @@ public:
 
     // PLT_MediaObject methods
     NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
+    NPT_Result ToDidl(NPT_UInt64 mask, NPT_String& didl);
     NPT_Result FromDidl(NPT_XmlElementNode* entry);
 };
 
@@ -271,7 +271,7 @@ public:
     // PLT_MediaObject methods
     NPT_Result Reset();
     NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
+    NPT_Result ToDidl(NPT_UInt64 mask, NPT_String& didl);
     NPT_Result FromDidl(NPT_XmlElementNode* entry);
 
 public:
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
index e8cb7c6..94f1ab3 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
@@ -118,7 +118,7 @@ protected:
                           NPT_Int32                index, 
                           NPT_Int32                count,
                           bool                     browse_metadata = false,
-                          const char*              filter = "dc:date,dc:description,upnp:longDescription,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:rating,upnp:episodeNumber,upnp:programTitle,upnp:seriesTitle,upnp:album,upnp:artist,upnp:author,upnp:director,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
+                          const char*              filter = "dc:date,dc:description,upnp:longDescription,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:rating,upnp:lastPlaybackPosition,upnp:lastPlaybackTime,upnp:playbackCount,upnp:originalTrackNumber,upnp:episodeNumber,upnp:programTitle,upnp:seriesTitle,upnp:album,upnp:artist,upnp:author,upnp:director,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
                           const char*              sort = "");
 private:
     NPT_Result Find(const char* ip, PLT_DeviceDataReference& device);
-- 
1.7.11.msysgit.0