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 #include "snapshot/test/test_module_snapshot.h" |
| 16 |
| 17 namespace crashpad { |
| 18 namespace test { |
| 19 |
| 20 TestModuleSnapshot::TestModuleSnapshot() |
| 21 : name_(), |
| 22 address_(0), |
| 23 size_(0), |
| 24 timestamp_(0), |
| 25 file_version_(), |
| 26 source_version_(), |
| 27 module_type_(kModuleTypeUnknown), |
| 28 uuid_(), |
| 29 annotations_vector_(), |
| 30 annotations_simple_map_() { |
| 31 } |
| 32 |
| 33 TestModuleSnapshot::~TestModuleSnapshot() { |
| 34 } |
| 35 |
| 36 std::string TestModuleSnapshot::Name() const { |
| 37 return name_; |
| 38 } |
| 39 |
| 40 uint64_t TestModuleSnapshot::Address() const { |
| 41 return address_; |
| 42 } |
| 43 |
| 44 uint64_t TestModuleSnapshot::Size() const { |
| 45 return size_; |
| 46 } |
| 47 |
| 48 time_t TestModuleSnapshot::Timestamp() const { |
| 49 return timestamp_; |
| 50 } |
| 51 |
| 52 void TestModuleSnapshot::FileVersion(uint16_t* version_0, |
| 53 uint16_t* version_1, |
| 54 uint16_t* version_2, |
| 55 uint16_t* version_3) const { |
| 56 *version_0 = file_version_[0]; |
| 57 *version_1 = file_version_[1]; |
| 58 *version_2 = file_version_[2]; |
| 59 *version_3 = file_version_[3]; |
| 60 } |
| 61 |
| 62 void TestModuleSnapshot::SourceVersion(uint16_t* version_0, |
| 63 uint16_t* version_1, |
| 64 uint16_t* version_2, |
| 65 uint16_t* version_3) const { |
| 66 *version_0 = source_version_[0]; |
| 67 *version_1 = source_version_[1]; |
| 68 *version_2 = source_version_[2]; |
| 69 *version_3 = source_version_[3]; |
| 70 } |
| 71 |
| 72 ModuleSnapshot::ModuleType TestModuleSnapshot::GetModuleType() const { |
| 73 return module_type_; |
| 74 } |
| 75 |
| 76 void TestModuleSnapshot::UUID(crashpad::UUID* uuid) const { |
| 77 *uuid = uuid_; |
| 78 } |
| 79 |
| 80 std::vector<std::string> TestModuleSnapshot::AnnotationsVector() const { |
| 81 return annotations_vector_; |
| 82 } |
| 83 |
| 84 std::map<std::string, std::string> TestModuleSnapshot::AnnotationsSimpleMap() |
| 85 const { |
| 86 return annotations_simple_map_; |
| 87 } |
| 88 |
| 89 } // namespace test |
| 90 } // namespace crashpad |
OLD | NEW |