00001 /* 00002 * File: dlna.h 00003 * Author: savop 00004 * 00005 * Created on 18. April 2009, 23:27 00006 */ 00007 00008 #ifndef _DLNA_H 00009 #define _DLNA_H 00010 00011 #include "../common.h" 00012 #include <vdr/channels.h> 00013 #include <vdr/recording.h> 00014 00015 class cDlna; 00016 00023 class cRegisteredProfile : public cListObject { 00024 friend class cDlna; 00025 private: 00026 DLNAProfile* Profile; 00027 int Operation; 00028 const char* PlaySpeeds; 00029 int Conversion; 00030 int PrimaryFlags; 00031 public: 00032 cRegisteredProfile(){}; 00033 virtual ~cRegisteredProfile(){}; 00034 }; 00035 00043 class cDlna { 00044 friend class cUPnPServer; 00045 public: 00054 static cDlna* getInstance(void); 00055 virtual ~cDlna(); 00056 //const char* getProtocolInfo(UPnPObjectID OID); 00065 const char* getDeviceDescription( 00066 const char* URLBase 00067 ); 00075 void registerProfile( 00076 DLNAProfile* Profile, 00077 int Op = -1, 00078 const char* Ps = NULL, 00079 int Ci = -1, 00080 unsigned int Flags = 0 00081 ); 00087 void registerMainProfiles(); 00096 const char* getSupportedProtocols(); 00105 const char* getProtocolInfo( 00106 DLNAProfile *Prof 00107 ); 00116 DLNAProfile* getProfileOfChannel( 00117 cChannel* Channel 00118 ); 00127 DLNAProfile* getProfileOfRecording( 00128 cRecording* Recording 00129 ); 00138 DLNAProfile* getProfileOfFile( 00139 cString File 00140 ); 00141 private: 00142 const char* getRegisteredProtocolInfoString(cRegisteredProfile *Profile); 00143 cDlna(); 00144 void init(void); 00145 static cDlna* mInstance; 00146 cList<cRegisteredProfile>* mRegisteredProfiles; 00147 }; 00148 00149 #endif /* _DLNA_H */ 00150