// // Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file ManifestHandler.h * @brief This is the header file for the %ManifestHandler class. * * This header file contains the declarations of the %ManifestHandler class. */ #ifndef _MANIFEST_HANDLER_H_ #define _MANIFEST_HANDLER_H_ #include #include "XmlHandler.h" #include "InstallationContext.h" class ManifestParser; /** * @class ManifestHandler * @brief This class represents the class of ManifestHandler. * @since 1.0 * * This class represents the class of ManifestHandler. * */ class ManifestHandler : public XmlHandler { public: ManifestHandler(void); virtual ~ManifestHandler(void); bool Construct(InstallationContext *pConext); InstallationContext* GetContext(void); bool Parse(const char *pFilepath); AppData* GetAppData(void); char* GetDefaultIconType(void); private: ManifestHandler(const ManifestHandler& value); ManifestHandler& operator =(const ManifestHandler& source); virtual bool OnStartElement(const char *pName); virtual bool OnEndElement(const char *pName); virtual bool OnCharacters(const char *pCharacters); // StartElement bool OnPrivilegesStartElement(void); bool OnUiAppStartElement(void); bool OnServiceAppStartElement(void); bool OnIconsStartElement(void); bool OnUiScalabilityStartElement(void); bool OnUiThemeStartElement(void); bool OnAppControlStartElement(void); bool OnCapabilityStartElement(void); bool OnResolutionStartElement(void); bool OnOperationStartElement(void); bool OnDataControlStartElement(void); bool OnContentsStartElement(void); bool OnContentStartElement(void); // Parsers bool OnLiveboxesStartElement(const char* pName); bool OnAccountsStartElement(const char* pName); bool OnAppControlsStartElement(const char* pName); bool OnPermissionStartElement(const char* pName); // EndElement bool OnPrivilegesEndElement(void); bool OnUiAppEndElement(void); bool OnServiceAppEndElement(void); bool OnAppsEndElement(void); bool OnIconsEndElement(void); bool OnUiScalabilityEndElement(void); bool OnUiThemeEndElement(void); bool OnDataControlEndElement(void); bool OnDataControlTypeEndElement(void); bool OnContentsEndElement(void); bool OnContentEndElement(void); // Parsers bool OnLiveboxesEndElement(void); bool OnAccountsEndElement(void); bool OnAppControlsEndElement(void); bool OnManifestEndElement(void); // OnValue bool OnIdValue(const char *pCharacters); bool OnVersionValue(const char *pCharacters); bool OnTypeValue(const char *pCharacters); bool OnAuthorValue(const char *pCharacters); bool OnUrlValue(const char *pCharacters); bool OnApiVersionValue(const char *pCharacters); bool OnPrivilegeValue(const char *pCharacters); bool OnIconValue(const char *pCharacters); bool OnNameValue(const char *pCharacters); bool OnDescriptionValue(const char *pCharacters); bool OnDataControlTypeValue(const char *pCharacters); bool OnConditionValue(const char *pCharacters); bool OnNotificationValue(const char *pCharacters); bool OnSizeValue(const char *pCharacters); bool OnInstallationLocationValue(const char *pCharacters); bool OnCategoryValue(const char *pCharacters); bool OnMimeTypeValue(const char* pCharacters); bool OnUriValue(const char* pCharacters); bool OnConfigurationAppControlAppIdValue(const char* pCharacters); // help functions bool FindElement(const char *pName); bool AddAppFeature(const Tizen::Base::String& name, const Tizen::Base::String& value); bool ParseAppAttribute(XmlAttribute* pAttr, bool isUiApp); private: InstallationContext* __pContext; Tizen::Base::Collection::ArrayList* __pPrivilegeList; Tizen::Base::Collection::ArrayList* __pContentDataList; _AppControlInfo* __pAppControlInfoImpl; _AppControlCapabilityInfo* __pAppControlCapabilityInfoImpl; _AppControlResolutionInfo* __pAppControlResolutionInfoImpl; DataControlInfo* __pDataControlInfo; DataControlType* __pDataControlType; ContentData* __pContentData; char* __pDefaultIconType; bool __isDefaultMainmenu; bool __isDefaultSetting; bool __isDefaultTicker; bool __isDefaultQuickpanel; bool __isDefaultLaunchImage; bool __isDefaultName; bool __isDefaultAppDetected; AppData* __pAppData; bool __isParserMode; ManifestParser* __pParser; friend class ManifestAppControlsParser; }; // ManifestHandler #endif // _MANIFEST_HANDLER_H_