mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
lib versioning
This commit is contained in:
parent
e48aa00164
commit
051cefafd3
1
Makefile
1
Makefile
@ -56,6 +56,7 @@ LIBS += $(shell xml2-config --libs)
|
|||||||
|
|
||||||
INCLUDES += $(shell pkg-config --cflags libskindesignerapi)
|
INCLUDES += $(shell pkg-config --cflags libskindesignerapi)
|
||||||
LIBS += $(shell pkg-config --libs libskindesignerapi)
|
LIBS += $(shell pkg-config --libs libskindesignerapi)
|
||||||
|
DEFINES += -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi)"'
|
||||||
|
|
||||||
### The object files:
|
### The object files:
|
||||||
OBJS = $(PLUGIN).o \
|
OBJS = $(PLUGIN).o \
|
||||||
|
@ -52,6 +52,7 @@ class cPluginStructure {
|
|||||||
public:
|
public:
|
||||||
cPluginStructure(void) {
|
cPluginStructure(void) {
|
||||||
name = "";
|
name = "";
|
||||||
|
libskindesignerAPIVersion = "undefined";
|
||||||
};
|
};
|
||||||
void SetMenu(int key, string templateName) {
|
void SetMenu(int key, string templateName) {
|
||||||
menus.insert(pair<int, string>(key, templateName));
|
menus.insert(pair<int, string>(key, templateName));
|
||||||
@ -84,6 +85,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
string name; //name of plugin
|
string name; //name of plugin
|
||||||
|
string libskindesignerAPIVersion; //skindesigner API Version plugin is using
|
||||||
map< int, string > menus; //menus as key -> templatename hashmap
|
map< int, string > menus; //menus as key -> templatename hashmap
|
||||||
map< int, string> views; //standalone views as key -> templatename hashmap
|
map< int, string> views; //standalone views as key -> templatename hashmap
|
||||||
multimap< int, pair <int, string> > subViews; //subviews of standalone views as view -> (subview, templatename) multimap
|
multimap< int, pair <int, string> > subViews; //subviews of standalone views as view -> (subview, templatename) multimap
|
||||||
|
@ -25,6 +25,7 @@ static const char *DESCRIPTION = trNOOP("Skin Designer");
|
|||||||
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {
|
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {
|
||||||
private:
|
private:
|
||||||
vector<cSkinDesigner*> skins;
|
vector<cSkinDesigner*> skins;
|
||||||
|
string libskindesignerApiVersion;
|
||||||
protected:
|
protected:
|
||||||
bool ServiceRegisterPlugin(skindesignerapi::cPluginStructure *plugStructure);
|
bool ServiceRegisterPlugin(skindesignerapi::cPluginStructure *plugStructure);
|
||||||
skindesignerapi::ISDDisplayMenu *ServiceGetDisplayMenu(void);
|
skindesignerapi::ISDDisplayMenu *ServiceGetDisplayMenu(void);
|
||||||
@ -53,6 +54,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
cPluginSkinDesigner::cPluginSkinDesigner(void) {
|
cPluginSkinDesigner::cPluginSkinDesigner(void) {
|
||||||
|
libskindesignerApiVersion = "undefined";
|
||||||
}
|
}
|
||||||
|
|
||||||
cPluginSkinDesigner::~cPluginSkinDesigner() {
|
cPluginSkinDesigner::~cPluginSkinDesigner() {
|
||||||
@ -107,6 +109,10 @@ bool cPluginSkinDesigner::Start(void) {
|
|||||||
trueColorAvailable = false;
|
trueColorAvailable = false;
|
||||||
} else
|
} else
|
||||||
dsyslog("skindesigner: TrueColor OSD found");
|
dsyslog("skindesigner: TrueColor OSD found");
|
||||||
|
|
||||||
|
libskindesignerApiVersion = LIBSKINDESIGNERAPIVERSION;
|
||||||
|
dsyslog("skindesigner: using libskindesigner API Version %s", libskindesignerApiVersion.c_str());
|
||||||
|
|
||||||
config.SetOsdLanguage();
|
config.SetOsdLanguage();
|
||||||
config.SetPathes();
|
config.SetPathes();
|
||||||
config.ReadSkins();
|
config.ReadSkins();
|
||||||
@ -240,6 +246,7 @@ bool cPluginSkinDesigner::ServiceRegisterPlugin(skindesignerapi::cPluginStructur
|
|||||||
esyslog("skindesigner: error - plugin without menus or views registered");
|
esyslog("skindesigner: error - plugin without menus or views registered");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
dsyslog("skindesigner: plugin %s uses libskindesigner API Version %s", plugStructure->name.c_str(), plugStructure->libskindesignerAPIVersion.c_str());
|
||||||
config.AddPluginMenus(plugStructure->name, plugStructure->menus);
|
config.AddPluginMenus(plugStructure->name, plugStructure->menus);
|
||||||
config.AddPluginViews(plugStructure->name, plugStructure->views, plugStructure->subViews, plugStructure->viewElements, plugStructure->viewGrids);
|
config.AddPluginViews(plugStructure->name, plugStructure->views, plugStructure->subViews, plugStructure->viewElements, plugStructure->viewGrids);
|
||||||
if (plugStructure->menus.size() > 0)
|
if (plugStructure->menus.size() > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user