Check coding style for newly added files
authormk5004.lee <mk5004.lee@samsung.com>
Mon, 6 Apr 2020 10:39:50 +0000 (19:39 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 7 Apr 2020 04:21:48 +0000 (13:21 +0900)
Change-Id: I26ce777ee172f2bb85aa16e2adb6e45c96fd7d21
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
ambient-viewer/src/ambient-viewer.cc
ambient-viewer/src/stub.cc
ambient-viewer/src/watch-surface.cc
watch-holder/src/ambient_listener.cc
watch-holder/src/watch.cc
watch-holder/src/watch_holder.cc
watch-holder/src/watch_mirror.cc

index 86f058b01902a21e3f4bd5a932b9830782ab1573..2b54362cd3dd790daa6dce568a21113749a5f30d 100644 (file)
@@ -189,7 +189,7 @@ int AmbientViewer::OnReceiveSignal(const char* endpoint, aul_app_com_result_e e,
 
   Bundle b = Bundle(envelope, false, false);
 
-  std::string event_type= b.GetString("__APP_AMBIENT_EVENT__");
+  std::string event_type = b.GetString("__APP_AMBIENT_EVENT__");
   int type = stoi(event_type);
 
   std::string sender = b.GetString("__APP_AMBIENT_SENDER__");
index e41932100802f6366e070ac68dd8267e5429e91d..a0f96658e24e74982631879ad4bfccf868cc3742 100644 (file)
@@ -108,7 +108,7 @@ class AmbientViewerStub : public AmbientViewer {
     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;
   }
@@ -124,8 +124,7 @@ class AmbientViewerStub : public AmbientViewer {
 };
 
 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;
@@ -142,8 +141,7 @@ extern "C" EXPORT_API int ambient_viewer_create(Evas_Object *win,
   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;
@@ -156,23 +154,22 @@ extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle)
 }
 
 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;
@@ -185,8 +182,7 @@ extern "C" EXPORT_API int ambient_viewer_block_update(ambient_viewer_h handle,
 }
 
 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;
@@ -194,7 +190,7 @@ extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle,
 
   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");
@@ -207,8 +203,7 @@ extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle,
   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;
@@ -222,9 +217,7 @@ extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle)
 }
 
 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;
@@ -232,7 +225,7 @@ extern "C" EXPORT_API int ambient_viewer_set_event_listener(
 
   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");
@@ -245,8 +238,7 @@ extern "C" EXPORT_API int ambient_viewer_set_event_listener(
 }
 
 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;
@@ -259,9 +251,7 @@ extern "C" EXPORT_API int ambient_viewer_unset_event_listener(
 }
 
 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;
@@ -274,9 +264,7 @@ extern "C" EXPORT_API int ambient_viewer_get_watch_surface(
 }
 
 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;
@@ -289,8 +277,7 @@ extern "C" EXPORT_API int ambient_viewer_get_top_app_surface(
 }
 
 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;
@@ -303,8 +290,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_cur_image(
 }
 
 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;
@@ -317,8 +303,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_is_watch(
 }
 
 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;
@@ -334,8 +319,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_app_id(
 }
 
 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;
@@ -351,8 +335,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_inst_id(
 }
 
 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;
@@ -362,4 +345,4 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_opr(
   *opr = surface->GetOpr();
 
   return AMBIENT_VIEWER_ERROR_NONE;
-}
\ No newline at end of file
+}
index 43c0ddde91ec9a43f7d25481783c16b80ef096f2..6d920cf20509142e7f37d4a4bbbfdd0e659fa7c6 100644 (file)
@@ -124,4 +124,4 @@ void WatchSurface::OnEvasChanged(const std::string& appId,
   listener_->OnUpdated(*this);
 }
 
-} // namespace ambient_viewer
+}  // namespace ambient_viewer
index 07dedb38dcfc522ca16b9bd1a51ae414a88b7e3a..094cd848a6c18bc63c8bfc9c3af3d75436b2f9fe 100644 (file)
@@ -56,7 +56,7 @@ namespace watch_holder {
     }
 
     tizen_base::Bundle b = tizen_base::Bundle(envelope, true, true);
-    std::string event_type= b.GetString("__APP_AMBIENT_EVENT__");
+    std::string event_type = b.GetString("__APP_AMBIENT_EVENT__");
     LOGI("event type (%s)", event_type.c_str());
     int type = stoi(event_type);
     std::string sender = b.GetString("__APP_AMBIENT_SENDER__");
@@ -99,4 +99,4 @@ namespace watch_holder {
     if (ambient_event_signal_conn_)
       aul_app_com_leave(ambient_event_signal_conn_);
   }
-}
+}  // namespace watch_holder
index 61c98c892309074d8fdbe1af1cafe565d234e2a7..d99a87bb2682fc5e07558db9ea47ff9cabd4cf22 100644 (file)
@@ -172,4 +172,4 @@ int Watch::NotifyChangedEvent() const {
   return 0;
 }
 
-}   // namspace watch_holder
+}  // namespace watch_holder
index 63e65128540a0e563f92b0fc1bd163a6b568f5df..0ef373bd6f1e568a08c4ebba8f8a399ed0985a92 100644 (file)
@@ -38,7 +38,7 @@ WatchHolder::~WatchHolder() {
     aul_app_com_leave(dead_signal_conn_);
   if (launch_signal_conn_)
     aul_app_com_leave(launch_signal_conn_);
-};
+}
 
 WatchHolder::WatchHolder(Evas_Object* win) : win_(win) {
   if (aul_app_com_create("watch.dead", nullptr,
@@ -85,11 +85,9 @@ int WatchHolder::Launch(
 }
 
 void WatchHolder::EnableRendering() {
-
 }
 
 void WatchHolder::DisableRendering(int timeout) {
-
 }
 
 const std::list<std::shared_ptr<Watch>>& WatchHolder::GetStack() const {
@@ -156,4 +154,4 @@ int WatchHolder::OnLaunchSignal(const char *endpoint,
   return 0;
 }
 
-}
+}  // namespace watch_holder
index 0c4df0b4fb9b2239700d5ed5fbe26ca751748302..d31b08736848bc3ae5c7b7f5c8d8fe059750b5a0 100644 (file)
@@ -121,4 +121,4 @@ void WatchMirror::OnRemoved(const Watch& watch) {
 void WatchMirror::OnBound(const Watch& watch) {
 }
 
-}
\ No newline at end of file
+}  // namespace watch_holder