chromium/third_party/perfetto/src/ipc/protoc_plugin/ipc_plugin.cc

/*
 * 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.
 */

#include <functional>
#include <memory>
#include <set>
#include <string>

#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/plugin.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>

#include "perfetto/ext/base/string_utils.h"

namespace perfetto {
namespace ipc {
namespace {

FileDescriptor;
MethodDescriptor;
ServiceDescriptor;
GeneratorContext;
Printer;
ZeroCopyOutputStream;
SplitString;
StripChars;
StripSuffix;
ToUpper;

static const char kBanner[] =;

static const char kHeaderSvcClass[] =;

static const char kHeaderProxyClass[] =;

static const char kCppClassDefinitions[] =;

static const char kCppMethodDescriptor[] =;

static const char kCppMethod[] =;

std::string StripName(const FileDescriptor& file) {}

std::string GetStubName(const FileDescriptor& file) {}

void ForEachMethod(const ServiceDescriptor& svc,
                   std::function<void(const MethodDescriptor&,
                                      const std::string&,
                                      const std::string&)> function) {}

class IPCGenerator : public ::google::protobuf::compiler::CodeGenerator {};

IPCGenerator::IPCGenerator() = default;
IPCGenerator::~IPCGenerator() = default;

void IPCGenerator::GenerateServiceHeader(const FileDescriptor& file,
                                         const ServiceDescriptor& svc,
                                         Printer* printer) const {}

void IPCGenerator::GenerateServiceCpp(const FileDescriptor& file,
                                      const ServiceDescriptor& svc,
                                      Printer* printer) const {}

bool IPCGenerator::Generate(const FileDescriptor* file,
                            const std::string& options,
                            GeneratorContext* context,
                            std::string* error) const {}

}  // namespace
}  // namespace ipc
}  // namespace perfetto

int main(int argc, char* argv[]) {}