OLD | NEW |
1 {%- import "interface_macros.tmpl" as interface_macros %} | 1 {%- import "interface_macros.tmpl" as interface_macros %} |
2 {%- import "struct_macros.tmpl" as struct_macros %} | 2 {%- import "struct_macros.tmpl" as struct_macros %} |
3 | 3 |
4 {%- set class_name = interface.name %} | 4 {%- set class_name = interface.name %} |
5 {%- set proxy_name = interface.name ~ "Proxy" %} | 5 {%- set proxy_name = interface.name ~ "Proxy" %} |
6 {%- set namespace_as_string = "%s"|format(namespace|replace(".","::")) %} | 6 {%- set namespace_as_string = "%s"|format(namespace|replace(".","::")) %} |
7 | 7 |
8 {%- macro alloc_params(struct, params, message, serialization_context) %} | 8 {%- macro alloc_params(struct, params, message, serialization_context) %} |
9 ({{params}})->DecodePointers(); | 9 ({{params}})->DecodePointers(); |
10 ({{serialization_context}})->handles.Swap(({{message}})->mutable_handles()); | 10 ({{serialization_context}})->handles.Swap(({{message}})->mutable_handles()); |
11 bool success = true; | 11 bool success = true; |
12 {%- for param in struct.packed.packed_fields_in_ordinal_order %} | 12 {%- for param in struct.packed.packed_fields_in_ordinal_order %} |
13 {{param.field.kind|cpp_wrapper_type}} p_{{param.field.name}}{}; | 13 {{param.field.kind|cpp_wrapper_type}} p_{{param.field.name}}{}; |
14 {%- endfor %} | 14 {%- endfor %} |
15 {{struct_macros.deserialize( | 15 {{struct.name}}DataView input_data_view({{params}}, |
16 struct, params, "p_%s", serialization_context, "success")}} | 16 {{serialization_context}}); |
| 17 {{struct_macros.deserialize(struct, "input_data_view", "p_%s", "success")}} |
17 if (!success) | 18 if (!success) |
18 return false; | 19 return false; |
19 {%- endmacro %} | 20 {%- endmacro %} |
20 | 21 |
21 {%- macro pass_params(parameters) %} | 22 {%- macro pass_params(parameters) %} |
22 {%- for param in parameters %} | 23 {%- for param in parameters %} |
23 {%- if param.kind|is_move_only_kind -%} | 24 {%- if param.kind|is_move_only_kind -%} |
24 std::move(p_{{param.name}}) | 25 std::move(p_{{param.name}}) |
25 {%- else -%} | 26 {%- else -%} |
26 p_{{param.name}} | 27 p_{{param.name}} |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 default: | 420 default: |
420 break; | 421 break; |
421 } | 422 } |
422 | 423 |
423 // Unrecognized message. | 424 // Unrecognized message. |
424 ReportValidationError( | 425 ReportValidationError( |
425 mojo::internal::VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD); | 426 mojo::internal::VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD); |
426 return false; | 427 return false; |
427 } | 428 } |
428 {%- endif -%} | 429 {%- endif -%} |
OLD | NEW |