Add vconf data into aulctl status 55/271755/1
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 28 Feb 2022 07:02:14 +0000 (16:02 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 28 Feb 2022 07:02:14 +0000 (16:02 +0900)
Change-Id: Ic0b5fb105ae0044ba31cadbdcaeb98a7888b17a0
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
include/aul_key.h
tool/aulctl/boot_sequence/app_info.cc
tool/aulctl/boot_sequence/app_info.hh
tool/aulctl/boot_sequence/boot_sequence_manager.cc
tool/aulctl/operation/status_all_operation.cc
tool/aulctl/operation/status_once_operation.cc

index 5ae560e..964aac9 100644 (file)
  * @since_tizen 7.0
  */
 #define AUL_K_STATUS_MSG                "__AUL_STATUS_MSG__"
+
+/**
+ * @brief Definition for AUL: The vconf data of boot sequence app.
+ * @since_tizen 7.0
+ */
+#define AUL_K_VCONF_DATA                "__AUL_VCONF_DATA__"
index f4149c0..24b0669 100644 (file)
@@ -76,6 +76,11 @@ AppInfo::Builder& AppInfo::Builder::SetConflicts(
   return *this;
 }
 
+AppInfo::Builder& AppInfo::Builder::SetVconf(const tizen_base::Bundle& args) {
+  vconf_ = args.GetStringArray(AUL_K_VCONF_DATA);
+  return *this;
+}
+
 AppInfo::Builder& AppInfo::Builder::SetArgs(
     const tizen_base::Bundle& args) {
   static const std::vector<std::string> internal_keys{
@@ -171,6 +176,7 @@ AppInfo* AppInfo::Builder::Build() const {
       std::move(before_),
       std::move(requires_),
       std::move(conflicts_),
+      std::move(vconf_),
       std::move(args_),
       std::move(active_state_),
       std::move(sub_state_),
@@ -187,6 +193,7 @@ AppInfo* AppInfo::Builder::Build() const {
 AppInfo::AppInfo(std::string appid, uid_t uid, int priority,
     std::set<std::string> after, std::set<std::string> before,
     std::set<std::string> requires, std::set<std::string> conflicts,
+    std::vector<std::string> vconfs,
     tizen_base::Bundle args,
     std::string active_state, std::string sub_state,
     std::string begin_timestamp, std::string end_timestamp,
@@ -200,6 +207,7 @@ AppInfo::AppInfo(std::string appid, uid_t uid, int priority,
       before_(std::move(before)),
       requires_(std::move(requires)),
       conflicts_(std::move(conflicts)),
+      vconf_(std::move(vconfs)),
       args_(std::move(args)),
       active_state_(std::move(active_state)),
       sub_state_(std::move(sub_state)),
@@ -261,6 +269,10 @@ const std::set<std::string>& AppInfo::ConflictsGet() const {
   return conflicts_;
 }
 
+const std::vector<std::string>& AppInfo::GetVconf() const {
+  return vconf_;
+}
+
 const tizen_base::Bundle& AppInfo::GetArgs() const {
   return args_;
 }
index 139d132..87e4074 100644 (file)
@@ -40,6 +40,7 @@ class AppInfo {
     Builder& SetBefore(const tizen_base::Bundle& args);
     Builder& SetRequires(const tizen_base::Bundle& args);
     Builder& SetConflicts(const tizen_base::Bundle& args);
+    Builder& SetVconf(const tizen_base::Bundle& args);
     Builder& SetArgs(const tizen_base::Bundle& args);
     Builder& SetBackgroundLaunch(const tizen_base::Bundle& args);
     Builder& SetWaitUntilReady(const tizen_base::Bundle& args);
@@ -62,6 +63,7 @@ class AppInfo {
     std::set<std::string> before_;
     std::set<std::string> requires_;
     std::set<std::string> conflicts_;
+    std::vector<std::string> vconf_;
     tizen_base::Bundle args_;
     std::string active_state_;
     std::string sub_state_;
@@ -78,6 +80,7 @@ class AppInfo {
   AppInfo(std::string appid, uid_t uid, int priority,
           std::set<std::string> after, std::set<std::string> before,
           std::set<std::string> requires, std::set<std::string> conflicts,
+          std::vector<std::string> vconfs,
           tizen_base::Bundle args,
           std::string active_state, std::string sub_state,
           std::string begin_timestamp, std::string end_timestamp,
@@ -101,6 +104,7 @@ class AppInfo {
   bool ConflictsContains(const std::string& appid);
   const std::set<std::string>& ConflictsGet() const;
 
+  const std::vector<std::string>& GetVconf() const;
   const tizen_base::Bundle& GetArgs() const;
   bool IsBackgroundLaunch() const;
   bool WaitUntilReady() const;
@@ -121,7 +125,7 @@ class AppInfo {
   std::set<std::string> before_;
   std::set<std::string> requires_;
   std::set<std::string> conflicts_;
-  std::vector<std::string> required_by_;
+  std::vector<std::string> vconf_;
   tizen_base::Bundle args_;
   std::string active_state_;
   std::string sub_state_;
index c087431..fa9ba1b 100644 (file)
@@ -37,6 +37,7 @@ AppInfoPtr BootSequenceManager::CreateAppInfoFromBundle(tizen_base::Bundle b) {
       .SetAfter(b)
       .SetRequires(b)
       .SetConflicts(b)
+      .SetVconf(b)
       .SetArgs(b)
       .SetTimeout(b)
       .SetActiveState(b)
index 345fd43..96fb5cb 100644 (file)
@@ -91,6 +91,12 @@ bool StatusAllOperation::Process() {
 
     std::cout << std::endl;
 
+    std::cout << "vconf: {\n";
+    for (auto& vconf : app->GetVconf()) {
+      std::cout << vconf << std::endl;
+    }
+    std::cout << "}" << std::endl;
+
     std::cout << "args: {\n";
     auto& b = app->GetArgs();
     bundle_foreach(
index fc55ff5..76e7204 100644 (file)
@@ -95,6 +95,12 @@ bool StatusOnceOperation::Process() {
 
     std::cout << std::endl;
 
+    std::cout << "vconf: {\n";
+    for (auto& vconf : app->GetVconf()) {
+      std::cout << vconf << std::endl;
+    }
+    std::cout << "}" << std::endl;
+
     std::cout << "args: {\n";
     auto& b = app->GetArgs();
     bundle_foreach(