summaryrefslogtreecommitdiffstats
path: root/net/base/file_stream.cc
blob: df18ad098b3a8318dac45624ae7ab328d5624527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/base/file_stream.h"

namespace net {

FileStream::FileStream(net::NetLog* net_log)
    : impl_(net_log) {
}

FileStream::FileStream(
    base::PlatformFile file, int flags, net::NetLog* net_log)
    : impl_(file, flags, net_log) {
}

FileStream::~FileStream() {
}

void FileStream::Close(const CompletionCallback& callback) {
  impl_.Close(callback);
}

void FileStream::CloseSync() {
  impl_.CloseSync();
}

int FileStream::Open(const FilePath& path, int open_flags,
                     const CompletionCallback& callback) {
  return impl_.Open(path, open_flags, callback);
}

int FileStream::OpenSync(const FilePath& path, int open_flags) {
  return impl_.OpenSync(path, open_flags);
}

bool FileStream::IsOpen() const {
  return impl_.IsOpen();
}

int FileStream::Seek(Whence whence, int64 offset,
                     const Int64CompletionCallback& callback) {
  return impl_.Seek(whence, offset, callback);
}

int64 FileStream::SeekSync(Whence whence, int64 offset) {
  return impl_.SeekSync(whence, offset);
}

int64 FileStream::Available() {
  return impl_.Available();
}

int FileStream::Read(
    IOBuffer* in_buf, int buf_len, const CompletionCallback& callback) {
  return impl_.Read(in_buf, buf_len, callback);
}

int FileStream::ReadSync(char* buf, int buf_len) {
  return impl_.ReadSync(buf, buf_len);
}

int FileStream::ReadUntilComplete(char *buf, int buf_len) {
  return impl_.ReadUntilComplete(buf, buf_len);
}

int FileStream::Write(
    IOBuffer* buf, int buf_len, const CompletionCallback& callback) {
  return impl_.Write(buf, buf_len, callback);
}

int FileStream::WriteSync(const char* buf, int buf_len) {
  return impl_.WriteSync(buf, buf_len);
}

int64 FileStream::Truncate(int64 bytes) {
  return impl_.Truncate(bytes);
}

int FileStream::Flush(const CompletionCallback& callback) {
  return impl_.Flush(callback);
}

int FileStream::FlushSync() {
  return impl_.FlushSync();
}

void FileStream::EnableErrorStatistics() {
  impl_.EnableErrorStatistics();
}

void FileStream::SetBoundNetLogSource(
    const net::BoundNetLog& owner_bound_net_log) {
  impl_.SetBoundNetLogSource(owner_bound_net_log);
}

base::PlatformFile FileStream::GetPlatformFileForTesting() {
  return impl_.GetPlatformFileForTesting();
}

}  // namespace net