summaryrefslogtreecommitdiff
path: root/source/utilities/Logger.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/utilities/Logger.h')
-rw-r--r--source/utilities/Logger.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/utilities/Logger.h b/source/utilities/Logger.h
new file mode 100644
index 0000000..2388bb4
--- /dev/null
+++ b/source/utilities/Logger.h
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (C) ST-Ericsson SA 2011
+ * License terms: 3-clause BSD license
+ ******************************************************************************/
+
+#ifndef _LOGGER_H_
+#define _LOGGER_H_
+
+#include "t_basicdefinitions.h"
+#ifdef _WIN32
+#include "WinApiWrappers.h"
+#else
+#include "LinuxApiWrappers.h"
+#endif
+
+typedef void (*MessageCallback_t)(const void *Communication_p, uint32 MessageLength, const char *MessageText);
+
+class Logger
+{
+public:
+ Logger(const void *communication);
+
+ void log(const char *format, ...);
+ void setMessageCallback(MessageCallback_t messageCallback) {
+ messageCallback_ = messageCallback;
+ }
+private:
+ CCriticalSectionObject criticalSection_;
+ const void *communication_;
+ MessageCallback_t messageCallback_;
+};
+
+#endif // _LOGGER_H_ \ No newline at end of file