1 /* 2 * Copyright (C) 2018 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 #ifndef TOOLS_TRACE_TO_TEXT_PROTO_FULL_UTILS_H_ 18 #define TOOLS_TRACE_TO_TEXT_PROTO_FULL_UTILS_H_ 19 20 // This file provides a wrapper around protobuf libraries that can be used only 21 // when targeting libprotobuf-full. 22 23 #include <google/protobuf/compiler/importer.h> 24 #include <string> 25 26 #include "perfetto/base/logging.h" 27 28 namespace perfetto { 29 namespace trace_to_text { 30 31 class MultiFileErrorCollectorImpl 32 : public ::google::protobuf::compiler::MultiFileErrorCollector { 33 public: 34 ~MultiFileErrorCollectorImpl() override; 35 void AddError(const std::string& filename, 36 int line, 37 int column, 38 const std::string& message) override; 39 40 void AddWarning(const std::string& filename, 41 int line, 42 int column, 43 const std::string& message) override; 44 }; 45 46 } // namespace trace_to_text 47 } // namespace perfetto 48 49 #endif // TOOLS_TRACE_TO_TEXT_PROTO_FULL_UTILS_H_ 50