idl_options.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Licensed to the Apache Software Foundation (ASF) under one
  2. // or more contributor license agreements. See the NOTICE file
  3. // distributed with this work for additional information
  4. // regarding copyright ownership. The ASF licenses this file
  5. // to you under the Apache License, Version 2.0 (the
  6. // "License"); you may not use this file except in compliance
  7. // with the License. You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing,
  12. // software distributed under the License is distributed on an
  13. // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. // KIND, either express or implied. See the License for the
  15. // specific language governing permissions and limitations
  16. // under the License.
  17. syntax="proto2";
  18. // mcpack2pb - Make protobuf be front-end of mcpack/compack
  19. import "google/protobuf/descriptor.proto";
  20. extend google.protobuf.FileOptions {
  21. // True to generate mcpack parsing/serializing code
  22. optional bool idl_support = 91000;
  23. }
  24. enum ConvertibleIdlType {
  25. IDL_AUTO = 0;
  26. IDL_INT8 = 1;
  27. IDL_INT16 = 2;
  28. IDL_INT32 = 3;
  29. IDL_INT64 = 4;
  30. IDL_UINT8 = 5;
  31. IDL_UINT16 = 6;
  32. IDL_UINT32 = 7;
  33. IDL_UINT64 = 8;
  34. IDL_BOOL = 9;
  35. IDL_FLOAT = 10;
  36. IDL_DOUBLE = 11;
  37. IDL_BINARY = 12;
  38. IDL_STRING = 13;
  39. }
  40. extend google.protobuf.FieldOptions {
  41. // Mark the idl-type which is inconsistent with proto-type.
  42. optional ConvertibleIdlType idl_type = 91001;
  43. // Mark the non-optional() vector/array in idl.
  44. optional int32 idl_on = 91002;
  45. // Use this name as the field name for packing instead of the one in proto.
  46. optional string idl_name = 91003;
  47. }