blob: 44ed3c406728a7ae22878657acd44eae30ba0c11 (
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
|
/*
* File: dlna.h
* Author: savop
*
* Created on 18. April 2009, 23:27
*/
#ifndef _DLNA_H
#define _DLNA_H
#include "../common.h"
#include <vdr/channels.h>
#include <vdr/recording.h>
class cDlna;
/**
* Registered DLNA profile
*
* This class contains information about a certain registered profile
* like play speeds or flags
*/
class cRegisteredProfile : public cListObject {
friend class cDlna;
private:
DLNAProfile* Profile;
int Operation;
const char* PlaySpeeds;
int Conversion;
int PrimaryFlags;
public:
cRegisteredProfile(){};
virtual ~cRegisteredProfile(){};
};
/**
* Enable DLNA compliant media transfer
*
* This class enables media transmission with DLNA conformity. Its compliant with
* version 1.5 of the DLNA guidelines.
*
*/
class cDlna {
friend class cUPnPServer;
public:
/**
* Returns the instance of DLNA object
*
* This will create a DLNA object instance. It will return the same instance
* on subsequent calls.
*
* @return the DLNA object instance
*/
static cDlna* getInstance(void);
virtual ~cDlna();
//const char* getProtocolInfo(UPnPObjectID OID);
/**
* Device description document
*
* This will return the device description document with service type
* definitions as well as some DLNA specific information
*
* @return The description document
*/
const char* getDeviceDescription(
const char* URLBase ///< the URLBase to be set in the document
);
/**
* Registeres a DLNA profile
*
* Registeres a DLNA profile with specific optional options
*
* @see common.h
*/
void registerProfile(
DLNAProfile* Profile, ///< the DLNA profile
int Op = -1, ///< operation mode
const char* Ps = NULL, ///< play speed (CSV list)
int Ci = -1, ///< conversion indication flag
unsigned int Flags = 0 ///< DLNA flags
);
/**
* Registeres all known DLNA profiles
*
* Registeres all well known DLNA profiles with its known options
*/
void registerMainProfiles();
/**
* CSV list of supported protocols
*
* Returns a comma separated list with all supported protocols. This
* means, it returns the list of protocols of the registered profiles.
*
* @return CSV list of registered protocols
*/
const char* getSupportedProtocols();
/**
* Protocol info of a specific DLNA profile
*
* Returns the protocol info string of a specific DLNA profile with its
* options and flags.
*
* @return the protocol info string of the profile
*/
const char* getProtocolInfo(
DLNAProfile *Prof ///< the Profile of which the protocol info shall be returned
);
private:
const char* getRegisteredProtocolInfoString(cRegisteredProfile *Profile);
cDlna();
void init(void);
static cDlna* mInstance;
cList<cRegisteredProfile>* mRegisteredProfiles;
};
#endif /* _DLNA_H */
|