More doxygen comments 41/50541/1
authorWojciech Kosowicz <w.kosowicz@samsung.com>
Thu, 29 Oct 2015 15:26:20 +0000 (16:26 +0100)
committerWojciech Kosowicz <w.kosowicz@samsung.com>
Thu, 29 Oct 2015 15:26:20 +0000 (16:26 +0100)
Change-Id: I85e76feb1b52649fb73a22ab47f36d225a789e40

19 files changed:
src/manifest_handlers/application_icons_handler.h
src/manifest_handlers/content_handler.h
src/manifest_handlers/ime_handler.h
src/manifest_handlers/metadata_handler.h
src/manifest_handlers/navigation_handler.h
src/manifest_handlers/permissions_handler.h
src/manifest_handlers/service_handler.h
src/manifest_handlers/setting_handler.h
src/manifest_handlers/widget_config_parser.h
src/manifest_handlers/widget_handler.h
src/manifest_parser/manifest_parser_impl.h
src/tpk_manifest_handlers/account_handler.h
src/tpk_manifest_handlers/author_handler.h
src/tpk_manifest_handlers/description_handler.h
src/tpk_manifest_handlers/package_handler.h
src/tpk_manifest_handlers/package_handler.h.autosave [new file with mode: 0644]
src/tpk_manifest_handlers/privileges_handler.h
src/tpk_manifest_handlers/service_application_handler.h
src/tpk_manifest_handlers/ui_application_handler.h

