OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_ZIP_INTERNAL_H_ | 5 #ifndef CHROME_COMMON_ZIP_INTERNAL_H_ |
6 #define CHROME_COMMON_ZIP_INTERNAL_H_ | 6 #define CHROME_COMMON_ZIP_INTERNAL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "third_party/zlib/contrib/minizip/unzip.h" | 11 #include "third_party/zlib/contrib/minizip/unzip.h" |
12 #include "third_party/zlib/contrib/minizip/zip.h" | 12 #include "third_party/zlib/contrib/minizip/zip.h" |
13 | 13 |
14 // Utility functions and constants used internally for the zip file | 14 // Utility functions and constants used internally for the zip file |
15 // library in the directory. Don't use them outside of the library. | 15 // library in the directory. Don't use them outside of the library. |
16 namespace zip { | 16 namespace zip { |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 // Opens the given file name in UTF-8 for unzipping, with some setup for | 19 // Opens the given file name in UTF-8 for unzipping, with some setup for |
20 // Windows. | 20 // Windows. |
21 unzFile OpenForUnzipping(const std::string& file_name_utf8); | 21 unzFile OpenForUnzipping(const std::string& file_name_utf8); |
22 | 22 |
| 23 #if defined(OS_POSIX) |
| 24 // Opens the file referred to by |zip_fd| for unzipping. |
| 25 unzFile OpenFdForUnzipping(int zip_fd); |
| 26 #endif |
| 27 |
23 // Opens the given file name in UTF-8 for zipping, with some setup for | 28 // Opens the given file name in UTF-8 for zipping, with some setup for |
24 // Windows. |append_flag| will be passed to zipOpen2(). | 29 // Windows. |append_flag| will be passed to zipOpen2(). |
25 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag); | 30 zipFile OpenForZipping(const std::string& file_name_utf8, int append_flag); |
26 | 31 |
27 const int kZipMaxPath = 256; | 32 const int kZipMaxPath = 256; |
28 const int kZipBufSize = 8192; | 33 const int kZipBufSize = 8192; |
29 | 34 |
30 } // namespace internal | 35 } // namespace internal |
31 } // namespace zip | 36 } // namespace zip |
32 | 37 |
33 #endif // CHROME_COMMON_ZIP_INTERNAL_H_ | 38 #endif // CHROME_COMMON_ZIP_INTERNAL_H_ |
OLD | NEW |