diff options
Diffstat (limited to 'include/perfetto/tracing/core/packages_list_config.h')
-rw-r--r-- | include/perfetto/tracing/core/packages_list_config.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/include/perfetto/tracing/core/packages_list_config.h b/include/perfetto/tracing/core/packages_list_config.h new file mode 100644 index 000000000..5df87d43e --- /dev/null +++ b/include/perfetto/tracing/core/packages_list_config.h @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/******************************************************************************* + * AUTOGENERATED - DO NOT EDIT + ******************************************************************************* + * This file has been generated from the protobuf message + * perfetto/config/android/packages_list_config.proto + * by + * ../../tools/proto_to_cpp/proto_to_cpp.cc. + * If you need to make changes here, change the .proto file and then run + * ./tools/gen_tracing_cpp_headers_from_protos + */ + +#ifndef INCLUDE_PERFETTO_TRACING_CORE_PACKAGES_LIST_CONFIG_H_ +#define INCLUDE_PERFETTO_TRACING_CORE_PACKAGES_LIST_CONFIG_H_ + +#include <stdint.h> +#include <string> +#include <type_traits> +#include <vector> + +#include "perfetto/base/export.h" + +// Forward declarations for protobuf types. +namespace perfetto { +namespace protos { +class PackagesListConfig; +} +} // namespace perfetto + +namespace perfetto { + +class PERFETTO_EXPORT PackagesListConfig { + public: + PackagesListConfig(); + ~PackagesListConfig(); + PackagesListConfig(PackagesListConfig&&) noexcept; + PackagesListConfig& operator=(PackagesListConfig&&); + PackagesListConfig(const PackagesListConfig&); + PackagesListConfig& operator=(const PackagesListConfig&); + bool operator==(const PackagesListConfig&) const; + bool operator!=(const PackagesListConfig& other) const { + return !(*this == other); + } + + // Conversion methods from/to the corresponding protobuf types. + void FromProto(const perfetto::protos::PackagesListConfig&); + void ToProto(perfetto::protos::PackagesListConfig*) const; + + int package_name_filter_size() const { + return static_cast<int>(package_name_filter_.size()); + } + const std::vector<std::string>& package_name_filter() const { + return package_name_filter_; + } + std::vector<std::string>* mutable_package_name_filter() { + return &package_name_filter_; + } + void clear_package_name_filter() { package_name_filter_.clear(); } + std::string* add_package_name_filter() { + package_name_filter_.emplace_back(); + return &package_name_filter_.back(); + } + + private: + std::vector<std::string> package_name_filter_; + + // Allows to preserve unknown protobuf fields for compatibility + // with future versions of .proto files. + std::string unknown_fields_; +}; + +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_TRACING_CORE_PACKAGES_LIST_CONFIG_H_ |