OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [JavaPackage="org.chromium.mojo.bindings.interfacecontrol"] | 5 [JavaPackage="org.chromium.mojo.bindings.interfacecontrol"] |
6 module mojo.interface_control; | 6 module mojo.interface_control; |
7 | 7 |
8 // For each user-defined interface, some control functions are provided by the | 8 // For each user-defined interface, some control functions are provided by the |
9 // interface endpoints at both sides. | 9 // interface endpoints at both sides. |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // This control function runs the input command. If the operation fails or the | 50 // This control function runs the input command. If the operation fails or the |
51 // command is not supported, the message pipe is closed. | 51 // command is not supported, the message pipe is closed. |
52 | 52 |
53 const uint32 kRunOrClosePipeMessageId = 0xFFFFFFFE; | 53 const uint32 kRunOrClosePipeMessageId = 0xFFFFFFFE; |
54 | 54 |
55 struct RunOrClosePipeMessageParams { | 55 struct RunOrClosePipeMessageParams { |
56 RunOrClosePipeInput input; | 56 RunOrClosePipeInput input; |
57 }; | 57 }; |
58 union RunOrClosePipeInput { | 58 union RunOrClosePipeInput { |
59 RequireVersion require_version; | 59 RequireVersion require_version; |
60 SendDisconnectReason send_disconnect_reason; | |
61 }; | 60 }; |
62 | 61 |
63 // If the specified version of the user-defined interface is not supported, the | 62 // If the specified version of the user-defined interface is not supported, the |
64 // function fails and the pipe is closed. | 63 // function fails and the pipe is closed. |
65 // Sent by the interface client side. | 64 // Sent by the interface client side. |
66 struct RequireVersion { | 65 struct RequireVersion { |
67 uint32 version; | 66 uint32 version; |
68 }; | 67 }; |
69 | |
70 // A user-defined reason about why the interface is disconnected. The sender | |
71 // usually send this message and immediately disconnect the interface. | |
72 // Sent by either side of the interface. | |
73 struct SendDisconnectReason { | |
74 uint32 custom_reason; | |
75 string description; | |
76 }; | |
OLD | NEW |