vdr-plugin-skindesigner/libskindesignerapi/skindesignerapi.c

40 lines
1.1 KiB
C
Raw 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) {
2016-01-26 18:32:38 +01:00
if (skindesigner != NULL)
esyslog("skindesigner should only be loaded once");
else
skindesigner = this;
2015-04-02 11:39:43 +02:00
}
2015-04-02 15:09:41 +02:00
skindesignerapi::SkindesignerAPI::~SkindesignerAPI(void) {
2016-01-26 18:32:38 +01:00
if (skindesigner == this)
skindesigner = NULL;
}
bool skindesignerapi::SkindesignerAPI::ServiceAvailable(void) {
if (skindesigner)
return true;
return false;
2015-04-02 11:39:43 +02:00
}
2015-04-02 15:09:41 +02:00
bool skindesignerapi::SkindesignerAPI::RegisterPlugin(cPluginStructure *plugStructure) {
2016-01-26 18:32:38 +01:00
if (skindesigner)
return skindesigner->ServiceRegisterPlugin(plugStructure);
return false;
2015-04-02 11:39:43 +02:00
}
2015-04-02 15:09:41 +02:00
skindesignerapi::ISDDisplayMenu *skindesignerapi::SkindesignerAPI::GetDisplayMenu() {
2016-01-26 18:32:38 +01:00
if (skindesigner)
return skindesigner->ServiceGetDisplayMenu();
return NULL;
2015-04-02 11:39:43 +02:00
}
2015-04-02 15:09:41 +02:00
2016-01-26 18:32:38 +01:00
skindesignerapi::ISkinDisplayPlugin *skindesignerapi::SkindesignerAPI::GetDisplayPlugin(int plugId) {
if (skindesigner)
return skindesigner->ServiceGetDisplayPlugin(plugId);
return NULL;
}