diff options
author | methodus <methodus@web.de> | 2012-12-10 20:49:53 +0100 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-12-10 20:49:53 +0100 |
commit | 7c5e5dac8eba1e6132582f7ff549fd04dc877ce1 (patch) | |
tree | 4f937c7a5eb686d25e44be178d0e7d6867456e1b /include | |
parent | b36c18930b3221fbc7cfea674472d77cdb466c98 (diff) | |
download | vdr-plugin-upnp-7c5e5dac8eba1e6132582f7ff549fd04dc877ce1.tar.gz vdr-plugin-upnp-7c5e5dac8eba1e6132582f7ff549fd04dc877ce1.tar.bz2 |
Ignoring signal SIGPIPE which might cause crashes
Diffstat (limited to 'include')
-rw-r--r-- | include/plugin.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/include/plugin.h b/include/plugin.h index beb24bf..fa167b7 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -376,6 +376,8 @@ public: */ virtual string GetHTTPUri(const string& uri, const string& currentIP, const string& protocolInfo); + virtual string GetFile(const string& uri); + virtual bool Seekable() const; /** @@ -479,6 +481,25 @@ protected: void OnContainerUpdate(const string& uri, long containerUpdateId, const string& target = string()); /** + * Load a configuration file. + * + * This loads a configuration file from the configuration directory of + * the upnp plugin. Subplugins don't have their own configuration directory. + * + * If the seconds parameter is true, comments are allowed but skipped while + * parsing, i.e. they are not passed to Parse(). + */ + bool LoadConfigFile(const string& filename, bool allowComments = true); + + /** + * Checks if the given URI contains the root container. + * + * This function returns true if the given uri contains the container + * returned by GetRootContainer(). + */ + bool HasRootContainer(const string& uri); + + /** * Thread action to check for updates * * This should be used to determine changes on the containers. It should @@ -488,6 +509,14 @@ protected: */ virtual void Action(); + /** + * Parses a single line of a configuration file. + * + * This function must be overriden if the sub plugin wants to read + * a configuration file. + */ + bool Parse(const string& uri); + }; #define UPNP_REGISTER_MEDIA_PLUGIN(cls) extern "C" void *UPnPCreateMediaProfiler(void) { return new cls; } @@ -541,10 +570,11 @@ public: * * @param uri the absolute path to the resource. * @param metadata the metadate object, where the information shall be saved. + * @param provider the provider with which the file was accessed. * @return true, if this profiler was able to get the specific metadata, * false, if not. */ - virtual bool GetMetadata(const string& uri, cMetadata& metadata) = 0; + virtual bool GetMetadata(const string& uri, cMetadata& metadata, cUPnPResourceProvider* provider) = 0; }; |