X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futil.hpp;h=418e7e4185089e9521e844f3657d3837735f1707;hb=4ba2fdbfb065c971f4a0b9b1dbab8957e7fba38d;hp=515f840f514bef944db9f6e874e663582cde2b32;hpb=58da0c77b98af1b771e4af28b42d0a3ddec09877;p=apps%2Fagl-service-windowmanager.git diff --git a/src/util.hpp b/src/util.hpp index 515f840..418e7e4 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -24,11 +24,11 @@ #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_ERROR(args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__,"wm",args, ##__VA_ARGS__) +#define HMI_WARNING(args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__) +#define HMI_NOTICE(args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__) +#define HMI_INFO(args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, "wm", args,##__VA_ARGS__) +#define HMI_DEBUG(args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, "wm", 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__) @@ -52,26 +52,6 @@ void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const in 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 - */ -struct unique_fd -{ - int fd{-1}; - unique_fd() = default; - explicit unique_fd(int f) : fd{f} {} - operator int() const { return fd; } - ~unique_fd(); - unique_fd(unique_fd const &) = delete; - unique_fd &operator=(unique_fd const &) = delete; - unique_fd(unique_fd &&o) : fd(o.fd) { o.fd = -1; } - unique_fd &operator=(unique_fd &&o) - { - std::swap(this->fd, o.fd); - return *this; - } -}; - class rectangle { public: