27 RCLCPP_INFO(
getLogger(),
"[CbQuickAdd] Adding event: %s",
text_.c_str());
33 RCLCPP_ERROR(
getLogger(),
"[CbQuickAdd] ClGcalcli client not available");
41 RCLCPP_ERROR(
getLogger(),
"[CbQuickAdd] CpGcalcliConnection not available");
47 std::string args =
"quick";
51 args +=
" --calendar \"" +
calendar_ +
"\"";
55 std::string escaped_text =
text_;
58 while ((pos = escaped_text.find(
'"', pos)) != std::string::npos)
60 escaped_text.replace(pos, 1,
"\\\"");
64 args +=
" \"" + escaped_text +
"\"";
68 if (result.exit_code == 0 && !result.timed_out)
70 RCLCPP_INFO(
getLogger(),
"[CbQuickAdd] Event added successfully");
75 RCLCPP_ERROR(
getLogger(),
"[CbQuickAdd] Failed to add event: %s", result.stdout_output.c_str());