summaryrefslogtreecommitdiff
path: root/libskindesignerapi/skindesignerapi.c
blob: 6308b3ef9536f1194de3e8f0b2077f39862516ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "skindesignerapi.h"

skindesignerapi::SkindesignerAPI *skindesignerapi::SkindesignerAPI::skindesigner = NULL;

skindesignerapi::SkindesignerAPI::SkindesignerAPI(void) {
    if (skindesigner != NULL)
        esyslog("skindesigner should only be loaded once");
    else
        skindesigner = this;
}

skindesignerapi::SkindesignerAPI::~SkindesignerAPI(void) {
    if (skindesigner == this)
        skindesigner = NULL;
}

bool skindesignerapi::SkindesignerAPI::ServiceAvailable(void) {
    if (skindesigner)
        return true;
    return false;
}

bool skindesignerapi::SkindesignerAPI::RegisterPlugin(cPluginStructure *plugStructure) {
    if (skindesigner)
        return skindesigner->ServiceRegisterPlugin(plugStructure);
    return false;
}

skindesignerapi::ISDDisplayMenu *skindesignerapi::SkindesignerAPI::GetDisplayMenu() {
    if (skindesigner)
        return skindesigner->ServiceGetDisplayMenu();
    return NULL;
}

skindesignerapi::ISkinDisplayPlugin *skindesignerapi::SkindesignerAPI::GetDisplayPlugin(int plugId) {
    if (skindesigner)
        return skindesigner->ServiceGetDisplayPlugin(plugId);
    return NULL;
}