]> git.notmuchmail.org Git - apitrace/blobdiff - log.hpp
Don't link libiberty on MinGW.
[apitrace] / log.hpp
diff --git a/log.hpp b/log.hpp
index a36dbe49f963ede37f28bee91c4a062883ae106d..c44920f98f242b2c3f4d968b4600ebdf63ad05ec 100644 (file)
--- a/log.hpp
+++ b/log.hpp
@@ -1,6 +1,6 @@
 /****************************************************************************
  *
- * Copyright 2008 Jose Fonseca
+ * Copyright 2008 Tungsten Graphics, Inc.
  *
  * This program is free software: you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
 #ifndef _LOG_HPP_
 #define _LOG_HPP_
 
-#include <windows.h>
-#include <tchar.h>
-#include <stdio.h>
+namespace Log {
 
-
-class File
-{
-public:
-    File(const TCHAR *szName, const TCHAR *szExtension);
-    ~File();
-
-    void Open(const TCHAR *szName, const TCHAR *szExtension);
+    void Open(const char *name);
     void ReOpen(void);
     void Close(void);
-    void Write(const char *szText);
-    
-private:
-    HANDLE m_hFile;
-    TCHAR szFileName[MAX_PATH];
-};
-
-
-class Log : public File
-{
-public:
-    Log(const TCHAR *szName);
-    ~Log();
     
-    void NewLine(void);
-    void Tag(const char *name);
-    void BeginTag(const char *name);
-    void BeginTag(const char *name, 
-                  const char *attr1, const char *value1);
-    void BeginTag(const char *name, 
-                  const char *attr1, const char *value1,
-                  const char *attr2, const char *value2);
-    void EndTag(const char *name);
     void Text(const char *text);
     void TextF(const char *format, ...);
+    
     void BeginCall(const char *function);
     void EndCall(void);
-    void BeginParam(const char *name, const char *type);
-    void EndParam(void);
+    
+    void BeginArg(const char *type, const char *name);
+    void EndArg(void);
+
     void BeginReturn(const char *type);
     void EndReturn(void);
-    
-protected:
-    void Escape(const char *s);
-};
 
+    void BeginElement(const char *type);
+    void BeginElement(const char *type, const char *name);
+    void EndElement(void);
 
-extern Log * g_pLog;
+    void BeginReference(const char *type, const void *addr);
+    void EndReference(void);
 
+    void DumpString(const char *str);
+    void DumpWString(const wchar_t *str);
+    
+}
 
 #endif /* _LOG_HPP_ */