aboutsummaryrefslogtreecommitdiff
path: root/lib/libUPnP
diff options
context:
space:
mode:
authorAlasdair Campbell <alcoheca@gmail.com>2012-10-26 12:30:04 +0100
committermontellese <montellese@xbmc.org>2014-05-17 09:53:11 +0200
commit7f93296d158095f59169d12c4181af060f4b9884 (patch)
tree71b2cecdf692fddfbc990437960887b910edc3eb /lib/libUPnP
parent38538aa36eaf64d7bcff662735ae9b5a0c1db08c (diff)
platinum: switch to NPT_UInt64 for bitmask flags
Diffstat (limited to 'lib/libUPnP')
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp6
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h68
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp6
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h6
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h2
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 6ad2ec4e3d..6f72ddaf26 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 8d9704ffb6..29ce9ca15c 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 b10d75afc3..31bc16c6e5 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 fe04f347be..24492765a9 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 e8cb7c6eee..94f1ab3fd3 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);