]> git.cworth.org Git - apitrace/blobdiff - trace_file.cpp
Make sure that the size of the compressed length is constant.
[apitrace] / trace_file.cpp
index 758ecd78c264d6e218b001473489394607da4b8f..c7227c68c84a27ef68f1b3a4fd264234376627cf 100644 (file)
@@ -25,75 +25,11 @@ File::File(const std::string &filename,
     }
 }
 
-
 File::~File()
 {
     close();
 }
 
-bool File::isOpened() const
-{
-    return m_isOpened;
-}
-
-File::Mode File::mode() const
-{
-    return m_mode;
-}
-
-std::string File::filename() const
-{
-    return m_filename;
-}
-
-bool File::open(const std::string &filename, File::Mode mode)
-{
-    if (m_isOpened) {
-        close();
-    }
-    m_isOpened = rawOpen(filename, mode);
-    m_mode = mode;
-
-    return m_isOpened;
-}
-
-bool File::write(const void *buffer, int length)
-{
-    if (!m_isOpened || m_mode != File::Write) {
-        return false;
-    }
-    return rawWrite(buffer, length);
-}
-
-bool File::read(void *buffer, int length)
-{
-    if (!m_isOpened || m_mode != File::Read) {
-        return false;
-    }
-    return rawRead(buffer, length);
-}
-
-void File::close()
-{
-    if (m_isOpened) {
-        rawClose();
-        m_isOpened = false;
-    }
-}
-
-void File::flush(FlushType type)
-{
-    rawFlush(type);
-}
-
-int File::getc()
-{
-    if (!m_isOpened || m_mode != File::Read) {
-        return 0;
-    }
-    return rawGetc();
-}
-
 bool File::isZLibCompressed(const std::string &filename)
 {
     std::fstream stream(filename.c_str(),