vdr-plugin-skindesigner/libskindesignerapi/skindesignerapi.c

33 lines
1.0 KiB
C
Raw Permalink Normal View History

2015-04-02 11:39:43 +02:00
#include "skindesignerapi.h"
2015-04-02 15:09:41 +02:00
skindesignerapi::SkindesignerAPI *skindesignerapi::SkindesignerAPI::skindesigner = NULL;
2015-04-02 11:39:43 +02:00
2015-04-02 15:09:41 +02:00
skindesignerapi::SkindesignerAPI::SkindesignerAPI(void) {
2015-04-02 11:39:43 +02:00
if (skindesigner != NULL)
esyslog("skindesigner should only be loaded once");
else
skindesigner = this;
}
2015-04-02 15:09:41 +02:00
skindesignerapi::SkindesignerAPI::~SkindesignerAPI(void) {
2015-04-02 11:39:43 +02:00
if (skindesigner == this)
skindesigner = NULL;
}
2015-04-02 15:09:41 +02:00
bool skindesignerapi::SkindesignerAPI::RegisterPlugin(cPluginStructure *plugStructure) {
2015-04-02 11:39:43 +02:00
if (skindesigner)
2015-04-02 15:09:41 +02:00
return skindesigner->ServiceRegisterPlugin(plugStructure);
2015-04-02 11:39:43 +02:00
return false;
}
2015-04-02 15:09:41 +02:00
skindesignerapi::ISDDisplayMenu *skindesignerapi::SkindesignerAPI::GetDisplayMenu() {
2015-04-02 11:39:43 +02:00
if (skindesigner)
2015-04-02 15:09:41 +02:00
return skindesigner->ServiceGetDisplayMenu();
2015-04-02 11:39:43 +02:00
return NULL;
}
2015-04-02 15:09:41 +02:00
skindesignerapi::ISkinDisplayPlugin *skindesignerapi::SkindesignerAPI::GetDisplayPlugin(string pluginName, int viewID, int subViewID) {
if (skindesigner)
return skindesigner->ServiceGetDisplayPlugin(pluginName, viewID, subViewID);
return NULL;
}