]> git.cworth.org Git - apitrace/blobdiff - log.hpp
First stab at binary trace and retracing.
[apitrace] / log.hpp
diff --git a/log.hpp b/log.hpp
index c44920f98f242b2c3f4d968b4600ebdf63ad05ec..fa1f91e2b7a08afca932bd28f60a7aada064724e 100644 (file)
--- a/log.hpp
+++ b/log.hpp
@@ -1,21 +1,27 @@
-/****************************************************************************
+/**************************************************************************
  *
- * Copyright 2008 Tungsten Graphics, Inc.
+ * Copyright 2007-2010 VMware, Inc.
+ * All Rights Reserved.
  *
- * 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
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
  *
- ****************************************************************************/
+ **************************************************************************/
 
 #ifndef _LOG_HPP_
 #define _LOG_HPP_
 namespace Log {
 
     void Open(const char *name);
-    void ReOpen(void);
     void Close(void);
     
-    void Text(const char *text);
-    void TextF(const char *format, ...);
-    
     void BeginCall(const char *function);
     void EndCall(void);
     
@@ -38,16 +40,34 @@ namespace Log {
     void BeginReturn(const char *type);
     void EndReturn(void);
 
+    void BeginArray(const char *type, size_t length);
+    void EndArray(void);
+
     void BeginElement(const char *type);
-    void BeginElement(const char *type, const char *name);
     void EndElement(void);
 
-    void BeginReference(const char *type, const void *addr);
-    void EndReference(void);
+    void BeginStruct(const char *type);
+    void EndStruct(void);
 
-    void DumpString(const char *str);
-    void DumpWString(const wchar_t *str);
-    
+    void BeginMember(const char *type, const char *name);
+    void EndMember(void);
+
+    void BeginBitmask(const char *type);
+    void EndBitmask(void);
+
+    void BeginPointer(const char *type, const void *addr);
+    void EndPointer(void);
+
+    void LiteralBool(bool value);
+    void LiteralSInt(signed long long value);
+    void LiteralUInt(unsigned long long value);
+    void LiteralFloat(float value);
+    void LiteralFloat(double value);
+    void LiteralString(const char *str);
+    void LiteralWString(const wchar_t *str);
+    void LiteralNamedConstant(const char *name, long long value);
+    void LiteralNull(void);
+    void LiteralOpaque(void);
 }
 
 #endif /* _LOG_HPP_ */