Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (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 | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 | |
| 15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_STREAM_WRITER_H_ | |
| 16 #define CRASHPAD_MINIDUMP_MINIDUMP_STREAM_WRITER_H_ | |
| 17 | |
| 18 #include <dbghelp.h> | |
| 19 #include <stdint.h> | |
| 20 | |
| 21 #include "base/basictypes.h" | |
| 22 #include "minidump/minidump_extensions.h" | |
| 23 #include "minidump/minidump_writable.h" | |
| 24 | |
| 25 namespace crashpad { | |
| 26 namespace internal { | |
| 27 | |
| 28 //! \brief The base class for all second-level objects (“streams”) in a minidump | |
| 29 //! file. | |
| 30 //! | |
| 31 //! Instances of subclasses of this class are children of the root-level | |
| 32 //! MinidumpFileWriter object. | |
| 33 class MinidumpStreamWriter : public MinidumpWritable { | |
| 34 public: | |
| 35 //! \brief Returns an object’s stream type. | |
| 36 //! | |
| 37 //! \note Valid in any state. | |
| 38 virtual MinidumpStreamType StreamType() const = 0; | |
| 39 | |
| 40 //! \brief Returns a MINIDUMP_DIRECTORY entry that serves as a pointer to this | |
| 41 //! stream. | |
| 42 //! | |
| 43 //! This method is provided for MinidumpFileWriter, which calls it in order to | |
| 44 //! obtain the directory entry for a stream. | |
| 45 //! | |
| 46 //! \note Valid only in #kStateWritable. | |
| 47 const MINIDUMP_DIRECTORY* DirectoryListEntry() const; | |
| 48 | |
| 49 protected: | |
| 50 MinidumpStreamWriter(); | |
| 51 ~MinidumpStreamWriter() {} | |
| 52 | |
| 53 virtual bool Freeze(); | |
|
Robert Sesek
2014/08/03 15:19:59
override?
| |
| 54 | |
| 55 private: | |
| 56 MINIDUMP_DIRECTORY directory_list_entry_; | |
| 57 | |
| 58 DISALLOW_COPY_AND_ASSIGN(MinidumpStreamWriter); | |
| 59 }; | |
| 60 | |
| 61 } // namespace internal | |
| 62 } // namespace crashpad | |
| 63 | |
| 64 #endif // CRASHPAD_MINIDUMP_STREAM_WRITER_H_ | |
| OLD | NEW |