You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.4 KiB
60 lines
2.4 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2019-2020. All rights reserved.
|
|
* Description: bootvideo configer head file
|
|
*/
|
|
|
|
#ifndef BOOTVIDEO_CONFIGER_H
|
|
#define BOOTVIDEO_CONFIGER_H
|
|
|
|
#include <string>
|
|
#include <cutils/properties.h>
|
|
#include <tinyxml2.h>
|
|
|
|
namespace android {
|
|
class BootvideoConfiger {
|
|
public:
|
|
static const std::string PROPERTY_EN_UI;
|
|
static const std::string PROPERTY_EN_COUNTDOWN;
|
|
static const std::string PROPERTY_EN_VOLUMEBAR;
|
|
static const std::string PROPERTY_EN_VOLUMEMUTE;
|
|
static const std::string PROPERTY_EN_INPUT;
|
|
static const std::string PROPERTY_PATH_FIRST;
|
|
static const std::string PROPERTY_PATH_STR_FIRST;
|
|
|
|
BootvideoConfiger();
|
|
virtual ~BootvideoConfiger();
|
|
|
|
int GetVideoLimit() const;
|
|
bool IsCountDownCH() const;
|
|
bool IsFeature(const std::string property) const;
|
|
std::string GetFeature(const std::string property) const;
|
|
private:
|
|
const std::string CONFIG_DEFAULT_PATH = "/system/product/etc/boot_video_config.xml";
|
|
const std::string CONFIG_DEFAULT_XML = "<?xml version='1.0'?>"
|
|
"<config>"
|
|
" <bootvideo>"
|
|
" <property key=\"path1\" value=\"/data/local/bootvideo.mp4\">"
|
|
" <property key=\"strPath1\" value=\"/data/local/strbootvideo.mp4\">"
|
|
" <property key=\"videoLimit\" value=\"20\"/>"
|
|
" <property key=\"isEnableLastFrame\" enable=\"true\"/>"
|
|
" <property key=\"isEnableInput\" enable=\"true\"/>"
|
|
" <property key=\"isEnableUI\" enable=\"true\">"
|
|
" <property key=\"isEnableCountDown\" enable=\"true\" language=\"en\"/>"
|
|
" <property key=\"isEnableVolumeBar\" enable=\"true\"/>"
|
|
" <property key=\"isEnableVolumeMute\" enable=\"true\"/>"
|
|
" </property>"
|
|
" </bootvideo>"
|
|
"</config>";
|
|
const std::string PROPERTY_VIDEO_LIMIT = "videoLimit";
|
|
const std::string CONFIG_ITEM_PROPERTY = "property";
|
|
const std::string PROPERTY_EN_LAST_FRAME = "isEnableLastFrame";
|
|
const std::string CONFIG_MODULE_BOOTVIDEO = "bootvideo";
|
|
void InitConfiger(tinyxml2::XMLDocument& document) const;
|
|
std::string GetPropertyValue(const std::string property, const std::string attr) const;
|
|
std::string GetElementValue(const tinyxml2::XMLElement *element,
|
|
const std::string attrKey, const std::string attrName) const;
|
|
};
|
|
}; // namespace android
|
|
|
|
#endif // BOOTVIDEO_CONFIGER_H
|