diff options
Diffstat (limited to 'upnpcomponents/dlna.h')
-rw-r--r-- | upnpcomponents/dlna.h | 108 |
1 files changed, 97 insertions, 11 deletions
diff --git a/upnpcomponents/dlna.h b/upnpcomponents/dlna.h index c05d69a..80ac328 100644 --- a/upnpcomponents/dlna.h +++ b/upnpcomponents/dlna.h @@ -14,6 +14,12 @@ 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: @@ -27,10 +33,6 @@ public: virtual ~cRegisteredProfile(){}; }; -class cRegisteredProfiles : public cList<cRegisteredProfile> { - friend class cDlna; -}; - /** * Enable DLNA compliant media transfer * @@ -41,23 +43,107 @@ class cRegisteredProfiles : public cList<cRegisteredProfile> { 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); - const char* getDeviceDescription(const char* URLBase); - void registerProfile(DLNAProfile* Profile, int Op = -1, const char* Ps = NULL, int Ci = -1, unsigned int Flags = 0); + /** + * 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(); - const char* getProtocolInfo(DLNAProfile *Prof); - DLNAProfile* getProfileOfChannel(cChannel* Channel); - DLNAProfile* getProfileOfRecording(cRecording* Recording); - DLNAProfile* getProfileOfFile(cString File); + /** + * 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 + ); + /** + * Profile of a channel + * + * Returns the DLNA profile of a VDR channel. It checks the video type to determine + * which profile will match. + * + * @return the matching DLNA profile + */ + DLNAProfile* getProfileOfChannel( + cChannel* Channel ///< the channel of which the profile should created from + ); + /** + * Profile of a recording + * + * Returns the DLNA profile of a VDR recording. It checks the video file to determine + * which profile will match. + * + * @return the matching DLNA profile + */ + DLNAProfile* getProfileOfRecording( + cRecording* Recording ///< the recording of which the profile should be created from + ); + /** + * Profile of a file + * + * Returns the DLNA profile of a file. It checks the content of the file with \em ffmpeg to + * determine which profile will match. + * + * @return the matching DLNA profile + */ + DLNAProfile* getProfileOfFile( + cString File ///< the file of which the profile should be created from + ); private: const char* getRegisteredProtocolInfoString(cRegisteredProfile *Profile); cDlna(); void init(void); static cDlna* mInstance; - cRegisteredProfiles* mRegisteredProfiles; + cList<cRegisteredProfile>* mRegisteredProfiles; }; #endif /* _DLNA_H */ |