X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=modules%2Fwidget_dao%2Finclude%2Fdpl%2Fwrt-dao-ro%2Fconfig_parser_data.h;h=c6ae0bd0d7f9c826ea17edc8579bc48a055a49e8;hb=99d2eda0b32d9fe02b094f236742a58e740c2f50;hp=a2d92efc4302790fc6f93c14768487867b796128;hpb=45bf3bfbb061b87511ece6f50b1aa6c803844a65;p=framework%2Fweb%2Fwrt-commons.git diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h index a2d92ef..c6ae0bd 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h @@ -31,10 +31,10 @@ #include namespace WrtDB { - -void NormalizeString(DPL::OptionalString& txt); +void NormalizeString(DPL::OptionalString& txt, bool isTrimSpace = false); void NormalizeString(DPL::String& str); DPL::String GetSingleAttributeValue(const DPL::String value); +void NormalizeAndTrimSpaceString(DPL::OptionalString& txt); class WidgetConfigurationManager; @@ -43,9 +43,8 @@ class ConfigParserData public: struct Param { - Param(const DPL::String& name) : name(name) - { - } + Param(const DPL::String& _name) : name(_name) + {} DPL::String name; DPL::String value; bool operator==(const Param&) const; @@ -59,11 +58,10 @@ class ConfigParserData struct Feature { - Feature(const DPL::String& name, - bool required = true) : name(name), - required(required) - { - } + Feature(const DPL::String& _name, + bool _required = true) : name(_name), + required(_required) + {} DPL::String name; bool required; ParamsList paramsList; @@ -77,11 +75,25 @@ class ConfigParserData }; typedef std::set FeaturesList; + struct Privilege + { + Privilege(const DPL::String& _name) : name(_name) + {} + DPL::String name; + + bool operator==(const Privilege&) const; + bool operator!=(const Privilege&) const; + bool operator >(const Privilege&) const; + bool operator>=(const Privilege&) const; + bool operator <(const Privilege&) const; + bool operator<=(const Privilege&) const; + }; + typedef std::set PrivilegeList; + struct Icon { - Icon(const DPL::String& src) : src(src) - { - } + Icon(const DPL::String& _src) : src(_src) + {} DPL::String src; DPL::OptionalInt width; DPL::OptionalInt height; @@ -109,13 +121,12 @@ class ConfigParserData struct Preference { - Preference(const DPL::String& name, - bool readonly = false) : - name(name), + Preference(const DPL::String& _name, + bool _readonly = false) : + name(_name), value(), - readonly(readonly) - { - } + readonly(_readonly) + {} DPL::String name; DPL::OptionalString value; bool readonly; @@ -132,10 +143,9 @@ class ConfigParserData struct AccessInfo { AccessInfo(const DPL::String& strIRI, - bool bSubdomainAccess) : m_strIRI(strIRI), + bool bSubdomainAccess) : m_strIRI(strIRI), m_bSubDomainAccess(bSubdomainAccess) - { - } + {} bool operator==(const AccessInfo&) const; bool operator!=(const AccessInfo&) const; @@ -150,10 +160,9 @@ class ConfigParserData { Setting(const DPL::String& name, const DPL::String& value) : - m_name(name), - m_value(value) - { - } + m_name(name), + m_value(value) + {} DPL::String m_name; DPL::String m_value; @@ -167,6 +176,9 @@ class ConfigParserData typedef std::set SettingsList; + /* ServiceInfo will be removed. + * ServiceInfo will be changed AppControl + */ struct ServiceInfo { ServiceInfo( @@ -178,8 +190,7 @@ class ConfigParserData m_operation(operation), m_scheme(scheme), m_mime(mime) - { - } + {} DPL::String m_src; DPL::String m_operation; DPL::String m_scheme; @@ -188,7 +199,64 @@ class ConfigParserData bool operator==(const ServiceInfo&) const; bool operator!=(const ServiceInfo&) const; }; - typedef std::list ServiceInfoList; + + struct AppControlInfo + { + AppControlInfo( + const DPL::String& operation) : + m_operation(operation) + {} + DPL::String m_src; + DPL::String m_operation; + std::set m_uriList; + std::set m_mimeList; + + bool operator==(const AppControlInfo&) const; + bool operator!=(const AppControlInfo&) const; + }; + + typedef std::list ServiceInfoList; // It will be removed. + typedef std::list AppControlInfoList; + + typedef std::list > BoxSizeList; + + struct LiveboxInfo + { + LiveboxInfo() { } + + struct BoxContent + { + DPL::String m_boxSrc; + DPL::String m_boxMouseEvent; + BoxSizeList m_boxSize; + DPL::String m_pdSrc; + DPL::String m_pdWidth; + DPL::String m_pdHeight; + }; + typedef BoxContent BoxContentInfo; + + DPL::String m_label; + DPL::String m_icon; + DPL::String m_liveboxId; + DPL::String m_primary; + DPL::String m_type; + DPL::String m_autoLaunch; + DPL::String m_updatePeriod; + BoxContentInfo m_boxInfo; + + bool operator==(const LiveboxInfo&) const; + bool operator!=(const LiveboxInfo&) const; + bool operator >(const LiveboxInfo&) const; + bool operator>=(const LiveboxInfo&) const; + bool operator <(const LiveboxInfo&) const; + bool operator<=(const LiveboxInfo&) const; + }; + typedef std::list > LiveboxList; + LiveboxList m_livebox; + + typedef std::list DependsPkgList; + + typedef std::set CategoryList; StringsList nameSpaces; @@ -199,6 +267,7 @@ class ConfigParserData DPL::OptionalString authorEmail; FeaturesList featuresList; + PrivilegeList privilegeList; SettingsList settingsList; @@ -217,9 +286,7 @@ class ConfigParserData bool flashNeeded; - DPL::OptionalFloat minVersionRequired; - DPL::OptionalInt minVersionRequiredFound; - StringsList powderDescriptionLinks; + DPL::OptionalString minVersionRequired; bool backSupported; bool accessNetwork; @@ -231,22 +298,36 @@ class ConfigParserData DPL::OptionalString startFileContentType; IconsList iconsList; - // pakcage name determined by operator for TIZEN webapp - DPL::OptionalString pkgname; + // tizen id / required platform min version for TIZEN webapp + DPL::OptionalString tizenId; + DPL::OptionalString tizenMinVersionRequired; + DPL::OptionalString tizenPkgId; + DPL::OptionalString tizenAppId; + + //csp polic for widget + DPL::OptionalString cspPolicy; + //Application service model list - ServiceInfoList appServiceList; + ServiceInfoList appServiceList; //It will be removed. + AppControlInfoList appControlList; + + // For link shared directory + DependsPkgList dependsPkgList; + // Splash image path + DPL::OptionalString splashImgSrc; + // Background page filename + DPL::OptionalString backgroundPage; + // For category + CategoryList categoryList; ConfigParserData() : flashNeeded(false), - minVersionRequired(1.0), - minVersionRequiredFound(), + minVersionRequired(), backSupported(false), accessNetwork(false), startFileEncountered(false) - { - } + {} }; - } // namespace WrtDB #endif //CONFIG_PARSER_DATA_H_