Fix invalid markdown
[apps/agl-service-windowmanager.git] / src / util.hpp
index 077f212..9540772 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ * Copyright (c) 2018 Konsulko Group
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +20,7 @@
 
 #include <functional>
 #include <thread>
+#include <unordered_map>
 #include <sys/poll.h>
 #include <string.h>
 
@@ -36,7 +38,7 @@
 #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__)
+#define DUMP(args, ...) _DUMP(LOG_LEVEL_INFO, args, ##__VA_ARGS__)
 
 enum LOG_LEVEL{
     LOG_LEVEL_NONE = 0,
@@ -117,4 +119,18 @@ class rectangle
     long _bottom;
 };
 
-#endif // !WM_UTIL_HPP
+// Configuration file path helper
+std::string get_file_path(const char *file_name, const char *root_path = NULL);
+
+typedef struct ChangeAreaReq {
+    std::string appname;
+    std::unordered_map<std::string, struct rect> area_req;
+    bool save;
+    std::unordered_map<std::string, std::string> update_app2area;
+    ChangeAreaReq() = default;
+    ~ChangeAreaReq() = default;
+    ChangeAreaReq(const ChangeAreaReq& val) = default;
+    void dump();
+} ChangeAreaReq;
+
+#endif // WM_UTIL_HPP