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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Disabling buffering causes writes to block until disk is updated. This is | 61 // Disabling buffering causes writes to block until disk is updated. This is |
62 // enabled by default for performance. | 62 // enabled by default for performance. |
63 bool DisableBuffering(); | 63 bool DisableBuffering(); |
64 | 64 |
65 // Returns the path used for the i-th newest file, where the 0th file is the | 65 // Returns the path used for the i-th newest file, where the 0th file is the |
66 // newest file. The file may or may not exist, this is just used for | 66 // newest file. The file may or may not exist, this is just used for |
67 // formatting. Index must be less than GetNumFiles(). | 67 // formatting. Index must be less than GetNumFiles(). |
68 std::string GetFilePath(size_t index) const; | 68 std::string GetFilePath(size_t index) const; |
69 | 69 |
70 // Returns the number of files that will used by this stream. | 70 // Returns the number of files that will used by this stream. |
71 size_t GetNumFiles() { return file_names_.size(); } | 71 size_t GetNumFiles() const { return file_names_.size(); } |
72 | 72 |
73 protected: | 73 protected: |
74 size_t GetMaxFileSize() const { return max_file_size_; } | 74 size_t GetMaxFileSize() const { return max_file_size_; } |
75 | 75 |
76 void SetMaxFileSize(size_t size) { max_file_size_ = size; } | 76 void SetMaxFileSize(size_t size) { max_file_size_ = size; } |
77 | 77 |
78 size_t GetRotationIndex() const { return rotation_index_; } | 78 size_t GetRotationIndex() const { return rotation_index_; } |
79 | 79 |
80 void SetRotationIndex(size_t index) { rotation_index_ = index; } | 80 void SetRotationIndex(size_t index) { rotation_index_ = index; } |
81 | 81 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 const size_t max_total_log_size_; | 165 const size_t max_total_log_size_; |
166 size_t num_rotations_; | 166 size_t num_rotations_; |
167 | 167 |
168 RTC_DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream); | 168 RTC_DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace rtc | 171 } // namespace rtc |
172 | 172 |
173 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_ | 173 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_ |
OLD | NEW |