Added missing comments 37/50537/1
authorLukasz Wysocki <l.wysocki@samsung.com>
Thu, 29 Oct 2015 13:49:52 +0000 (14:49 +0100)
committerLukasz Wysocki <l.wysocki@samsung.com>
Thu, 29 Oct 2015 13:50:13 +0000 (14:50 +0100)
Change-Id: Ie8f77811dbf18147203ce15cadfd736d695a2683

17 files changed:
src/wgt/rds_parser.h
src/wgt/step/step_add_default_privileges.h
src/wgt/step/step_check_settings_level.h
src/wgt/step/step_create_symbolic_link.h
src/wgt/step/step_encrypt_resources.h
src/wgt/step/step_parse.h
src/wgt/step/step_parse_recovery.h
src/wgt/step/step_rds_modify.h
src/wgt/step/step_rds_parse.h
src/wgt/step/step_remove_encryption_data.h
src/wgt/step/step_wgt_copy_storage_directories.h
src/wgt/step/step_wgt_create_icons.h
src/wgt/step/step_wgt_create_storage_directories.h
src/wgt/step/step_wgt_resource_directory.h
src/wgt/wgt_app_query_interface.h
src/wgt/wgt_backend_data.h
src/wgt/wgt_installer.h

index 26d1b2d..9597768 100644 (file)
 namespace wgt {
 namespace rds_parser {
 
+/**
+ * \brief Parse RDS config file
+ */
 class RDSParser {
  public:
+  /**
+   * \brief Explicit constructor
+   *
+   * \param path_to_delta path to directory
+   */
   explicit RDSParser(const std::string& path_to_delta);
 
+  /**
+   * \brief Parse package xml
+   *
+   * \return true if parsing was successful
+   */
   bool Parse();
 
+  /**
+   * \brief Accessor to vector of files to modify
+   *
+   * \return files to modify
+   */
   const std::vector<std::string>& files_to_modify() const;
+
+  /**
+   * \brief Accessor to vector of files to add
+   *
+   * \return files to add
+   */
   const std::vector<std::string>& files_to_add() const;
+
+  /**
+   * \brief Accessor to vector of files to delete
+   *
+   * \return files to delete
+   */
   const std::vector<std::string>& files_to_delete() const;
  private:
   std::string path_to_delta_;
index 18994d5..b9be9f9 100644 (file)
 namespace wgt {
 namespace security {
 
+/**
+ * \brief Step that add default privileges during installation
+ */
 class StepAddDefaultPrivileges : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Add default privileges
+   *
+   * \return Status::OK
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Check requirements for this step
+   *
+   * \return Status::ERROR when rmanifest data are missing,
+   *         Status::OK otherwise
+   */
   Status precheck() override;
 
   SCOPE_LOG_TAG(AddDefaultPrivileges)
index 75f4047..4267ab5 100644 (file)
 namespace wgt {
 namespace security {
 
+/**
+ * \brief Step that check privileges level for settings
+ */
 class StepCheckSettingsLevel : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Check privileges level for settings
+   *
+   * \return Status::ERROR when invalid privileges detected,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
   SCOPE_LOG_TAG(CheckSettingsLevel)
index 60cb10d..3b03bf7 100644 (file)
 namespace wgt {
 namespace filesystem {
 
+/**
+ * \brief Step that create symbolic link to application
+ */
 class StepCreateSymbolicLink : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Create symbolic link
+   *
+   * \return Status::ERROR when failed to create symbolic link,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Delete created symbolic link
+   *
+   * \return Status::OK
+   */
   Status undo() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
   SCOPE_LOG_TAG(SymbolicLink)
index 0875976..1f3b633 100644 (file)
 namespace wgt {
 namespace encrypt {
 
+/**
+ * \brief Step that encrypt application resources files if flagged to do so
+ */
 class StepEncryptResources : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Encrypt files
+   *
+   * \return Status::ERROR when error occurred during encryption,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Check requirements for this step
+   *
+   * \return Status::ERROR when manifest data are missing,
+   *         Status::INVALID_VALUE when requirements are not meet,
+   *         Status::OK otherwise
+   */
   Status precheck() override;
 
  private:
index d204397..b217be2 100644 (file)
 namespace wgt {
 namespace parse {
 
+/**
+ * \brief This step parse manifest.xml document
+ */
 class StepParse : public common_installer::Step {
  public:
+
+  /**
+   * \brief Explicit constructor
+   *
+   * \param context Installer context
+   * \param check_start_file Flag if start file should be validated
+   */
   explicit StepParse(common_installer::InstallerContext* context,
       bool check_start_file);
 
+  /**
+   * \brief
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
  protected:
index 86dc1f6..5e37074 100644 (file)
@@ -11,7 +11,7 @@
 namespace wgt {
 namespace parse {
 /**
- * @brief The StepParseRecovery class
+ * \brief The StepParseRecovery class
  *        Retrievies package information from config.xml during RECOVERY.
  *
  * Step is used in recovery mode.
@@ -24,10 +24,34 @@ namespace parse {
  */
 class StepParseRecovery : public StepParse {
  public:
+
+  /**
+   * \brief Explicit constructor
+   *
+   * \param context installer context
+   */
   explicit StepParseRecovery(common_installer::InstallerContext* context);
 
+  /**
+   * \brief Parse config.xml
+   *
+   * \return Status::OK
+   */
   Status process() override;
+
+  /**
+   * \brief Validate requirements for this step
+   *
+   * \return Status::ERROR when root path of packages is missing,
+   *         Status::OK otherwise
+   */
   Status precheck() override;
+
+  /**
+   * \brief Locate config.xml file
+   *
+   * \return true if config.xml is found
+   */
   bool LocateConfigFile() override;
 
   SCOPE_LOG_TAG(ParseRecovery)
index 8841ad6..7e7f54c 100644 (file)
 namespace wgt {
 namespace rds {
 
+/**
+ * \brief Step that apply RDS modification during reinstallation process
+ */
 class StepRDSModify : public common_installer::Step {
  public:
+
+  /**
+   * \brief Explicit constructor
+   *
+   * \param context Installer context
+   */
   explicit StepRDSModify(common_installer::InstallerContext* context);
+
+  /**
+   * \brief
+   *
+   * \return
+   */
   Status process() override;
+
+  /**
+   * \brief Remove files from temporary location
+   *
+   * \return Status::OK
+   */
   Status clean() override;
+
+  /**
+   * \brief Restore files to the state from before RDS installation
+   *
+   * \return Status::OK
+   */
   Status undo() override;
+
+  /**
+   * \brief
+   *
+   * \return Status::ERROR when manifest is missing, pkgid is missing,
+   *         or when path to the unpacked directory is missing or not exist,
+   *         Status::OK otherwise
+   */
   Status precheck() override;
 
  private:
index 1577cc7..4a57040 100644 (file)
 namespace wgt {
 namespace rds {
 
+/**
+ * \brief This step parse .rds_delta file
+ *
+ * This is to prepare RDS installation process
+ */
 class StepRDSParse : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Parse .rds_delta file
+   *
+   * \return Status::ERROR when wgt backend data are missing,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Validate if .rds_delta file exist
+   *
+   * \return Status::Error if file not exist,
+   *         Status::OK otherwise
+   */
   Status precheck() override;
 
  private:
index 8415cc2..1cd4458 100644 (file)
 namespace wgt {
 namespace encrypt {
 
+/**
+ * This step remove encryption keys used for encryption during installation
+ *
+ * This step is called during uninstallation process
+ */
 class StepRemoveEncryptionData : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Remove encryption keys from database
+   *
+   * \return Status::ERROR in case of failure,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
   SCOPE_LOG_TAG(RemoveEncryptionData)
index f74446b..9ed4449 100644 (file)
@@ -22,7 +22,22 @@ class StepWgtCopyStorageDirectories
  public:
   using StepCopyStorageDirectories::StepCopyStorageDirectories;
 
+  /**
+   * \brief Create shared and private directories,
+   *        and copy/restore widget files to appropriate directory
+   *
+   * \return Status::ERROR when failed to create temporary location,
+   *                       private temporary location, or failed to restore
+   *                       shared/private directory for widget,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Move files from shared/private directories back to source directory
+   *
+   * \return Status::OK
+   */
   Status undo() override;
 
  private:
index e032148..b29f7cf 100644 (file)
 namespace wgt {
 namespace filesystem {
 
+/**
+ * \brief This step return path to widget icon
+ */
 class StepWgtCreateIcons
     : public common_installer::filesystem::StepCreateIcons {
  public:
   using StepCreateIcons::StepCreateIcons;
 
+  /**
+   * \brief Return path to widget icon
+   *
+   * \return path to widget icon
+   */
   boost::filesystem::path GetIconRoot() const override;
 
   SCOPE_LOG_TAG(WgtCreateIcons)
index 7ef1660..1d7f1d4 100644 (file)
@@ -31,9 +31,34 @@ class StepWgtCreateStorageDirectories :
  public:
   using StepCreateStorageDirectories::StepCreateStorageDirectories;
 
+  /**
+   * \brief Create shared and private directories
+   *
+   * \return Status::ERROR when failed to create temporary location, or
+   *                       private temporary location
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
  private:
index 1cc3f2d..9689dce 100644 (file)
 namespace wgt {
 namespace filesystem {
 
-//
-// This step fixes unpacked directory structure so that all widget content
-// is moved from root path to res/wgt before we copy whole directory in
-// StepCopy
-//
+/**
+ * \brief This step fixes unpacked directory structure so that all widget
+ * content is moved from root path to res/wgt before we copy whole directory in
+ * StepCopy
+ */
 class StepWgtResourceDirectory : public common_installer::Step {
  public:
   using Step::Step;
 
+  /**
+   * \brief Create directory structure and copy content of widget package
+   *
+   * \return Status::ERROR when failed to create proper directory structure or
+   *                       move source directory to destination directory,
+   *         Status::OK otherwise
+   */
   Status process() override;
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status clean() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status undo() override { return Status::OK; }
+
+  /**
+   * \brief Empty method
+   *
+   * \return Status::OK
+   */
   Status precheck() override { return Status::OK; }
 
   SCOPE_LOG_TAG(CreateWgtResourceDirectory)
index 965ce7f..c717b14 100644 (file)
@@ -9,8 +9,22 @@
 
 namespace wgt {
 
+/**
+ * \brief Helper functionalities used before
+ *        configuring app-installer steps.
+ *        Eg. it is used to check, if package is to be installed or updated
+ */
 class WgtAppQueryInterface : public common_installer::AppQueryInterface {
  public:
+  /**
+   * \brief method for checking if package is installed based
+   *        on argv
+   *
+   * \param argc main() argc argument passed to the backend
+   * \param argv main() argv argument passed to the backend
+   *
+   * \return true if package is installed
+   */
   bool IsAppInstalledByArgv(int argc, char** argv) override;
 };
 
index 0ff19fc..cb7c650 100644 (file)
 
 namespace wgt {
 
+/**
+ * \brief Class that is used within specific backends to keep additional
+ *        information regarding package
+ */
 class WgtBackendData : public common_installer::BackendData {
  public:
+  /**
+   * \brief Property of vector of files to add
+   */
   Property<std::vector<std::string>> files_to_add;
+
+  /**
+   * \brief Property of vector of files to modify
+   */
   Property<std::vector<std::string>> files_to_modify;
+
+  /**
+   * \brief Property of vector of files to delete
+   */
   Property<std::vector<std::string>> files_to_delete;
 
+  /**
+   * \brief Property of SettingInfo
+   */
   Property<parse::SettingInfo> settings;
 };
 
index da3bec4..47a119f 100644 (file)
 namespace wgt {
 
 /**
- * @brief The WgtInstaller class
+ * \brief The WgtInstaller class
  *        Subclass of AppInstaller class dedicated for handling wgt request
  *
  * Performs all types of requests of wgt packages and sets required sequence of
- * steps.
+ * steps
  */
 class WgtInstaller : public common_installer::AppInstaller {
  public:
+  /**
+   * \brief Explicit constructor
+   *
+   * \param pkgmgr pointer to pkgmgr
+   */
   explicit WgtInstaller(common_installer::PkgMgrPtr pkgrmgr);
 };