OLD | NEW |
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2013 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 | 5 |
6 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ | 6 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
7 #define LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ | 7 #define LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "nacl_io/error.h" | 13 #include "nacl_io/error.h" |
14 #include "nacl_io/mount_node.h" | 14 #include "nacl_io/mount_node.h" |
15 #include "nacl_io/pepper_interface.h" | 15 #include "nacl_io/pepper_interface.h" |
16 | 16 |
| 17 namespace nacl_io { |
| 18 |
17 typedef std::map<std::string, std::string> StringMap_t; | 19 typedef std::map<std::string, std::string> StringMap_t; |
18 | 20 |
19 class MountNodeHttp : public MountNode { | 21 class MountNodeHttp : public MountNode { |
20 public: | 22 public: |
21 virtual Error FSync(); | 23 virtual Error FSync(); |
22 virtual Error GetDents(size_t offs, | 24 virtual Error GetDents(size_t offs, |
23 struct dirent* pdir, | 25 struct dirent* pdir, |
24 size_t count, | 26 size_t count, |
25 int* out_bytes); | 27 int* out_bytes); |
26 virtual Error GetStat(struct stat* stat); | 28 virtual Error GetStat(struct stat* stat); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 std::string url_; | 62 std::string url_; |
61 std::vector<char> buffer_; | 63 std::vector<char> buffer_; |
62 | 64 |
63 bool cache_content_; | 65 bool cache_content_; |
64 bool has_cached_size_; | 66 bool has_cached_size_; |
65 std::vector<char> cached_data_; | 67 std::vector<char> cached_data_; |
66 | 68 |
67 friend class MountHttp; | 69 friend class MountHttp; |
68 }; | 70 }; |
69 | 71 |
| 72 } // namespace nacl_io |
| 73 |
70 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ | 74 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_HTTP_H_ |
OLD | NEW |