summaryrefslogtreecommitdiff
path: root/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.c')
-rw-r--r--plugin.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugin.c b/plugin.c
index 3bf5112f..fa9de4ca 100644
--- a/plugin.c
+++ b/plugin.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.c 1.3 2002/05/12 10:10:38 kls Exp $
+ * $Id: plugin.c 1.4 2002/05/13 16:08:22 kls Exp $
*/
#include "plugin.h"
@@ -22,6 +22,8 @@
// --- cPlugin ---------------------------------------------------------------
+char *cPlugin::configDirectory = NULL;
+
cPlugin::cPlugin(void)
{
name = NULL;
@@ -91,6 +93,19 @@ void cPlugin::RegisterI18n(const tI18nPhrase * const Phrases)
I18nRegister(Phrases, Name());
}
+void cPlugin::SetConfigDirectory(const char *Dir)
+{
+ configDirectory = strdup(Dir);
+}
+
+const char *cPlugin::ConfigDirectory(const char *PluginName)
+{
+ static char *buffer = NULL;
+ delete buffer;
+ asprintf(&buffer, "%s/plugins%s%s", configDirectory, PluginName ? "/" : "", PluginName ? PluginName : "");
+ return MakeDirs(buffer, true) ? buffer : NULL;
+}
+
// --- cDll ------------------------------------------------------------------
cDll::cDll(const char *FileName, const char *Args)