OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 StreamState GetState() const override; | 43 StreamState GetState() const override; |
44 StreamResult Read(void* buffer, | 44 StreamResult Read(void* buffer, |
45 size_t buffer_len, | 45 size_t buffer_len, |
46 size_t* read, | 46 size_t* read, |
47 int* error) override; | 47 int* error) override; |
48 StreamResult Write(const void* data, | 48 StreamResult Write(const void* data, |
49 size_t data_len, | 49 size_t data_len, |
50 size_t* written, | 50 size_t* written, |
51 int* error) override; | 51 int* error) override; |
52 bool Flush() override; | 52 bool Flush() override; |
| 53 // Returns the total file size currently used on disk. |
| 54 bool GetSize(size_t* size) const override; |
53 void Close() override; | 55 void Close() override; |
54 | 56 |
55 // Opens the appropriate file(s). Call this before using the stream. | 57 // Opens the appropriate file(s). Call this before using the stream. |
56 bool Open(); | 58 bool Open(); |
57 | 59 |
58 // Disabling buffering causes writes to block until disk is updated. This is | 60 // Disabling buffering causes writes to block until disk is updated. This is |
59 // enabled by default for performance. | 61 // enabled by default for performance. |
60 bool DisableBuffering(); | 62 bool DisableBuffering(); |
61 | 63 |
62 // Returns the path used for the i-th newest file, where the 0th file is the | 64 // Returns the path used for the i-th newest file, where the 0th file is the |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 163 |
162 const size_t max_total_log_size_; | 164 const size_t max_total_log_size_; |
163 size_t num_rotations_; | 165 size_t num_rotations_; |
164 | 166 |
165 DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream); | 167 DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream); |
166 }; | 168 }; |
167 | 169 |
168 } // namespace rtc | 170 } // namespace rtc |
169 | 171 |
170 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_ | 172 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_ |
OLD | NEW |