1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /******************************************************************************* 18 * AUTOGENERATED - DO NOT EDIT 19 ******************************************************************************* 20 * This file has been generated from the protobuf message 21 * perfetto/config/inode_file/inode_file_config.proto 22 * by 23 * ../../tools/proto_to_cpp/proto_to_cpp.cc. 24 * If you need to make changes here, change the .proto file and then run 25 * ./tools/gen_tracing_cpp_headers_from_protos.py 26 */ 27 28 #ifndef INCLUDE_PERFETTO_TRACING_CORE_INODE_FILE_CONFIG_H_ 29 #define INCLUDE_PERFETTO_TRACING_CORE_INODE_FILE_CONFIG_H_ 30 31 #include <stdint.h> 32 #include <string> 33 #include <type_traits> 34 #include <vector> 35 36 #include "perfetto/base/export.h" 37 38 // Forward declarations for protobuf types. 39 namespace perfetto { 40 namespace protos { 41 class InodeFileConfig; 42 class InodeFileConfig_MountPointMappingEntry; 43 } // namespace protos 44 } // namespace perfetto 45 46 namespace perfetto { 47 48 class PERFETTO_EXPORT InodeFileConfig { 49 public: 50 class PERFETTO_EXPORT MountPointMappingEntry { 51 public: 52 MountPointMappingEntry(); 53 ~MountPointMappingEntry(); 54 MountPointMappingEntry(MountPointMappingEntry&&) noexcept; 55 MountPointMappingEntry& operator=(MountPointMappingEntry&&); 56 MountPointMappingEntry(const MountPointMappingEntry&); 57 MountPointMappingEntry& operator=(const MountPointMappingEntry&); 58 59 // Conversion methods from/to the corresponding protobuf types. 60 void FromProto( 61 const perfetto::protos::InodeFileConfig_MountPointMappingEntry&); 62 void ToProto( 63 perfetto::protos::InodeFileConfig_MountPointMappingEntry*) const; 64 mountpoint()65 const std::string& mountpoint() const { return mountpoint_; } set_mountpoint(const std::string & value)66 void set_mountpoint(const std::string& value) { mountpoint_ = value; } 67 scan_roots_size()68 int scan_roots_size() const { return static_cast<int>(scan_roots_.size()); } scan_roots()69 const std::vector<std::string>& scan_roots() const { return scan_roots_; } add_scan_roots()70 std::string* add_scan_roots() { 71 scan_roots_.emplace_back(); 72 return &scan_roots_.back(); 73 } 74 75 private: 76 std::string mountpoint_ = {}; 77 std::vector<std::string> scan_roots_; 78 79 // Allows to preserve unknown protobuf fields for compatibility 80 // with future versions of .proto files. 81 std::string unknown_fields_; 82 }; 83 84 InodeFileConfig(); 85 ~InodeFileConfig(); 86 InodeFileConfig(InodeFileConfig&&) noexcept; 87 InodeFileConfig& operator=(InodeFileConfig&&); 88 InodeFileConfig(const InodeFileConfig&); 89 InodeFileConfig& operator=(const InodeFileConfig&); 90 91 // Conversion methods from/to the corresponding protobuf types. 92 void FromProto(const perfetto::protos::InodeFileConfig&); 93 void ToProto(perfetto::protos::InodeFileConfig*) const; 94 scan_interval_ms()95 uint32_t scan_interval_ms() const { return scan_interval_ms_; } set_scan_interval_ms(uint32_t value)96 void set_scan_interval_ms(uint32_t value) { scan_interval_ms_ = value; } 97 scan_delay_ms()98 uint32_t scan_delay_ms() const { return scan_delay_ms_; } set_scan_delay_ms(uint32_t value)99 void set_scan_delay_ms(uint32_t value) { scan_delay_ms_ = value; } 100 scan_batch_size()101 uint32_t scan_batch_size() const { return scan_batch_size_; } set_scan_batch_size(uint32_t value)102 void set_scan_batch_size(uint32_t value) { scan_batch_size_ = value; } 103 do_not_scan()104 bool do_not_scan() const { return do_not_scan_; } set_do_not_scan(bool value)105 void set_do_not_scan(bool value) { do_not_scan_ = value; } 106 scan_mount_points_size()107 int scan_mount_points_size() const { 108 return static_cast<int>(scan_mount_points_.size()); 109 } scan_mount_points()110 const std::vector<std::string>& scan_mount_points() const { 111 return scan_mount_points_; 112 } add_scan_mount_points()113 std::string* add_scan_mount_points() { 114 scan_mount_points_.emplace_back(); 115 return &scan_mount_points_.back(); 116 } 117 mount_point_mapping_size()118 int mount_point_mapping_size() const { 119 return static_cast<int>(mount_point_mapping_.size()); 120 } mount_point_mapping()121 const std::vector<MountPointMappingEntry>& mount_point_mapping() const { 122 return mount_point_mapping_; 123 } add_mount_point_mapping()124 MountPointMappingEntry* add_mount_point_mapping() { 125 mount_point_mapping_.emplace_back(); 126 return &mount_point_mapping_.back(); 127 } 128 129 private: 130 uint32_t scan_interval_ms_ = {}; 131 uint32_t scan_delay_ms_ = {}; 132 uint32_t scan_batch_size_ = {}; 133 bool do_not_scan_ = {}; 134 std::vector<std::string> scan_mount_points_; 135 std::vector<MountPointMappingEntry> mount_point_mapping_; 136 137 // Allows to preserve unknown protobuf fields for compatibility 138 // with future versions of .proto files. 139 std::string unknown_fields_; 140 }; 141 142 } // namespace perfetto 143 #endif // INCLUDE_PERFETTO_TRACING_CORE_INODE_FILE_CONFIG_H_ 144