index 007b5ed1311c190690b42bc5acde7f1033937ef2..1ade9b27406785a4150b22bc599668ec420177d1 100644 (file)
@@ -18,12 +18,32 @@ class ApplicationIcon {
  public:
   explicit ApplicationIcon(const std::string& path, int height = -1,
                            int width = -1);
-
+  /**
+   * @brief GetWidth
+   * @param width
+   * @return true if successful
+   */
   bool GetWidth(int* width) const;
+  /**
+   * @brief GetHeight
+   * @param height
+   * @return true if successful
+   */
   bool GetHeight(int* height) const;
+  /**
+   * @brief path
+   * @return string to the path
+   */
   const std::string& path() const;
-
+  /**
+   * @brief set_width sets width
+   * @param width
+   */
   void set_width(int width);
+  /**
+   * @brief set_height sets height
+   * @param height
+   */
   void set_height(int height);
 
  private:
@@ -35,6 +55,10 @@ class ApplicationIcon {
 class ApplicationIconsInfo : public parser::ManifestData {
  public:
   const std::vector<ApplicationIcon>& icons() const;
+  /**
+   * @brief AddIcon adds icon
+   * @param icon_path
+   */
   void AddIcon(const ApplicationIcon& icon_path);
  private:
   std::vector<ApplicationIcon> icons_;
index 52fc6eb4dd193c4fe81ebd7e635c2fcba3138cce..2a9c5fddd466eba42e1f1e11968e383a3b98678d 100644 (file)
@@ -30,12 +30,32 @@ class ContentInfo : public parser::ManifestData {
   const std::string& encoding() const {
     return encoding_;
   }
+  /**
+   * @brief set_src sets source
+   * @param src
+   */
   void set_src(const std::string& src) { src_ = src; }
+  /**
+   * @brief set_type sets type
+   * @param type
+   */
   void set_type(const std::string& type) { type_ = type; }
+  /**
+   * @brief set_encoding sets encoding
+   * @param encoding
+   */
   void set_encoding(const std::string& encoding) { encoding_ = encoding; }
+  /**
+   * @brief is_tizen_content
+   * @return if is tizen content
+   */
   bool is_tizen_content() const {
     return is_tizen_content_;
   }
+  /**
+   * @brief set_is_tizen_content
+   * @param is_tizen_content
+   */
   void set_is_tizen_content(bool is_tizen_content) {
     is_tizen_content_ = is_tizen_content;
   }
index ba9b3022c1e71abadd602f039670fdbaff04e073..76b598cf7786984c6e6122fc2a4a72d153595099 100644 (file)
@@ -19,14 +19,25 @@ class ImeInfo : public parser::ManifestData {
  public:
   ImeInfo();
   virtual ~ImeInfo();
-
+  /**
+   * @brief uuid
+   * @return uuid string
+   */
   const std::string& uuid() const {
     return uuid_;
   }
+  /**
+   * @brief set_uuid sets uuid string
+   * @param uuid
+   */
   void set_uuid(const std::string& uuid) { uuid_ = uuid; }
   const std::vector<std::string>& languages() const {
     return languages_;
   }
+  /**
+   * @brief AddLanguage adds language
+   * @param language
+   */
   void AddLanguage(const std::string& language);
 
  private:
index 11c8532879266de002d2fa46d243b1e02346d232..9a34cc33bf85d8eb480ae8b7cac93db93bae9cb3 100644 (file)
@@ -21,10 +21,28 @@ class MetaDataInfo : public parser::ManifestData {
  public:
   MetaDataInfo();
   virtual ~MetaDataInfo();
-
+  /**
+   * @brief HasKey
+   * @param key
+   * @return true if has key
+   */
   bool HasKey(const std::string& key) const;
+  /**
+   * @brief GetValue gets value
+   * @param key
+   * @return
+   */
   std::string GetValue(const std::string& key) const;
+  /**
+   * @brief SetValue sets value
+   * @param key
+   * @param value
+   */
   void SetValue(const std::string& key, const std::string& value);
+  /**
+   * @brief metadata
+   * @return map of metadata
+   */
   const std::map<std::string, std::string>& metadata() const {
     return metadata_;
   }
index ebc9a7adb9003fa7e3f956e295cb71336ef73020..16110e160849719df60ad81521d66518fd428036 100644 (file)
@@ -19,7 +19,10 @@ class AllowedNavigationInfo : public parser::ManifestData {
  public:
   explicit AllowedNavigationInfo(const std::string& allowed_domains);
   virtual ~AllowedNavigationInfo();
-
+  /**
+   * @brief GetAllowedDomains
+   * @return vector with allowed domains
+   */
   const std::vector<std::string>& GetAllowedDomains() const {
     return allowed_domains_;
   }
index 75b19a89f4cc90afa07bff8a2f7837e4a6b5164c..361edd74ff3a3b7018742d95d7b4d243016024d2 100644 (file)
@@ -19,11 +19,17 @@ class PermissionsInfo: public parser::ManifestData {
  public:
   PermissionsInfo();
   virtual ~PermissionsInfo();
-
+  /**
+   * @brief GetAPIPermissions
+   * @return permission set
+   */
   const parser::PermissionSet& GetAPIPermissions() const {
     return api_permissions_;
   }
-
+  /**
+   * @brief SetAPIPermissions sets api permissions
+   * @param api_permissions
+   */
   void SetAPIPermissions(const parser::PermissionSet& api_permissions) {
     api_permissions_ = api_permissions;
   }
index 488975c1ccc5fb5262d9eb9e897f50a09293d884..653785413a1c904eb258b282e783e1df3f78c705 100644 (file)
@@ -24,60 +24,117 @@ class ServiceInfo {
   explicit ServiceInfo(const std::string& id, bool auto_restart = false,
       bool on_boot = false);
   virtual ~ServiceInfo();
-
+  /**
+   * @brief id
+   * @return string id
+   */
   const std::string& id() const { return id_; }
   void set_id(const std::string& id) {
     id_ = id;
   }
-
+  /**
+   * @brief auto_restart
+   * @return true is auto-restart is set
+   */
   bool auto_restart() const { return auto_restart_; }
+  /**
+   * @brief set_auto_restart sets auto restart
+   * @param auto_restart
+   */
   void set_auto_restart(bool auto_restart) {
     auto_restart_ = auto_restart;
   }
-
+  /**
+   * @brief on_boot
+   * @return if is on boot
+   */
   bool on_boot() const { return on_boot_; }
   void set_on_boot(bool on_boot) {
     on_boot_ = on_boot;
   }
-
+  /**
+   * @brief names
+   * @return lang names vector
+   */
   const LangNameVector& names() const {
     return names_;
   }
+  /**
+   * @brief set_names sets name lang vector
+   * @param names
+   */
   void set_names(const LangNameVector& names) {
     names_ = names;
   }
-
+  /**
+   * @brief icon
+   * @return string to the icon
+   */
   const std::string& icon() const {
     return icon_;
   }
+  /**
+   * @brief set_icon set string to the icon
+   * @param icon
+   */
   void set_icon(const std::string& icon) {
     icon_ = icon;
   }
+  /**
+   * @brief content
+   * @return  content string
+   */
 
   const std::string& content() const {
     return content_;
   }
+  /**
+   * @brief set_content sets content string
+   * @param content
+   */
   void set_content(const std::string& content) {
     content_ = content;
   }
-
+  /**
+   * @brief description
+   * @return description string
+   */
   const std::string& description() const {
     return description_;
   }
+  /**
+   * @brief set_description sets description
+   * @param description
+   */
   void set_description(const std::string& description) {
     description_ = description;
   }
+  /**
+   * @brief categories
+   * @return categories vector
+   */
 
   const std::vector<std::string>& categories() const {
     return categories_;
   }
+  /**
+   * @brief set_categories sets categories
+   * @param categories
+   */
   void set_categories(const std::vector<std::string>& categories) {
     categories_ = categories;
   }
-
+  /**
+   * @brief metadata_set
+   * @return key value vector
+   */
   const KeyValueVector& metadata_set() const {
     return metadata_set_;
   }
+  /**
+   * @brief set_metadata_set sets metadata
+   * @param metadata_set
+   */
   void set_metadata_set(const KeyValueVector& metadata_set) {
     metadata_set_ = metadata_set;
   }
index 35e313db79ad55ae9c4ac7ae8a25eb312ad45c92..a6874407c4b2399895f22bdc5b9875eabc655dbf 100644 (file)
@@ -38,54 +38,138 @@ class SettingInfo : public parser::ManifestData {
 
   SettingInfo();
   virtual ~SettingInfo();
-
+  /**
+   * @brief set_hwkey_enabled sets value of hw_key to true or false
+   * @param enabled
+   */
   void set_hwkey_enabled(bool enabled) { hwkey_enabled_ = enabled; }
+  /**
+   * @brief hwkey_enabled
+   * @return  current value of hw_key
+   */
   bool hwkey_enabled() const { return hwkey_enabled_; }
-
+  /**
+   * @brief set_screen_orientation sets screen_orientation
+   * @param orientation
+   */
   void set_screen_orientation(ScreenOrientation orientation) {
     screen_orientation_ = orientation;
   }
+  /**
+   * @brief screen_orientation
+   * @return currently selected screen orientation
+   */
 
   ScreenOrientation screen_orientation() const { return screen_orientation_; }
-
+  /**
+   * @brief set_encryption_enabled sets if encryption is enabled or disabled
+   * @param enabled
+   */
   void set_encryption_enabled(bool enabled) { encryption_enabled_ = enabled; }
+  /**
+   * @brief encryption_enabled
+   * @return true if encryption is enable
+   */
   bool encryption_enabled() const { return encryption_enabled_; }
-
+  /**
+   * @brief set_context_menu_enabled sets context menu enabled
+   * @param enabled
+   */
   void set_context_menu_enabled(bool enabled) {
     context_menu_enabled_ = enabled;
   }
+  /**
+   * @brief context_menu_enabled
+   * @return true if context menu is enabled
+   */
   bool context_menu_enabled() const { return context_menu_enabled_; }
-
+  /**
+   * @brief set_background_support_enabled whether it is enabled
+   * @param enabled
+   */
   void set_background_support_enabled(bool enabled) {
     background_support_enabled_ = enabled;
   }
+  /**
+   * @brief background_support_enabled
+   * @return true if background support is enabled
+   */
   bool background_support_enabled() const {
     return background_support_enabled_;
   }
-
+  /**
+   * @brief set_install_location sets install location
+   * @param installLocation
+   */
   void set_install_location(InstallLocation installLocation) {
     install_location_ = installLocation;
   }
+  /**
+   * @brief install_location
+   * @return what InstallLocation is chosen
+   */
   InstallLocation install_location() const { return install_location_; }
-
+  /**
+   * @brief set_no_display sets is there is no display
+   * @param enabled
+   */
   void set_no_display(bool enabled) { no_display_ = enabled; }
+  /**
+   * @brief no_display
+   * @return if there is no supoort for display
+   */
   bool no_display() const { return no_display_; }
-
+  /**
+   * @brief set_indicator_presence sets indicator presence
+   * @param enabled
+   */
   void set_indicator_presence(bool enabled) { indicator_presence_ = enabled; }
+  /**
+   * @brief indicator_presence
+   * @return  if the indicator is present
+   */
   bool indicator_presence() const { return indicator_presence_; }
-
+  /**
+   * @brief set_backbutton_presence sets if backbutton is present
+   * @param enabled
+   */
   void set_backbutton_presence(bool enabled) { backbutton_presence_ = enabled; }
+  /**
+   * @brief backbutton_presence
+   * @return true if backbutton is present
+   */
   bool backbutton_presence() const { return backbutton_presence_; }
-
+  /**
+   * @brief set_user_agent sets user_agent()
+   * @param user_agent
+   */
   void set_user_agent(std::string user_agent) { user_agent_ = user_agent; }
+  /**
+   * @brief user_agent
+   * @return actual user agent
+   */
   std::string user_agent() const { return user_agent_; }
-
+  /**
+   * @brief set_sound_mode sets sound mode
+   * @param soundMode
+   */
   void set_sound_mode(SoundMode soundMode) { sound_mode_ = soundMode; }
+  /**
+   * @brief sound_mode
+   * @return current sound mode
+   */
   SoundMode sound_mode() const { return sound_mode_; }
-
+  /**
+   * @brief set_background_vibration set background vibration
+   * @param enabled
+   */
   void set_background_vibration(bool enabled) {
     background_vibration_ = enabled;
   }
+  /**
+   * @brief background_vibration
+   * @return background vibration
+   */
   bool background_vibration() const { return background_vibration_; }
 
  private:
index 365566c54ce738f39e534ab1130cefe7edca2338..a18900d5d76c6213093ef3ff576256a7e4054eed 100644 (file)
@@ -43,16 +43,36 @@ class WidgetConfigParser {
       const std::string& key);
   const std::string& GetErrorMessage() const;
   bool ParseManifest(const boost::filesystem::path& path);
+  /**
+   * @brief HasValidStartFile
+   * @return true valid start file exists
+   */
   bool HasValidStartFile() const;
+  /**
+   * @brief HasValidServicesStartFiles
+   * @return true if has valid service start files
+   */
   bool HasValidServicesStartFiles() const;
 
  private:
+  /**
+   * @brief CheckStartFile
+   * @return  true if start file is correct
+   */
   bool CheckStartFile();
+  /**
+   * @brief CheckServicesStartFiles
+   * @return true if services start files are correct
+   */
   bool CheckServicesStartFiles();
   // This function creates list of icons that are valid disregarding
   // (in actual version) current system's locale as installer do not need to
   // know about it.
   // Edited/Created list is present as kIconsKey key in parser.
+  /**
+   * @brief CheckWidgetIcons
+   * @return true if widget icons are correct
+   */
   bool CheckWidgetIcons();
 
   std::unique_ptr<parser::ManifestParser> parser_;
index 63c935e32ee3cd4f98cb3be5af6e4e473ae3031a..a1184622e842dd4a5566c84d9d016b298ed42ecb 100644 (file)
@@ -101,34 +101,81 @@ class WidgetHandler : public parser::ManifestHandler {
       std::string* error) override;
   bool AlwaysParseForKey() const override { return true; }
   std::string Key() const override;
-
+  /**
+   * @brief ParseSingleLocalizedLicenseElement parses single license element
+   * @param item_dict
+   * @param parent_lang
+   * @param info
+   */
   void ParseSingleLocalizedLicenseElement(
       const parser::DictionaryValue* item_dict,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseLocalizedLicenseElements parser localized element
+   * @param manifest
+   * @param parent_lang
+   * @param info
+   */
   void ParseLocalizedLicenseElements(
       const parser::Manifest& manifest,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseSingleLocalizedDescriptionElement parses
+   * single localized description
+   * @param item_dict
+   * @param parent_lang
+   * @param info
+   */
   void ParseSingleLocalizedDescriptionElement(
       const parser::DictionaryValue* item_dict,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseLocalizedDescriptionElements parses localized description
+   * element
+   * @param manifest
+   * @param parent_lang
+   * @param info
+   */
   void ParseLocalizedDescriptionElements(
       const parser::Manifest& manifest,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseSingleLocalizedNameElement parses single localized name
+   * @param item_dict
+   * @param parent_lang
+   * @param info
+   */
   void ParseSingleLocalizedNameElement(
       const parser::DictionaryValue* item_dict,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseLocalizedNameElements parses localized name
+   * @param manifest
+   * @param parent_lang
+   * @param info
+   */
   void ParseLocalizedNameElements(
       const parser::Manifest& manifest,
       const std::string& parent_lang,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseAuthorElements parses author element
+   * @param manifest
+   * @param info
+   */
   void ParseAuthorElements(
       const parser::Manifest& manifest,
       std::shared_ptr<WidgetInfo> info);
+  /**
+   * @brief ParseSingleAuthorElement parses single author element
+   * @param author_dict
+   * @param info
+   */
   void ParseSingleAuthorElement(
       const parser::DictionaryValue* author_dict,
       std::shared_ptr<WidgetInfo> info);
index 36cc43e07d08316cae10c74c55c3a37c01aa42de..b1583b43a42c511126c7b2061b82fcee25a493db 100644 (file)
@@ -26,23 +26,60 @@ class ManifestParserImpl {
   ~ManifestParserImpl();
 
   const std::string& GetErrorMessage() const;
+  /**
+   * @brief ParseManifest
+   * @param path
+   * @return true on success
+   */
 
   bool ParseManifest(const boost::filesystem::path& path);
+  /**
+   * @brief GetManifestData gathers manifest data
+   * @param key
+   * @return ManifestData
+   */
 
   std::shared_ptr<const ManifestData> GetManifestData(const std::string& key);
-
+  /**
+   * @brief AccessManifestData accesses manifest data
+   * @param key
+   * @return
+   */
   std::shared_ptr<ManifestData> AccessManifestData(const std::string& key);
+  /**
+   * @brief EraseManifestData erases manifest data
+   * @param key
+   */
   void EraseManifestData(const std::string& key);
 
  private:
+  /**
+   * @brief ParseManifestData parses manifest data
+   * @param error
+   * @return
+   */
   bool ParseManifestData(std::string* error);
-
+  /**
+   * @brief SetManifestData sets manifest data
+   * @param key
+   * @param data
+   */
   void SetManifestData(const std::string& key,
      std::shared_ptr<ManifestData> data);
 
   // Uses manifest handlers for parsing ManifestData stucts
+  /**
+   * @brief ParseAppManifest parses app manifest_
+   * @param error
+   * @return
+   */
   bool ParseAppManifest(std::string* error);
   // Uses manifest handlers for validating ManifestData stucts
+  /**
+   * @brief ValidateAppManifest validates app manifest
+   * @param error
+   * @return
+   */
   bool ValidateAppManifest(std::string* error);
 
   std::unique_ptr<ManifestHandlerRegistry> registry_;
index 1eb859ad4cd20fdd54270e8161643e7a7326a39d..261c4d5f0e2e9a9675ad40ab848b90e072eeb203 100644 (file)
@@ -56,18 +56,56 @@ class AccountHandler : public parser::ManifestHandler {
       std::string Key() const override;
 
  private:
+      /**
+   * @brief ParseSingleAccountElement parses single account element
+   * @param item_dict
+   * @param info
+   * @param error
+   * @return true everything okay
+   */
   bool ParseSingleAccountElement(const parser::DictionaryValue* item_dict,
                                  std::shared_ptr<AccountInfo> info,
                                  std::string* error);
+  /**
+   * @brief ParseAccountIcons parse account icons
+   * @param item_dict
+   * @param singel_account
+   * @return true if everything is okay
+   */
   bool ParseAccountIcons(const parser::DictionaryValue* item_dict,
                          SingleAccountInfo* singel_account);
+  /**
+   * @brief ParseAccountProvider parses account provider
+   * @param item_dict
+   * @param info
+   * @param error
+   * @return if everything is fine
+   */
   bool ParseAccountProvider(const parser::DictionaryValue* item_dict,
                              std::shared_ptr<AccountInfo> info,
                              std::string* error);
+  /**
+   * @brief ParseSingleAccountIcon parses single account icon
+   * @param item_dict
+   * @param singel_account
+   * @return
+   */
   bool ParseSingleAccountIcon(const parser::DictionaryValue* item_dict,
                               SingleAccountInfo* singel_account);
+  /**
+   * @brief ParseLabels parses single account label
+   * @param item_dict
+   * @param singel_account
+   * @return true if everything is fine
+   */
   bool ParseLabels(const parser::DictionaryValue* item_dict,
                          SingleAccountInfo* singel_account);
+  /**
+   * @brief ParseCapabilities pa
+   * @param item_dict
+   * @param singel_account
+   * @return true if everything is fine
+   */
   bool ParseCapabilities(const parser::DictionaryValue* item_dict,
                          SingleAccountInfo* singel_account);
 };
index 058d0b8d5dd7105bfb7bcde8197c14439b4476b1..8020fb80d9786d8328e7fdc69bc5fd92208d726b 100644 (file)
@@ -17,22 +17,45 @@ namespace parse {
 
 class AuthorInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief set_email sets email
+   * @param email
+   */
   void set_email(const std::string& email) {
     email_ = email;
   }
+  /**
+   * @brief set_href sets href
+   * @param href
+   */
   void set_href(const std::string& href) {
     href_ = href;
   }
+  /**
+   * @brief set_name sets name
+   * @param name
+   */
   void set_name(const std::string& name) {
     name_ = name;
   }
-
+  /**
+   * @brief email
+   * @return email string
+   */
   const std::string& email() const {
     return email_;
   }
+  /**
+   * @brief href
+   * @return href string
+   */
   const std::string& href() const {
     return href_;
   }
+  /**
+   * @brief name
+   * @return name string
+   */
   const std::string& name() const {
     return name_;
   }
index 32fdb64d786c06bb7ac0ae1b6d275bc2919cfa23..1da9355c433855a7a9c124e3fb78a9039f31cc5b 100644 (file)
@@ -17,13 +17,24 @@ namespace parse {
 
 class DescriptionInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief set_description sets description
+   * @param description
+   */
   void set_description(const std::string& description) {
     description_ = description;
   }
+  /**
+   * @brief set_xml_lang sets xml lang
+   * @param xml_lang
+   */
   void set_xml_lang(const std::string& xml_lang) {
     xml_lang_ = xml_lang;
   }
-
+  /**
+   * @brief description
+   * @return description string
+   */
   const std::string& description() const {
     return description_;
   }
index 23fc87472462c5e2b23b02c25792e37144b5ab87..90acc196e3a4ea22689baf01fa55fde5a288b901 100644 (file)
@@ -17,31 +17,66 @@ namespace parse {
 
 class PackageInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief set_xmlns xmlns
+   * @param xmlns
+   */
   void set_xmlns(const std::string& xmlns) {
     xmlns_ = xmlns;
   }
+  /**
+   * @brief set_api_version set api version
+   * @param api_version
+   */
   void set_api_version(const std::string& api_version) {
     api_version_ = api_version;
   }
+  /**
+   * @brief set_package set package
+   * @param package
+   */
   void set_package(const std::string& package) {
     package_ = package;
   }
+  /**
+   * @brief set_version sets version
+   * @param version
+   */
   void set_version(const std::string& version) {
     version_ = version;
   }
+  /**
+   * @brief set_install_location sets install location
+   * @param install_location
+   */
   void set_install_location(const std::string& install_location) {
     install_location_ = install_location;
   }
-
+  /**
+   * @brief xmlns
+   * @return xmlns string
+   */
   const std::string& xmlns() const {
     return xmlns_;
   }
+  /**
+   * @brief api_version
+   * @return  api_version string
+   */
   const std::string& api_version() const {
     return api_version_;
   }
+  /**
+   * @brief package
+   * @return package string
+   */
   const std::string& package() const {
     return package_;
   }
+  /**
+   * @brief version
+   * @return version string
+   */
   const std::string& version() const {
     return version_;
   }
diff --git a/src/tpk_manifest_handlers/package_handler.h.autosave b/src/tpk_manifest_handlers/package_handler.h.autosave
new file mode 100644 (file)
index 0000000..6d5e3ae
--- /dev/null
@@ -0,0 +1,122 @@
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache 2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef TPK_MANIFEST_HANDLERS_PACKAGE_HANDLER_H_
+#define TPK_MANIFEST_HANDLERS_PACKAGE_HANDLER_H_
+
+#include <memory>
+#include <string>
+
+#include "manifest_parser/manifest_handler.h"
+#include "manifest_parser/values.h"
+#include "tpk_manifest_handlers/application_manifest_constants.h"
+
+namespace tpk {
+namespace parse {
+
+class PackageInfo : public parser::ManifestData {
+ public:
+  /**
+   * @brief set_xmlns xmlns
+   * @param xmlns
+   */
+  void set_xmlns(const std::string& xmlns) {
+    xmlns_ = xmlns;
+  }
+  /**
+   * @brief set_api_version set api version
+   * @param api_version
+   */
+  void set_api_version(const std::string& api_version) {
+    api_version_ = api_version;
+  }
+  /**
+   * @brief set_package set package
+   * @param package
+   */
+  void set_package(const std::string& package) {
+    package_ = package;
+  }
+  /**
+   * @brief set_version sets version
+   * @param version
+   */
+  void set_version(const std::string& version) {
+    version_ = version;
+  }
+  /**
+   * @brief set_install_location sets install location
+   * @param install_location
+   */
+  void set_install_location(const std::string& install_location) {
+    install_location_ = install_location;
+  }
+  /**
+   * @brief xmlns
+   * @return xmlns string
+   */
+  const std::string& xmlns() const {
+    return xmlns_;
+  }
+  /**
+   * @brief api_version
+   * @return  api_version string
+   */
+  const std::string& api_version() const {
+    return api_version_;
+  }
+  /**
+   * @brief package
+   * @return package string
+   */
+  const std::string& package() const {
+    return package_;
+  }
+  /**
+   * @brief version
+   * @return version string
+   */
+  const std::string& version() const {
+    return version_;
+  }
+  /**
+   * @brief install_location
+   * @return 
+   */
+  const std::string& install_location() const {
+    return install_location_;
+  }
+
+
+ private:
+  std::string xmlns_;
+  std::string api_version_;
+  std::string package_;
+  std::string version_;
+  std::string install_location_;
+};
+
+/**
+ * @brief The PackageHandler class
+ *
+ * Handler of tizen-manifest.xml for root xml element <manifest>
+ * Child elements are parsed in other handlers.
+ */
+class PackageHandler : public parser::ManifestHandler {
+ public:
+  bool Parse(
+      const parser::Manifest& manifest,
+      std::shared_ptr<parser::ManifestData>* output,
+      std::string* error) override;
+  bool Validate(
+      const parser::ManifestData& data,
+      const parser::ManifestDataMap& handlers_output,
+      std::string* error) const override;
+  std::string Key() const override;
+};
+
+}   // namespace parse
+}   // namespace tpk
+
+#endif  // TPK_MANIFEST_HANDLERS_PACKAGE_HANDLER_H_
index 35f1fa7c8f44cf5746666f62310a62c634a94081..8620af3b9c95da1fff18089987210a2138837b2a 100644 (file)
@@ -19,10 +19,17 @@ namespace parse {
 
 class PrivilegesInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief GetPrivileges
+   * @return PrivilegesSet
+   */
   const parser::PrivilegesSet& GetPrivileges() const {
     return privileges_;
   }
-
+  /**
+   * @brief AddPrivilege add privilege
+   * @param privilege
+   */
   void AddPrivilege(const std::string& privilege) {
     privileges_.insert(privilege);
   }
index 5a170a1fc0a6271518ad5543d42fb033fd355575..b9113787af4116c85d201ac05020920412c5cf56 100644 (file)
@@ -19,34 +19,73 @@ namespace parse {
 
 class ServiceApplicationInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief set_appid sets appid
+   * @param appid
+   */
   void set_appid(const std::string& appid) {
     appid_ = appid;
   }
+  /**
+   * @brief set_auto_restart sets auto restart
+   * @param auto_restart
+   */
   void set_auto_restart(const std::string& auto_restart) {
     auto_restart_ = auto_restart;
   }
+  /**
+   * @brief set_exec sets exec
+   * @param exec
+   */
   void set_exec(const std::string& exec) {
     exec_ = exec;
   }
+  /**
+   * @brief set_on_boot sets on boot
+   * @param on_boot
+   */
   void set_on_boot(const std::string& on_boot) {
     on_boot_ = on_boot;
   }
+  /**
+   * @brief set_type sets type
+   * @param type
+   */
   void set_type(const std::string& type) {
     type_ = type;
   }
-
+  /**
+   * @brief appid
+   * @return appid string
+   */
   const std::string& appid() const {
     return appid_;
   }
+  /**
+   * @brief auto_restart
+   * @return auto_restart string
+   */
   const std::string& auto_restart() const {
     return auto_restart_;
   }
+  /**
+   * @brief exec
+   * @return exec string
+   */
   const std::string& exec() const {
     return exec_;
   }
+  /**
+   * @brief on_boot
+   * @return on_boot string
+   */
   const std::string& on_boot() const {
     return on_boot_;
   }
+  /**
+   * @brief type
+   * @return type string
+   */
   const std::string& type() const {
     return type_;
   }
index a5005e2bea0170eb44b9b74225740dde3f480bfb..4bde3b24ad85fa359fb759d1d16366f2c622f5ad 100644 (file)
@@ -19,46 +19,102 @@ namespace parse {
 
 class UIApplicationInfo : public parser::ManifestData {
  public:
+  /**
+   * @brief set_appid sets app id
+   * @param appid
+   */
   void set_appid(const std::string& appid) {
     appid_ = appid;
   }
+  /**
+   * @brief set_exec sets exec
+   * @param exec
+   */
   void set_exec(const std::string& exec) {
     exec_ = exec;
   }
+  /**
+   * @brief set_launch_mode sets launch mdoe
+   * @param launch_mode
+   */
   void set_launch_mode(const std::string& launch_mode) {
     launch_mode_ = launch_mode;
   }
+  /**
+   * @brief set_multiple sets multiple
+   * @param multiple
+   */
   void set_multiple(const std::string& multiple) {
     multiple_ = multiple;
   }
+  /**
+   * @brief set_nodisplay sets no display
+   * @param nodisplay
+   */
   void set_nodisplay(const std::string& nodisplay) {
     nodisplay_ = nodisplay;
   }
+  /**
+   * @brief set_taskmanage set task manage
+   * @param taskmanage
+   */
   void set_taskmanage(const std::string& taskmanage) {
     taskmanage_ = taskmanage;
   }
+  /**
+   * @brief set_type set types
+   * @param type
+   */
   void set_type(const std::string& type) {
     type_ = type;
   }
+  /**
+   * @brief appid
+   * @return appid string
+   */
 
   const std::string& appid() const {
     return appid_;
   }
+  /**
+   * @brief exec
+   * @return exec string
+   */
   const std::string& exec() const {
     return exec_;
   }
+  /**
+   * @brief launch_mode
+   * @return launch mode string
+   */
   const std::string& launch_mode() const {
     return launch_mode_;
   }
+  /**
+   * @brief multiple
+   * @return multiple string
+   */
   const std::string& multiple() const {
     return multiple_;
   }
+  /**
+   * @brief nodisplay
+   * @return nodisplay string
+   */
   const std::string& nodisplay() const {
     return nodisplay_;
   }
+  /**
+   * @brief taskmanage
+   * @return taskmanage
+   */
   const std::string& taskmanage() const {
     return taskmanage_;
   }
+  /**
+   * @brief type
+   * @return type string
+   */
   const std::string& type() const {
     return type_;
   }