WidgetBase::OnTerminate();
return -1;
}
-
+/* LCOV_EXCL_START */
void OnLoopInit(int argc, char** argv) override {
elm_init(argc, argv);
}
void OnLoopRun() override {
elm_run();
}
-
+/* LCOV_EXCL_STOP */
void OnLoopExit() override {
elm_exit();
}
-
+/* LCOV_EXCL_START */
int OnTrimMemory() override {
_D("Trim memory");
elm_cache_all_flush();
return WidgetBase::OnTrimMemory();
}
-
+/* LCOV_EXCL_STOP */
private:
widget_app_lifecycle_callback_s* callback_;
void* user_data_;
}
private:
+/* LCOV_EXCL_START */
void SetIconifyTimer() {
if (iconify_timer_)
return;
return G_SOURCE_REMOVE;
}, this);
}
-
+/* LCOV_EXCL_STOP */
void UnsetIconifyTimer() {
if (iconify_timer_) {
g_source_remove(iconify_timer_);
}
if (callback->create == nullptr) {
- _E("widget_app_create_cb() callback must be registered");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("widget_app_create_cb() callback must be registered");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
try {
__app_widget->AddEvent(i);
__app_widget->Run(argc, argv);
- } catch (std::runtime_error& e) {
- return WIDGET_ERROR_FAULT;
+ } catch (std::runtime_error& e) {/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_FAULT;/* LCOV_EXCL_LINE */
}
return WIDGET_ERROR_NONE;
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
return WIDGET_ERROR_NOT_SUPPORTED;
if (cb == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (__app_widget.get() == nullptr)
auto* app_event = new (std::nothrow) AppEvent(
::__app_event_converter[event_type], callback, user_data);
if (app_event == nullptr) {
- _E("Out of memory");
- return WIDGET_ERROR_OUT_OF_MEMORY;
+ _E("Out of memory");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_OUT_OF_MEMORY;/* LCOV_EXCL_LINE */
}
auto* h = new (std::nothrow) std::shared_ptr<AppEvent>(app_event);
if (h == nullptr) {
- _E("Out of memory");
- delete app_event;
- return WIDGET_ERROR_OUT_OF_MEMORY;
+ _E("Out of memory");/* LCOV_EXCL_LINE */
+ delete app_event;/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_OUT_OF_MEMORY;/* LCOV_EXCL_LINE */
}
if (__app_widget.get() != nullptr)
bool feature;
int ret = system_info_get_platform_bool(kFeatureShellAppWidget, &feature);
if (ret < 0) {
- set_last_result(WIDGET_ERROR_FAULT);
- return nullptr;
+ set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (!feature) {
- set_last_result(WIDGET_ERROR_NOT_SUPPORTED);
- return nullptr;
+ set_last_result(WIDGET_ERROR_NOT_SUPPORTED);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (context == nullptr) {
- set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- return nullptr;
+ set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr || win == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
Ecore_Wl2_Window* wl_win = ecore_evas_wayland2_window_get(
ecore_evas_ecore_evas_get(evas_object_evas_get(ret_win)));
if (wl_win == nullptr) {
- _E("Failed to get wayland window");
- evas_object_del(ret_win);
- return WIDGET_ERROR_FAULT;
+ _E("Failed to get wayland window");/* LCOV_EXCL_LINE */
+ evas_object_del(ret_win);/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_FAULT;/* LCOV_EXCL_LINE */
}
ecore_wl2_window_class_set(wl_win, id.c_str());
bool feature;
int ret = system_info_get_platform_bool(kFeatureShellAppWidget, &feature);
if (ret < 0) {
- set_last_result(WIDGET_ERROR_FAULT);
- return nullptr;
+ set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (!feature) {
- set_last_result(WIDGET_ERROR_NOT_SUPPORTED);
- return nullptr;
+ set_last_result(WIDGET_ERROR_NOT_SUPPORTED);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (class_id == nullptr || callback.create == nullptr) {
- _E("Invalid parameter");
- set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- return nullptr;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (__app_widget.get() == nullptr) {
- set_last_result(WIDGET_ERROR_FAULT);
- return nullptr;
+ set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
auto factory = std::shared_ptr<AppCoreMultiWindowBase::Context::IFactory>(
new (std::nothrow) AppWidgetContext::Factory(
class_id, callback, user_data));
if (factory.get() == nullptr) {
- set_last_result(WIDGET_ERROR_OUT_OF_MEMORY);
- return nullptr;
+ set_last_result(WIDGET_ERROR_OUT_OF_MEMORY);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
__app_widget->AddContextFactory(std::move(factory), class_id);
bool feature;
int ret = system_info_get_platform_bool(kFeatureShellAppWidget, &feature);
if (ret < 0) {
- set_last_result(WIDGET_ERROR_FAULT);
- return nullptr;
+ set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (!feature) {
- set_last_result(WIDGET_ERROR_NOT_SUPPORTED);
- return nullptr;
+ set_last_result(WIDGET_ERROR_NOT_SUPPORTED);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
if (callback.create == nullptr) {
- _E("Invalid parameter");
- set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- return nullptr;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
char* appid = nullptr;
app_get_id(&appid);
if (appid == nullptr) {
- LOGE("app_get_id() is failed");
- return nullptr;
+ LOGE("app_get_id() is failed");/* LCOV_EXCL_LINE */
+ return nullptr;/* LCOV_EXCL_LINE */
}
std::unique_ptr<char, decltype(std::free)*> ptr(appid, std::free);
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr || tag == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr || content_info == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
ret = cxt->SetContents(tizen_base::Bundle(content_info));
if (ret != WIDGET_ERROR_NONE) {
- _E("Failed to set content");
- return static_cast<widget_error_e>(ret);
+ _E("Failed to set content");/* LCOV_EXCL_LINE */
+ return static_cast<widget_error_e>(ret);/* LCOV_EXCL_LINE */
}
return WIDGET_ERROR_NONE;
return WIDGET_ERROR_NOT_SUPPORTED;
if (context == nullptr || title == nullptr) {
- _E("Invalid parameter");
- return WIDGET_ERROR_INVALID_PARAMETER;
+ _E("Invalid parameter");/* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
auto* cxt = reinterpret_cast<AppWidgetContext*>(context);
if (cxt->GetWindow())
- elm_win_title_set(cxt->GetWindow(), title);
+ elm_win_title_set(cxt->GetWindow(), title);/* LCOV_EXCL_LINE */
return WIDGET_ERROR_NONE;
}