]> git.cworth.org Git - apitrace/blobdiff - common/trace_file.hpp
Lower case namespaces.
[apitrace] / common / trace_file.hpp
index 4b1b70ddad6f6bd886ac7aa51c28f5604b281faf..627659b7f5ee7c866cf39cf5199d3cb4c5e132ae 100644 (file)
@@ -31,7 +31,7 @@
 #include <fstream>
 #include <stdint.h>
 
-namespace Trace {
+namespace trace {
 
 class File {
 public:
@@ -51,6 +51,8 @@ public:
 public:
     static bool isZLibCompressed(const std::string &filename);
     static bool isSnappyCompressed(const std::string &filename);
+    static File *createZLib(void);
+    static File *createSnappy(void);
 public:
     File(const std::string &filename = std::string(),
          File::Mode mode = File::Read);
@@ -162,28 +164,6 @@ inline bool File::skip(size_t length)
     return rawSkip(length);
 }
 
-class ZLibFile : public File {
-public:
-    ZLibFile(const std::string &filename = std::string(),
-             File::Mode mode = File::Read);
-    virtual ~ZLibFile();
-
-
-    virtual bool supportsOffsets() const;
-    virtual File::Offset currentOffset();
-protected:
-    virtual bool rawOpen(const std::string &filename, File::Mode mode);
-    virtual bool rawWrite(const void *buffer, size_t length);
-    virtual bool rawRead(void *buffer, size_t length);
-    virtual int rawGetc();
-    virtual void rawClose();
-    virtual void rawFlush();
-    virtual bool rawSkip(size_t length);
-    virtual int  rawPercentRead();
-private:
-    void *m_gzFile;
-    double m_endOffset;
-};
 
 inline bool
 operator<(const File::Offset &one, const File::Offset &two)