Add new features into boot sequence app info
[platform/core/appfw/aul-1.git] / tool / aulctl / boot_sequence / app_info.cc
index 046846b..481912b 100644 (file)
@@ -144,6 +144,24 @@ AppInfo::Builder& AppInfo::Builder::SetEndTimestamp(
   return *this;
 }
 
+AppInfo::Builder& AppInfo::Builder::SetSocketReadyTimestamp(
+    const tizen_base::Bundle& args) {
+  socket_ready_timestamp_ = args.GetString(AUL_K_SOCKET_READY_TIMESTAMP);
+  return *this;
+}
+
+AppInfo::Builder& AppInfo::Builder::SetTerminatedTimestamp(
+    const tizen_base::Bundle& args) {
+  terminated_timestamp_ = args.GetString(AUL_K_TERMINATED_TIMESTAMP);
+  return *this;
+}
+
+AppInfo::Builder& AppInfo::Builder::SetStatusMessage(
+    const tizen_base::Bundle& args) {
+  status_msg_ = args.GetString(AUL_K_STATUS_MSG);
+  return *this;
+}
+
 AppInfo* AppInfo::Builder::Build() const {
   return new (std::nothrow) AppInfo(
       std::move(appid_),
@@ -158,6 +176,9 @@ AppInfo* AppInfo::Builder::Build() const {
       std::move(sub_state_),
       std::move(begin_timestamp_),
       std::move(end_timestamp_),
+      std::move(socket_ready_timestamp_),
+      std::move(terminated_timestamp_),
+      std::move(status_msg_),
       background_launch_,
       wait_until_ready_,
       timeout_);
@@ -169,6 +190,8 @@ AppInfo::AppInfo(std::string appid, uid_t uid, int priority,
     tizen_base::Bundle args,
     std::string active_state, std::string sub_state,
     std::string begin_timestamp, std::string end_timestamp,
+    std::string socket_ready_timestamp, std::string terminated_timestamp,
+    std::string status_msg,
     bool background_launch, bool wait_until_ready, unsigned int timeout)
     : appid_(std::move(appid)),
       uid_(uid),
@@ -182,9 +205,12 @@ AppInfo::AppInfo(std::string appid, uid_t uid, int priority,
       sub_state_(std::move(sub_state)),
       begin_timestamp_(std::move(begin_timestamp)),
       end_timestamp_(std::move(end_timestamp)),
+      socket_ready_timestamp_(std::move(socket_ready_timestamp)),
+      terminated_timestamp_(std::move(terminated_timestamp)),
       background_launch_(background_launch),
       wait_until_ready_(wait_until_ready),
-      timeout_(timeout) {
+      timeout_(timeout),
+      status_msg_(std::move(status_msg)) {
   if (background_launch_) {
     args_.Delete(K_BG_LAUNCH);
     args_.Add(K_BG_LAUNCH, "enable");
@@ -271,6 +297,14 @@ const std::string& AppInfo::GetEndTimestamp() const {
   return end_timestamp_;
 }
 
+const std::string& AppInfo::GetSocketReadyTimestamp() const {
+  return socket_ready_timestamp_;
+}
+
+const std::string& AppInfo::GetTerminatedTimestamp() const {
+  return terminated_timestamp_;
+}
+
 const std::string& AppInfo::GetStatusMessage() const {
   return status_msg_;
 }