| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package fidl_codec.proto; |
| |
| // Defines a fidl_codec value. |
| message Value { |
| oneof Kind { |
| bool null_value = 1; |
| bytes raw_value = 2; |
| bool bool_value = 3; |
| Integer integer_value = 4; |
| double double_value = 5; |
| string string_value = 6; |
| HandleInfo handle_value = 7; |
| Union union_value = 8; |
| Struct struct_value = 9; |
| Vector vector_value = 10; |
| Table table_value = 11; |
| FidlMessage fidl_message_value = 12; |
| } |
| } |
| |
| // Defines an integer value. |
| message Integer { |
| uint64 absolute_value = 1; |
| bool negative = 2; |
| } |
| |
| // Defines a handle value. |
| message HandleInfo { |
| uint32 handle = 1; |
| uint32 type = 2; |
| uint32 rights = 3; |
| uint32 operation = 4; |
| } |
| |
| // Defines a union value. |
| message Union { |
| string member = 1; |
| Value value = 2; |
| } |
| |
| // Defines a struct field with id |
| |
| message StructField { |
| uint32 id = 1; |
| string name = 2; |
| Value value = 3; |
| } |
| |
| // Defines a struct value. |
| message Struct { |
| repeated StructField fields = 1; |
| } |
| |
| // Defines a vector value. |
| message Vector { |
| repeated Value value = 1; |
| } |
| |
| // Defines a table value. |
| message Table { |
| map<string, Value> members = 1; |
| } |
| |
| // Defines a FIDL message value. |
| message FidlMessage { |
| uint32 txid = 1; |
| uint64 ordinal = 2; |
| string global_errors = 3; |
| string epitaph_error = 4; |
| bool received = 5; |
| bool is_request = 6; |
| bool unknown_direction = 7; |
| string interface = 8; |
| string method = 9; |
| bytes raw_bytes = 10; |
| repeated HandleInfo handle = 11; |
| bool has_request = 12; |
| Struct decoded_request = 13; |
| string request_errors = 14; |
| bool has_response = 15; |
| Struct decoded_response = 16; |
| string response_errors = 17; |
| } |