other-licenses/7zstub/src/7zip/Archive/7z/7zMethodID.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 // 7zMethodID.h
     3 #ifndef __7Z_METHOD_ID_H
     4 #define __7Z_METHOD_ID_H
     6 #include "../../../Common/String.h"
     7 #include "../../../Common/Types.h"
     9 namespace NArchive {
    10 namespace N7z {
    12 const int kMethodIDSize = 15;
    14 struct CMethodID
    15 {
    16   Byte ID[kMethodIDSize];
    17   Byte IDSize;
    18   UString ConvertToString() const;
    19   bool ConvertFromString(const UString &srcString);
    20 };
    22 bool operator==(const CMethodID &a1, const CMethodID &a2);
    24 inline bool operator!=(const CMethodID &a1, const CMethodID &a2)
    25   { return !(a1 == a2); }
    27 }}
    29 #endif

mercurial