Remove hmi-debug.h
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Wed, 22 Aug 2018 04:20:17 +0000 (13:20 +0900)
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>
Wed, 22 Aug 2018 04:20:17 +0000 (13:20 +0900)
To reduce warning message,
integrates hmi-debug into util.

Change-Id: Ibb83db196be8c0d6ff0a8d503978b3bef7b1e870
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
14 files changed:
include/hmi-debug.h [deleted file]
policy_manager/policy_manager.cpp
src/applist.cpp
src/json_helper.cpp
src/layers.cpp
src/main.cpp
src/pm_wrapper.cpp
src/util.cpp
src/util.hpp
src/wayland_ivi_wm.cpp
src/window_manager.cpp
src/window_manager.hpp
src/wm_client.cpp
src/wm_layer.cpp

diff --git a/include/hmi-debug.h b/include/hmi-debug.h
deleted file mode 100644 (file)
index 697ac80..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __HMI_DEBUG_H__
-#define __HMI_DEBUG_H__
-
-#include <time.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-
-enum LOG_LEVEL{
-    LOG_LEVEL_NONE = 0,
-    LOG_LEVEL_ERROR,
-    LOG_LEVEL_WARNING,
-    LOG_LEVEL_NOTICE,
-    LOG_LEVEL_INFO,
-    LOG_LEVEL_DEBUG,
-    LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
-};
-
-#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
-
-#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
-#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
-#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
-#define HMI_INFO(prefix, args,...)  _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
-#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
-
-#define HMI_SEQ_ERROR(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
-#define HMI_SEQ_WARNING(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
-#define HMI_SEQ_NOTICE(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
-#define HMI_SEQ_INFO(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
-#define HMI_SEQ_DEBUG(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
-
-#define DUMP(args, ...) _DUMP(LOG_LEVEL_DEBUG, args, ##__VA_ARGS__)
-
-static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
-
-static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
-{
-    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
-    if(log_level < level)
-    {
-        return;
-    }
-
-    char *message;
-    struct timespec tp;
-    unsigned int time;
-
-    clock_gettime(CLOCK_REALTIME, &tp);
-    time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
-
-    va_list args;
-    va_start(args, log);
-    if (log == NULL || vasprintf(&message, log, args) < 0)
-        message = NULL;
-    fprintf(stderr,  "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
-    va_end(args);
-    free(message);
-}
-
-static void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...){
-    const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
-    if(log_level < level)
-    {
-        return;
-    }
-
-    char *message;
-    struct timespec tp;
-    unsigned int time;
-
-    clock_gettime(CLOCK_REALTIME, &tp);
-       time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
-
-       va_list args;
-       va_start(args, log);
-       if (log == NULL || vasprintf(&message, log, args) < 0)
-        message = NULL;
-    fprintf(stderr,  "[%10.3f] [wm %s] [%s, %s(), Line:%d] >>> req %d: %s \n", time / 1000.0, ERROR_FLAG[level], file, func, line, seq_num, message);
-    va_end(args);
-       free(message);
-}
-
-static void _DUMP(enum LOG_LEVEL level, const char *log, ...)
-{
-    const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR : atoi(getenv("USE_HMI_DEBUG"));
-    if (log_level < level)
-    {
-        return;
-    }
-    char *message;
-    va_list args;
-    va_start(args, log);
-    if (log == NULL || vasprintf(&message, log, args) < 0)
-        message = NULL;
-    fprintf(stderr, "%s \n", message);
-    va_end(args);
-    free(message);
-}
-#endif  //__HMI_DEBUG_H__
\ No newline at end of file
index a482e0c..0d872f9 100644 (file)
@@ -22,7 +22,7 @@
 #include <algorithm>
 #include <json-c/json.h>
 #include "policy_manager.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 extern "C"
 {
index fe9832f..0267eb7 100644 (file)
@@ -16,7 +16,7 @@
 #include <iostream>
 #include <algorithm>
 #include "applist.hpp"
-#include "../include/hmi-debug.h"
+#include "util.hpp"
 
 using std::shared_ptr;
 using std::string;
index b97f21d..836e9e7 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "json_helper.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 #include <json.h>
 
index bbe7c09..db1588b 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "layers.hpp"
 #include "json_helper.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 namespace wm
 {
index 5990e99..7677f14 100644 (file)
@@ -61,7 +61,7 @@ int afb_instance::init()
 int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
                            void * /*data*/)
 {
-    ST();
+    ;
 
     if ((events & EPOLLHUP) != 0)
     {
@@ -74,19 +74,14 @@ int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
     if ((events & EPOLLIN) != 0u)
     {
         {
-            STN(display_read_events);
             g_afb_instance->wmgr.display->read_events();
             g_afb_instance->wmgr.set_pending_events();
         }
         {
             // We want do dispatch pending wayland events from within
             // the API context
-            STN(winman_ping_api_call);
             afb_service_call("windowmanager", "ping", json_object_new_object(),
-                            [](void *c, int st, json_object *j) {
-                                STN(winman_ping_api_call_return);
-                            },
-                            nullptr);
+                            [](void *c, int st, json_object *j) {}, nullptr);
         }
     }
 
@@ -212,9 +207,7 @@ static void createSecurityContext(afb_req req, const char* appid, const char* ro
 void windowmanager_requestsurface(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -253,9 +246,7 @@ void windowmanager_requestsurface(afb_req req) noexcept
 void windowmanager_requestsurfacexdg(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -353,9 +344,7 @@ void windowmanager_setrole(afb_req req) noexcept
 void windowmanager_activatewindow(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -402,9 +391,7 @@ void windowmanager_activatewindow(afb_req req) noexcept
 void windowmanager_deactivatewindow(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -443,9 +430,7 @@ void windowmanager_deactivatewindow(afb_req req) noexcept
 void windowmanager_enddraw(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -476,9 +461,7 @@ void windowmanager_enddraw(afb_req req) noexcept
 void windowmanager_getdisplayinfo_thunk(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -506,9 +489,7 @@ void windowmanager_getdisplayinfo_thunk(afb_req req) noexcept
 void windowmanager_getareainfo_thunk(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -546,9 +527,7 @@ void windowmanager_getareainfo_thunk(afb_req req) noexcept
 void windowmanager_wm_subscribe(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -585,9 +564,7 @@ void windowmanager_wm_subscribe(afb_req req) noexcept
 void windowmanager_list_drawing_names(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -617,9 +594,7 @@ void windowmanager_list_drawing_names(afb_req req) noexcept
 void windowmanager_ping(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -643,9 +618,7 @@ void windowmanager_ping(afb_req req) noexcept
 void windowmanager_debug_status(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -672,9 +645,7 @@ void windowmanager_debug_status(afb_req req) noexcept
 void windowmanager_debug_layers(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -697,9 +668,7 @@ void windowmanager_debug_layers(afb_req req) noexcept
 void windowmanager_debug_surfaces(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -728,9 +697,7 @@ void windowmanager_debug_surfaces(afb_req req) noexcept
 void windowmanager_debug_terminate(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
-    ST();
-#endif
+
     if (g_afb_instance == nullptr)
     {
         afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
index 1454bf9..69b6a16 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "pm_wrapper.hpp"
 #include "json_helper.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 namespace wm
 {
index 672b089..be1a046 100644 (file)
 
 #include "util.hpp"
 
-#include <cerrno>
-#include <cstdarg>
-#include <cstdio>
-#include <cstdlib>
-#include <ctime>
+#include <time.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
 
 #include <unistd.h>
 
-#ifdef SCOPE_TRACING
-thread_local int ScopeTrace::indent = 0;
-ScopeTrace::ScopeTrace(char const *func) : f(func)
-{
-    fprintf(stderr, "%lu %*s%s -->\n", pthread_self(), 2 * indent++, "", this->f);
-}
-ScopeTrace::~ScopeTrace() { fprintf(stderr, "%lu %*s%s <--\n", pthread_self(), 2 * --indent, "", this->f); }
-#endif
+static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"};
 
 unique_fd::~unique_fd()
 {
@@ -93,3 +85,66 @@ void rectangle::set_aspect(double ratio)
     }
 }
 
+void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
+{
+    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+    if(log_level < level)
+    {
+        return;
+    }
+
+    char *message;
+    struct timespec tp;
+    unsigned int time;
+
+    clock_gettime(CLOCK_REALTIME, &tp);
+    time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+    va_list args;
+    va_start(args, log);
+    if (log == NULL || vasprintf(&message, log, args) < 0)
+        message = NULL;
+    fprintf(stderr,  "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message);
+    va_end(args);
+    free(message);
+}
+
+void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...){
+    const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
+    if(log_level < level)
+    {
+        return;
+    }
+
+    char *message;
+    struct timespec tp;
+    unsigned int time;
+
+    clock_gettime(CLOCK_REALTIME, &tp);
+       time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
+
+       va_list args;
+       va_start(args, log);
+       if (log == NULL || vasprintf(&message, log, args) < 0)
+        message = NULL;
+    fprintf(stderr,  "[%10.3f] [wm %s] [%s, %s(), Line:%d] >>> req %d: %s \n", time / 1000.0, ERROR_FLAG[level], file, func, line, seq_num, message);
+    va_end(args);
+       free(message);
+}
+
+void _DUMP(enum LOG_LEVEL level, const char *log, ...)
+{
+    const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR : atoi(getenv("USE_HMI_DEBUG"));
+    if (log_level < level)
+    {
+        return;
+    }
+    char *message;
+    va_list args;
+    va_start(args, log);
+    if (log == NULL || vasprintf(&message, log, args) < 0)
+        message = NULL;
+    fprintf(stderr, "%s \n", message);
+    va_end(args);
+    free(message);
+}
\ No newline at end of file
index 2f17845..515f840 100644 (file)
 
 #include <functional>
 #include <thread>
-#include <vector>
-
 #include <sys/poll.h>
-
-#ifndef DO_NOT_USE_AFB
-extern "C"
-{
-#include <afb/afb-binding.h>
+#include <string.h>
+
+#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+
+#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__)
+#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_INFO(prefix, args,...)  _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__)
+
+#define HMI_SEQ_ERROR(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_WARNING(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_NOTICE(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_INFO(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+#define HMI_SEQ_DEBUG(seq_num, args,...) _HMI_SEQ_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__, __LINE__, seq_num, args, ##__VA_ARGS__)
+
+#define DUMP(args, ...) _DUMP(LOG_LEVEL_DEBUG, args, ##__VA_ARGS__)
+
+enum LOG_LEVEL{
+    LOG_LEVEL_NONE = 0,
+    LOG_LEVEL_ERROR,
+    LOG_LEVEL_WARNING,
+    LOG_LEVEL_NOTICE,
+    LOG_LEVEL_INFO,
+    LOG_LEVEL_DEBUG,
+    LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
 };
-#endif
-
-#define CONCAT_(X, Y) X##Y
-#define CONCAT(X, Y) CONCAT_(X, Y)
-
-#ifdef __GNUC__
-#define ATTR_FORMAT(stringindex, firsttocheck) \
-    __attribute__((format(printf, stringindex, firsttocheck)))
-#define ATTR_NORETURN __attribute__((noreturn))
-#else
-#define ATTR_FORMAT(stringindex, firsttocheck)
-#define ATTR_NORETURN
-#endif
-
-#ifdef AFB_BINDING_VERSION
-#define lognotice(...) AFB_NOTICE(__VA_ARGS__)
-#define logerror(...) AFB_ERROR(__VA_ARGS__)
-#define fatal(...)              \
-    do                          \
-    {                           \
-        AFB_ERROR(__VA_ARGS__); \
-        abort();                \
-    } while (0)
-#else
-#define lognotice(...)
-#define logerror(...)
-#define fatal(...) \
-    do             \
-    {              \
-        abort();   \
-    } while (0)
-#endif
-
-#ifdef DEBUG_OUTPUT
-#ifdef AFB_BINDING_VERSION
-#define logdebug(...) AFB_DEBUG(__VA_ARGS__)
-#else
-#define logdebug(...)
-#endif
-#else
-#define logdebug(...)
-#endif
-
-#ifndef SCOPE_TRACING
-#define ST()
-#define STN(N)
-#else
-#define ST() \
-    ScopeTrace __attribute__((unused)) CONCAT(trace_scope_, __LINE__)(__func__)
-#define STN(N) \
-    ScopeTrace __attribute__((unused)) CONCAT(named_trace_scope_, __LINE__)(#N)
-
-struct ScopeTrace
-{
-    thread_local static int indent;
-    char const *f{};
-    explicit ScopeTrace(char const *func);
-    ~ScopeTrace();
-};
-#endif
+
+void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...);
+void _HMI_SEQ_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, unsigned seq_num, const char* log, ...);
+void _DUMP(enum LOG_LEVEL level, const char *log, ...);
 
 /**
  * @struct unique_fd
index 48d7bb4..fde16b3 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "wayland_ivi_wm.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 /**
  * namespace wl
@@ -41,10 +41,9 @@ int display::dispatch_pending() { return wl_display_dispatch_pending(this->d.get
 
 int display::read_events()
 {
-    ST();
+    ;
     while (wl_display_prepare_read(this->d.get()) == -1)
     {
-        STN(pending_events_dispatch);
         if (wl_display_dispatch_pending(this->d.get()) == -1)
         {
             return -1;
index 22f411a..8f3236f 100644 (file)
@@ -307,7 +307,7 @@ result<int> WindowManager::api_request_surface(char const *appid, char const *dr
 char const *WindowManager::api_request_surface(char const *appid, char const *drawing_name,
                                      char const *ivi_id)
 {
-    ST();
+    ;
 
     // TODO: application requests by old role,
     //       so convert role old to new
@@ -450,7 +450,7 @@ bool WindowManager::api_set_role(char const *appid, char const *drawing_name, un
 void WindowManager::api_activate_surface(char const *appid, char const *drawing_name,
                                char const *drawing_area, const reply_func &reply)
 {
-    ST();
+    ;
 
     // TODO: application requests by old role,
     //       so convert role old to new
@@ -514,7 +514,7 @@ void WindowManager::api_activate_surface(char const *appid, char const *drawing_
 void WindowManager::api_deactivate_surface(char const *appid, char const *drawing_name,
                                  const reply_func &reply)
 {
-    ST();
+    ;
 
     // TODO: application requests by old role,
     //       so convert role old to new
index 3088111..bd9d134 100644 (file)
 #include "layout.hpp"
 #include "wayland_ivi_wm.hpp"
 #include "pm_wrapper.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 #include "request.hpp"
 #include "wm_error.hpp"
 #include "wm_layer_control.hpp"
 
 struct json_object;
-
+struct afb_event;
 namespace wl
 {
 struct display;
index 47d0c2d..757d691 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <json-c/json.h>
 #include "wm_client.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 #define INVALID_SURFACE_ID 0
 
index 87fff49..7b67042 100644 (file)
@@ -19,7 +19,7 @@
 #include "wm_layer.hpp"
 #include "wayland_ivi_wm.hpp"
 #include "json_helper.hpp"
-#include "hmi-debug.h"
+#include "util.hpp"
 
 using std::string;
 using std::vector;