blob: 22626b4c0913b0756eaa1bc171b79d0ef4b7ca5c (
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
|
#ifndef XMLOBJECT_H
#define XMLOBJECT_H
#include <cstdlib>
#include <Poco/DOM/Document.h>
#include <Poco/Timestamp.h>
#include <Poco/String.h>
#include <Poco/Exception.h>
namespace plexclient
{
enum MediaType {UNDEF = 0, PHOTO, MOVIE, MUSIC, SHOW, SEASON, EPISODE};
enum StreamType {sUNDEF = 0, sVIDEO = 1, sAUDIO = 2, sSUBTITLE = 3};
class XmlObject
{
protected:
static std::string GetNodeValue(Poco::XML::Node* pNode);
static int GetNodeValueAsInt(Poco::XML::Node* pNode);
static long GetNodeValueAsLong(Poco::XML::Node* pNode);
static double GetNodeValueAsDouble(Poco::XML::Node* pNode);
static bool GetNodeValueAsBool(Poco::XML::Node* pNode);
static Poco::Timestamp GetNodeValueAsTimeStamp(Poco::XML::Node* pNode);
static MediaType GetNodeValueAsMediaType(Poco::XML::Node* pNode);
static StreamType GetNodeValueAsStreamType(Poco::XML::Node* pNode);
private:
};
}
#endif // XMLOBJECT_H
|