OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 //! successful Open() that has not yet been matched by a subsequent call | 98 //! successful Open() that has not yet been matched by a subsequent call |
99 //! to this method. | 99 //! to this method. |
100 void Close(); | 100 void Close(); |
101 | 101 |
102 // FileWriterInterface: | 102 // FileWriterInterface: |
103 | 103 |
104 //! \copydoc FileWriterInterface::Write() | 104 //! \copydoc FileWriterInterface::Write() |
105 //! | 105 //! |
106 //! \note It is only valid to call this method between a successful Open() and | 106 //! \note It is only valid to call this method between a successful Open() and |
107 //! a Close(). | 107 //! a Close(). |
108 virtual bool Write(const void* data, size_t size) override; | 108 bool Write(const void* data, size_t size) override; |
109 | 109 |
110 //! \copydoc FileWriterInterface::WriteIoVec() | 110 //! \copydoc FileWriterInterface::WriteIoVec() |
111 //! | 111 //! |
112 //! \note It is only valid to call this method between a successful Open() and | 112 //! \note It is only valid to call this method between a successful Open() and |
113 //! a Close(). | 113 //! a Close(). |
114 virtual bool WriteIoVec(std::vector<WritableIoVec>* iovecs) override; | 114 bool WriteIoVec(std::vector<WritableIoVec>* iovecs) override; |
115 | 115 |
116 //! \copydoc FileWriterInterface::Seek() | 116 //! \copydoc FileWriterInterface::Seek() |
117 //! | 117 //! |
118 //! \note It is only valid to call this method between a successful Open() and | 118 //! \note It is only valid to call this method between a successful Open() and |
119 //! a Close(). | 119 //! a Close(). |
120 virtual off_t Seek(off_t offset, int whence) override; | 120 off_t Seek(off_t offset, int whence) override; |
121 | 121 |
122 private: | 122 private: |
123 base::ScopedFD fd_; | 123 base::ScopedFD fd_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(FileWriter); | 125 DISALLOW_COPY_AND_ASSIGN(FileWriter); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace crashpad | 128 } // namespace crashpad |
129 | 129 |
130 #endif // CRASHPAD_UTIL_FILE_FILE_WRITER_H_ | 130 #endif // CRASHPAD_UTIL_FILE_FILE_WRITER_H_ |
OLD | NEW |