Check coding sytle 06/209906/1
authormk5004.lee <mk5004.lee@samsung.com>
Fri, 12 Jul 2019 08:07:08 +0000 (17:07 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Fri, 12 Jul 2019 08:07:08 +0000 (17:07 +0900)
Change-Id: Idf60dbc13dc37dd35c15d44baa71520a5fd56126
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
13 files changed:
watchface-common/watchface-common-internal.h
watchface-common/watchface-util.cc
watchface-complication-provider/complication-provider-event-interface.h
watchface-complication-provider/complication-provider.cc
watchface-complication/complication-connector.cc
watchface-complication/complication-event-interface.h
watchface-complication/complication.cc
watchface-complication/db-manager.cc
watchface-complication/gdbus.h
watchface-complication/package-manager-interface.h
watchface-complication/package-manager.h
watchface-complication/watchface-complication.cc
watchface-editor/editables-editor.cc

index c7e358d..019b932 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__
-#define __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__
+#ifndef WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
+#define WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
 
 #include <tizen.h>
 
@@ -60,4 +60,4 @@ typedef enum _editor_error_e {
 }
 #endif
 
-#endif  /* __TIZEN_APPFW_WATCHFACE_COMMON_INTERNAL_H__ */
+#endif  // WATCHFACE_COMMON_WATCHFACE_COMMON_INTERNAL_H_
index 362f52f..15a0b1b 100644 (file)
@@ -415,7 +415,7 @@ out:
     int type = GetDataType(shared_data);
     bool is_valid = true;
 
-    switch(type) {
+    switch (type) {
       case WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT : {
         if (shared_data.GetString(SHORT_TEXT_KEY).empty())
           is_valid = false;
@@ -473,7 +473,7 @@ out:
 
   int ConvertPathToAppPath(const char* appid, bundle* data) {
     list<string> key_list {ICON_KEY, IMAGE_KEY};
-    for(auto& i : key_list) {
+    for (auto& i : key_list) {
       char* path;
       int ret = bundle_get_str(data, i.c_str(), &path);
       if (ret != BUNDLE_ERROR_NONE)
index 8c66a53..310b470 100644 (file)
 #ifndef WATCHFACE_COMPLICATION_PROVIDER_COMPLICATION_PROVIDER_EVENT_INTERFACE_H_
 #define WATCHFACE_COMPLICATION_PROVIDER_COMPLICATION_PROVIDER_EVENT_INTERFACE_H_
 
-#include <string>
 #include <bundle_cpp.h>
 
+#include <string>
+
 #include "watchface-complication/include/watchface-complication-internal.h"
 
 namespace watchface_complication {
index f7b65ac..f884bd3 100644 (file)
@@ -92,7 +92,8 @@ ComplicationProvider::Impl::SenderInfo::SenderInfo(
     const std::string& sender_name, const char* sender_app_id,
     int watcher_id, std::string watch_name)
   : sender_name_(sender_name), sender_app_id_(sender_app_id),
-    watcher_id_(watcher_id), watch_name_(watch_name), privilege_result_(COMPLICATION_CYNARA_UNKNOWN) {
+    watcher_id_(watcher_id), watch_name_(watch_name),
+    privilege_result_(COMPLICATION_CYNARA_UNKNOWN) {
 }
 
 int ComplicationProvider::Impl::SenderInfo::CheckPrivilege(
@@ -180,7 +181,6 @@ void ComplicationProvider::Impl::OnAppear(const std::string& name,
 
 ComplicationProvider::Impl::SenderInfo* ComplicationProvider::Impl::GetSenderInfo(
       std::string sender_name, GDBusConnection* connection, GVariant* parameters) {
-
   auto iter = sender_info_.find(sender_name);
   if (iter != sender_info_.end())
     return iter->second;
@@ -347,7 +347,8 @@ int ComplicationProvider::NotifyDataUpdate() {
   return ret;
 }
 
-bool ComplicationProvider::SetupReplyToEditor(std::string editor_appid, int editable_id, const char* raw) {
+bool ComplicationProvider::SetupReplyToEditor(std::string editor_appid,
+    int editable_id, const char* raw) {
   bool emit_signal_ret = false;
   try {
     emit_signal_ret = ComplicationConnector::GetInst().EmitSignal(
index f34c4da..24822d4 100644 (file)
@@ -21,6 +21,8 @@
 #include <package-manager.h>
 #include <pkgmgr-info.h>
 
+#include <list>
+
 #include "watchface-complication/complication-connector.h"
 #include "watchface-complication/complication-connector-implementation.h"
 #include "watchface-common/watchface-exception.h"
index 7868e05..4a4d7e5 100644 (file)
 #ifndef WATCHFACE_COMPLICATION_COMPLICATION_EVENT_INTERFACE_H_
 #define WATCHFACE_COMPLICATION_COMPLICATION_EVENT_INTERFACE_H_
 
-#include <string>
 #include <bundle_cpp.h>
 
+#include <string>
+
 #include "watchface-complication/include/watchface-complication-internal.h"
 
 namespace watchface_complication {
index d0320dd..2eb5eb5 100644 (file)
@@ -813,7 +813,6 @@ int Complication::TouchLaunch(watchface_complication_event_type_e event_type) {
 
     LOGI("Touch launch the %s : %d", provider_appid.c_str(), ret);
     return util::ConvertAulError(ret);
-
   } catch (const std::bad_alloc &ba) {
     LOGE("Exception bad_alloc");
     return WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY;
index 28b4e13..b679be3 100644 (file)
@@ -234,7 +234,7 @@ bool DBManager::IsProviderExist(std::string& provider_id, int support_type) {
   ::DBHelper db;
 
   if (!db.Open())
-    return false;;
+    return false;
 
   if (!db.Prepare(query))
     return false;
index 10d0dd8..0a8bd35 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <memory>
 #include <list>
+#include <string>
 
 #include "watchface-common/watchface-util.h"
 #include "watchface-complication/gdbus-interface.h"
@@ -36,7 +37,7 @@ class GDBus : public IGDBus {
       : conn_(conn) { }
 
   virtual ~GDBus() {
-    for(auto& id : subscribe_list_) {
+    for (auto& id : subscribe_list_) {
       g_dbus_connection_signal_unsubscribe(conn_, id);
     }
   }
@@ -110,7 +111,6 @@ class GDBus : public IGDBus {
 
   int SubscribeSignal(SigType type, std::string id,
       int sub_id, IGDBus::IGDBusEvent* listener) {
-
     LOGI("subscribe : %s, %d", id.c_str(), sub_id);
     std::string path = util::EncodeStr(
                   type == Complication ?
@@ -171,4 +171,4 @@ class GDBus : public IGDBus {
 
 }  // namespace watchface_complication
 
-#endif  // WATCHFACE_COMPLICATION_GDBUS_H_
\ No newline at end of file
+#endif  // WATCHFACE_COMPLICATION_GDBUS_H_
index c1ce353..c6041f8 100644 (file)
@@ -31,7 +31,6 @@ class IPackageManager {
   virtual void Watch(IPackageEvent* pe) = 0;
   virtual void UnWatch(IPackageEvent* pe) = 0;
   virtual bool CheckDisabled(const std::string& appid) = 0;
-
 };
 
 }  // namespace watchface_complication
index b926e61..7ba04cb 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <memory>
 #include <list>
+#include <string>
 
 namespace watchface_complication {
 
@@ -43,9 +44,8 @@ class PackageManager : public IPackageManager {
     return true;
   }
  private:
-
 };
 
 }  // namespace watchface_complication
 
-#endif  // WATCHFACE_COMPLICATION_PACKAGE_MANAGER_H_
\ No newline at end of file
+#endif  // WATCHFACE_COMPLICATION_PACKAGE_MANAGER_H_
index 25168e7..f20797b 100644 (file)
@@ -24,7 +24,6 @@
 #include <aul.h>
 #include <dlog.h>
 
-#include "watchface-common/watchface-util.h"
 #include "watchface-complication/include/watchface-complication.h"
 #include "watchface-complication/include/watchface-complication-internal.h"
 #include "watchface-complication/complication.h"
index 2752e27..21d325c 100644 (file)
@@ -18,6 +18,7 @@
 #include <unistd.h>
 #include <utility>
 #include <stdexcept>
+#include <vector>
 
 #include "watchface-editor/editables-editor.h"
 #include "watchface-editor/editables-editor-implementation.h"
@@ -162,8 +163,7 @@ int EditablesEditor::EditPreview(IEditable& ed, int cur_data_idx) {
     impl_->edit_appid_.c_str(),
     -1,
     util::GetCmdStr(util::CmdType::EditableEditPreview),
-    g_variant_new("(iis)", cur_data_idx, ed.GetEditableId(), ctx_str.c_str())
-  );
+    g_variant_new("(iis)", cur_data_idx, ed.GetEditableId(), ctx_str.c_str()));
 
   if (emit_result)
     return WATCHFACE_COMPLICATION_ERROR_NONE;