summaryrefslogtreecommitdiff
path: root/upnpcomponents/dlna.h
blob: c05d69a823e1a00ac54b4e728bee1c75d58232fa (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
/* 
 * 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;

class cRegisteredProfile : public cListObject {
    friend class cDlna;
private:
    DLNAProfile* Profile;
    int Operation;
    const char* PlaySpeeds;
    int Conversion;
    int PrimaryFlags;
public:
    cRegisteredProfile(){};
    virtual ~cRegisteredProfile(){};
};

class cRegisteredProfiles : public cList<cRegisteredProfile> {
    friend class cDlna;
};

/**
 * 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:
    static cDlna* getInstance(void);
    virtual ~cDlna();
    //const char* getProtocolInfo(UPnPObjectID OID);
    const char* getDeviceDescription(const char* URLBase);
    void registerProfile(DLNAProfile* Profile, int Op = -1, const char* Ps = NULL, int Ci = -1, unsigned int Flags = 0);
    void registerMainProfiles();
    const char* getSupportedProtocols();
    const char* getProtocolInfo(DLNAProfile *Prof);
    DLNAProfile* getProfileOfChannel(cChannel* Channel);
    DLNAProfile* getProfileOfRecording(cRecording* Recording);
    DLNAProfile* getProfileOfFile(cString File);
private:
    const char* getRegisteredProtocolInfoString(cRegisteredProfile *Profile);
    cDlna();
    void init(void);
    static cDlna* mInstance;
    cRegisteredProfiles* mRegisteredProfiles;
};

#endif	/* _DLNA_H */