tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mozHunspellRLBoxSandbox.h (1174B)


      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 mozHunspellRLBoxSandbox_h
      8 #define mozHunspellRLBoxSandbox_h
      9 
     10 #include <string>
     11 #include <stdint.h>
     12 
     13 // Note: This class name and lack of namespacing terrible, but are necessary
     14 // for Hunspell compatibility.
     15 class FileMgr final {
     16 public:
     17  /**
     18   * aFilename must be a local file/jar URI for the file to load.
     19   *
     20   * aKey is the decription key for encrypted Hunzip files, and is
     21   * unsupported. The argument is there solely for compatibility.
     22   */
     23  explicit FileMgr(const char* aFilename, const char* aKey = nullptr);
     24  ~FileMgr();
     25 
     26  // Note: The nonstandard naming conventions of these methods are necessary for
     27  // Hunspell compatibility.
     28  bool getline(std::string& aLine);
     29  int getlinenum() const;
     30 
     31 private:
     32  // opaque file descriptor got from the host application
     33  uint32_t mFd;
     34 };
     35 
     36 #endif  // mozHunspellRLBoxSandbox_h