• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc.  All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8// Author: kenton@google.com (Kenton Varda)
9//  Based on original Protocol Buffers design by
10//  Sanjay Ghemawat, Jeff Dean, and others.
11//
12// A proto file which is imported by unittest.proto to test importing.
13
14syntax = "proto2";
15
16// We don't put this in a package within proto2 because we need to make sure
17// that the generated code doesn't depend on being in the proto2 namespace.
18// In test_util.h we do
19// "using namespace unittest_import = protobuf_unittest_import".
20package protobuf_unittest_import_proto2;
21
22option optimize_for = SPEED;
23option cc_enable_arenas = true;
24option csharp_namespace = "Google.Protobuf.TestProtos.Proto2";
25
26// Test public import
27import public "csharp/protos/unittest_import_public.proto";
28
29message ImportMessage {
30  optional int32 d = 1;
31}
32
33enum ImportEnum {
34  IMPORT_FOO = 7;
35  IMPORT_BAR = 8;
36  IMPORT_BAZ = 9;
37}
38
39// To use an enum in a map, it must has the first value as 0.
40enum ImportEnumForMap {
41  UNKNOWN = 0;
42  FOO = 1;
43  BAR = 2;
44}
45