LCOV - code coverage report
Current view: top level - xpcom/base - nsGZFileWriter.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef nsGZFileWriter_h
       8             : #define nsGZFileWriter_h
       9             : 
      10             : #include "nsIGZFileWriter.h"
      11             : #include "zlib.h"
      12             : 
      13             : /**
      14             :  * A simple class for writing .gz files.
      15             :  */
      16             : class nsGZFileWriter final : public nsIGZFileWriter
      17             : {
      18             :   virtual ~nsGZFileWriter();
      19             : 
      20             : public:
      21             : 
      22             :   enum Operation {
      23             :     Append,
      24             :     Create
      25             :   };
      26             : 
      27             : 
      28             :   explicit nsGZFileWriter(Operation aMode = Create);
      29             : 
      30             :   NS_DECL_ISUPPORTS
      31             :   NS_DECL_NSIGZFILEWRITER
      32             : 
      33             :   /**
      34             :    * nsIGZFileWriter exposes two non-virtual overloads of Write().  We
      35             :    * duplicate them here so that you can call these overloads on a pointer to
      36             :    * the concrete nsGZFileWriter class.
      37             :    */
      38           0 :   MOZ_MUST_USE nsresult Write(const char* aStr)
      39             :   {
      40           0 :     return nsIGZFileWriter::Write(aStr);
      41             :   }
      42             : 
      43             :   MOZ_MUST_USE nsresult Write(const char* aStr, uint32_t aLen)
      44             :   {
      45             :     return nsIGZFileWriter::Write(aStr, aLen);
      46             :   }
      47             : 
      48             : private:
      49             :   Operation mMode;
      50             :   bool mInitialized;
      51             :   bool mFinished;
      52             :   gzFile mGZFile;
      53             : };
      54             : 
      55             : #endif

Generated by: LCOV version 1.13