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/data_source_descriptor.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_DATA_SOURCE_DESCRIPTOR_H_ 29 #define INCLUDE_PERFETTO_TRACING_CORE_DATA_SOURCE_DESCRIPTOR_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 DataSourceDescriptor; 42 } 43 } // namespace perfetto 44 45 namespace perfetto { 46 47 class PERFETTO_EXPORT DataSourceDescriptor { 48 public: 49 DataSourceDescriptor(); 50 ~DataSourceDescriptor(); 51 DataSourceDescriptor(DataSourceDescriptor&&) noexcept; 52 DataSourceDescriptor& operator=(DataSourceDescriptor&&); 53 DataSourceDescriptor(const DataSourceDescriptor&); 54 DataSourceDescriptor& operator=(const DataSourceDescriptor&); 55 bool operator==(const DataSourceDescriptor&) const; 56 bool operator!=(const DataSourceDescriptor& other) const { 57 return !(*this == other); 58 } 59 60 // Conversion methods from/to the corresponding protobuf types. 61 void FromProto(const perfetto::protos::DataSourceDescriptor&); 62 void ToProto(perfetto::protos::DataSourceDescriptor*) const; 63 name()64 const std::string& name() const { return name_; } set_name(const std::string & value)65 void set_name(const std::string& value) { name_ = value; } 66 will_notify_on_stop()67 bool will_notify_on_stop() const { return will_notify_on_stop_; } set_will_notify_on_stop(bool value)68 void set_will_notify_on_stop(bool value) { will_notify_on_stop_ = value; } 69 will_notify_on_start()70 bool will_notify_on_start() const { return will_notify_on_start_; } set_will_notify_on_start(bool value)71 void set_will_notify_on_start(bool value) { will_notify_on_start_ = value; } 72 handles_incremental_state_clear()73 bool handles_incremental_state_clear() const { 74 return handles_incremental_state_clear_; 75 } set_handles_incremental_state_clear(bool value)76 void set_handles_incremental_state_clear(bool value) { 77 handles_incremental_state_clear_ = value; 78 } 79 80 private: 81 std::string name_ = {}; 82 bool will_notify_on_stop_ = {}; 83 bool will_notify_on_start_ = {}; 84 bool handles_incremental_state_clear_ = {}; 85 86 // Allows to preserve unknown protobuf fields for compatibility 87 // with future versions of .proto files. 88 std::string unknown_fields_; 89 }; 90 91 } // namespace perfetto 92 93 #endif // INCLUDE_PERFETTO_TRACING_CORE_DATA_SOURCE_DESCRIPTOR_H_ 94