private:
std::string id_;
- IActionResultHandler* handler_;
+ IActionResultHandler* handler_ = nullptr;
};
} // namespace common
private:
std::string action_id_;
std::string app_id_;
- ActionType type_;
+ ActionType type_ = ActionType::InvalidType;
std::string description_;
//is std::map better?
namespace common {
-ActionParameter::ActionParameter() {}
+ActionParameter::ActionParameter() : type_(ParameterType::InvalidType), is_required_(false) {}
ActionParameter::ActionParameter(std::string name, ParameterType type, std::string value, std::string description, bool is_required)
: name_(std::move(name)), type_(type), value_(std::move(value)), description_(std::move(description)), is_required_(is_required) {
int ret = rpc_port_register_proc_info(
"d::org.tizen.appfw.service.tizen_action_plugin_manager", nullptr);
if (ret != 0) {
- perror("Failed to register proc info");
+ LOG(ERROR) << "Failed to register proc info";
return -1;
}
- rpc_port::plugin_manager_stub::stub::PluginManager stub;
- stub.Listen(std::make_shared<PluginService::Factory>());
+ try {
+ rpc_port::plugin_manager_stub::stub::PluginManager stub;
+ stub.Listen(std::make_shared<PluginService::Factory>());
+ } catch (rpc_port::plugin_manager_stub::stub::InvalidIOException& e) {
+ LOG(ERROR) << "InvalidIOException";
+ return 0;
+ }
+
auto* mainloop = g_main_loop_new(nullptr, FALSE);
g_main_loop_run(mainloop);
g_main_loop_unref(mainloop);
service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED],
APP_EVENT_REGION_FORMAT_CHANGED, ServiceAppRegionChanged, nullptr);
- action::ActionRequestHandler manager;
- manager.Init();
+ try {
+ action::ActionRequestHandler manager;
+ manager.Init();
+ } catch (...) {
+ LOG(ERROR) << "Failed to initialize ActionRequestHandler";
+ return -1;
+ }
LOG(DEBUG) << "service_app_main start...";