return AMBIENT_VIEWER_ERROR_NONE;
}
- int SetReceiveCallbackInfo (unique_ptr<ReceiveCallbackInfo> info) {
+ int SetReceiveCallbackInfo(unique_ptr<ReceiveCallbackInfo> info) {
event_cb_ = move(info);
return AMBIENT_VIEWER_ERROR_NONE;
}
};
extern "C" EXPORT_API int ambient_viewer_create(Evas_Object *win,
- ambient_viewer_h *handle)
-{
+ ambient_viewer_h *handle) {
if (win == nullptr || handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
return AMBIENT_VIEWER_ERROR_NONE;
}
-extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle)
-{
+extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_notify_ambient_event(
- ambient_viewer_h handle, bool enter,
- ambient_viewer_direction_e dir, bundle *extra)
-{
+ ambient_viewer_h handle, bool enter,
+ ambient_viewer_direction_e dir, bundle *extra) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
AmbientViewerStub* stub = static_cast<AmbientViewerStub*>(handle);
- stub->NotifyAmbientEvent(enter, static_cast<AmbientViewer::Direction>(dir), Bundle(extra, false, false));
+ stub->NotifyAmbientEvent(enter, static_cast<AmbientViewer::Direction>(dir),
+ Bundle(extra, false, false));
return AMBIENT_VIEWER_ERROR_NONE;
}
extern "C" EXPORT_API int ambient_viewer_block_update(ambient_viewer_h handle,
- bool enable)
-{
+ bool enable) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle,
- ambient_viewer_lifecycle_s lifecycle, void *user_data)
-{
+ ambient_viewer_lifecycle_s lifecycle, void *user_data) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
AmbientViewerStub* stub = static_cast<AmbientViewerStub*>(handle);
- unique_ptr<MonitorCallbackInfo> info (
+ unique_ptr<MonitorCallbackInfo> info(
new (nothrow)MonitorCallbackInfo(lifecycle, user_data));
if (info.get() == nullptr) {
LOGE("out of memory");
return AMBIENT_VIEWER_ERROR_NONE;
}
-extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle)
-{
+extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_set_event_listener(
- ambient_viewer_h handle,
- ambient_viewer_event_cb callback, void *user_data)
-{
+ ambient_viewer_h handle, ambient_viewer_event_cb callback, void *user_data) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
AmbientViewerStub* stub = static_cast<AmbientViewerStub*>(handle);
- unique_ptr<ReceiveCallbackInfo> info (
+ unique_ptr<ReceiveCallbackInfo> info(
new (nothrow)ReceiveCallbackInfo(callback, user_data));
if (info.get() == nullptr) {
LOGE("out of memory");
}
extern "C" EXPORT_API int ambient_viewer_unset_event_listener(
- ambient_viewer_h handle)
-{
+ ambient_viewer_h handle) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_get_watch_surface(
- ambient_viewer_h handle,
- ambient_viewer_surface_h *surface)
-{
+ ambient_viewer_h handle, ambient_viewer_surface_h *surface) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_get_top_app_surface(
- ambient_viewer_h handle,
- ambient_viewer_surface_h *surface)
-{
+ ambient_viewer_h handle, ambient_viewer_surface_h *surface) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_surface_get_cur_image(
- ambient_viewer_surface_h handle, Evas_Object **image)
-{
+ ambient_viewer_surface_h handle, Evas_Object **image) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_surface_is_watch(
- ambient_viewer_surface_h handle, bool *is_watch)
-{
+ ambient_viewer_surface_h handle, bool *is_watch) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_surface_get_app_id(
- ambient_viewer_surface_h handle, char **app_id)
-{
+ ambient_viewer_surface_h handle, char **app_id) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_surface_get_inst_id(
- ambient_viewer_surface_h handle, char **inst_id)
-{
+ ambient_viewer_surface_h handle, char **inst_id) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
}
extern "C" EXPORT_API int ambient_viewer_surface_get_opr(
- ambient_viewer_surface_h handle, float *opr)
-{
+ ambient_viewer_surface_h handle, float *opr) {
if (handle == nullptr) {
LOGE("Invalid parameter");
return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER;
*opr = surface->GetOpr();
return AMBIENT_VIEWER_ERROR_NONE;
-}
\ No newline at end of file
+}