Fix codes for Manifest installation
[platform/core/appfw/wgt-backend.git] / src / hybrid / step / configuration / step_merge_tpk_config.h
1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_CONFIG_H_
6 #define HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_CONFIG_H_
7
8 #include <common/step/step.h>
9 #include <manifest_parser/utils/logging.h>
10
11 namespace hybrid {
12 namespace configuration {
13
14 /**
15  * \brief MergeTpkConfig
16  *        Merges information from tpk manifest into information from widget
17  *        configuration for hybrid package.
18  */
19 class StepMergeTpkConfig : public common_installer::Step {
20  public:
21   enum class MergeType {
22     CONCAT,      // Concatenate configurations
23     OVERWRITE    // Overwrite one with others
24   };
25
26   explicit StepMergeTpkConfig(common_installer::InstallerContext* context,
27       MergeType type);
28
29   using Step::Step;
30
31   Status process() override;
32   Status clean() override { return Status::OK; }
33   Status undo() override { return Status::OK; }
34   Status precheck() override { return Status::OK; }
35
36  private:
37   MergeType merge_type_;
38
39   STEP_NAME(MergeTpkConfig)
40 };
41
42 }  // namespace configuration
43 }  // namespace hybrid
44
45 #endif  // HYBRID_STEP_CONFIGURATION_STEP_MERGE_TPK_CONFIG_H_