• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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     bool operator==(const MountPointMappingEntry&) const;
59     bool operator!=(const MountPointMappingEntry& other) const {
60       return !(*this == other);
61     }
62 
63     // Conversion methods from/to the corresponding protobuf types.
64     void FromProto(
65         const perfetto::protos::InodeFileConfig_MountPointMappingEntry&);
66     void ToProto(
67         perfetto::protos::InodeFileConfig_MountPointMappingEntry*) const;
68 
mountpoint()69     const std::string& mountpoint() const { return mountpoint_; }
set_mountpoint(const std::string & value)70     void set_mountpoint(const std::string& value) { mountpoint_ = value; }
71 
scan_roots_size()72     int scan_roots_size() const { return static_cast<int>(scan_roots_.size()); }
scan_roots()73     const std::vector<std::string>& scan_roots() const { return scan_roots_; }
mutable_scan_roots()74     std::vector<std::string>* mutable_scan_roots() { return &scan_roots_; }
clear_scan_roots()75     void clear_scan_roots() { scan_roots_.clear(); }
add_scan_roots()76     std::string* add_scan_roots() {
77       scan_roots_.emplace_back();
78       return &scan_roots_.back();
79     }
80 
81    private:
82     std::string mountpoint_ = {};
83     std::vector<std::string> scan_roots_;
84 
85     // Allows to preserve unknown protobuf fields for compatibility
86     // with future versions of .proto files.
87     std::string unknown_fields_;
88   };
89 
90   InodeFileConfig();
91   ~InodeFileConfig();
92   InodeFileConfig(InodeFileConfig&&) noexcept;
93   InodeFileConfig& operator=(InodeFileConfig&&);
94   InodeFileConfig(const InodeFileConfig&);
95   InodeFileConfig& operator=(const InodeFileConfig&);
96   bool operator==(const InodeFileConfig&) const;
97   bool operator!=(const InodeFileConfig& other) const {
98     return !(*this == other);
99   }
100 
101   // Conversion methods from/to the corresponding protobuf types.
102   void FromProto(const perfetto::protos::InodeFileConfig&);
103   void ToProto(perfetto::protos::InodeFileConfig*) const;
104 
scan_interval_ms()105   uint32_t scan_interval_ms() const { return scan_interval_ms_; }
set_scan_interval_ms(uint32_t value)106   void set_scan_interval_ms(uint32_t value) { scan_interval_ms_ = value; }
107 
scan_delay_ms()108   uint32_t scan_delay_ms() const { return scan_delay_ms_; }
set_scan_delay_ms(uint32_t value)109   void set_scan_delay_ms(uint32_t value) { scan_delay_ms_ = value; }
110 
scan_batch_size()111   uint32_t scan_batch_size() const { return scan_batch_size_; }
set_scan_batch_size(uint32_t value)112   void set_scan_batch_size(uint32_t value) { scan_batch_size_ = value; }
113 
do_not_scan()114   bool do_not_scan() const { return do_not_scan_; }
set_do_not_scan(bool value)115   void set_do_not_scan(bool value) { do_not_scan_ = value; }
116 
scan_mount_points_size()117   int scan_mount_points_size() const {
118     return static_cast<int>(scan_mount_points_.size());
119   }
scan_mount_points()120   const std::vector<std::string>& scan_mount_points() const {
121     return scan_mount_points_;
122   }
mutable_scan_mount_points()123   std::vector<std::string>* mutable_scan_mount_points() {
124     return &scan_mount_points_;
125   }
clear_scan_mount_points()126   void clear_scan_mount_points() { scan_mount_points_.clear(); }
add_scan_mount_points()127   std::string* add_scan_mount_points() {
128     scan_mount_points_.emplace_back();
129     return &scan_mount_points_.back();
130   }
131 
mount_point_mapping_size()132   int mount_point_mapping_size() const {
133     return static_cast<int>(mount_point_mapping_.size());
134   }
mount_point_mapping()135   const std::vector<MountPointMappingEntry>& mount_point_mapping() const {
136     return mount_point_mapping_;
137   }
mutable_mount_point_mapping()138   std::vector<MountPointMappingEntry>* mutable_mount_point_mapping() {
139     return &mount_point_mapping_;
140   }
clear_mount_point_mapping()141   void clear_mount_point_mapping() { mount_point_mapping_.clear(); }
add_mount_point_mapping()142   MountPointMappingEntry* add_mount_point_mapping() {
143     mount_point_mapping_.emplace_back();
144     return &mount_point_mapping_.back();
145   }
146 
147  private:
148   uint32_t scan_interval_ms_ = {};
149   uint32_t scan_delay_ms_ = {};
150   uint32_t scan_batch_size_ = {};
151   bool do_not_scan_ = {};
152   std::vector<std::string> scan_mount_points_;
153   std::vector<MountPointMappingEntry> mount_point_mapping_;
154 
155   // Allows to preserve unknown protobuf fields for compatibility
156   // with future versions of .proto files.
157   std::string unknown_fields_;
158 };
159 
160 }  // namespace perfetto
161 
162 #endif  // INCLUDE_PERFETTO_TRACING_CORE_INODE_FILE_CONFIG_H_
163