introduce eBranding class

Status
Not open for further replies.

GitHub

Moderator
introduce eBranding class

The eBranding class reads /etc/image-version file (key=value format) and stores data in a map.
Several properties added in order to access directly some possible values of /etc/image-version already used out there.
Class is also exported to swig making possible to call from python programs.

C++ usage:
eBranding &branding = eBranding::getInstance();
branding.Date();
branding.getValue("key");

python usage:
from enigma import eBranding
branding = eBranding()
print branding.Date()
print branding.getValue('key')

Please note that Meyer’s singleton was used in getInstance.
In enigma2 usually the lazy pointer initialization is used till now.
If Meyer's singleton causes problems, changing to pointer is one alternative.

Nice read about singletons: http://jrruethe.github.io/blog/2015/08/02/singletons/

Continue reading...
 
Status
Not open for further replies.
Back
Top