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 3// found in the LICENSE file. 4 5[JavaPackage="org.chromium.mojo.bindings.pipecontrol"] 6module mojo.pipe_control; 7 8// For each message pipe running user-defined interfaces, some control 9// functions are provided and used by the routers at both ends of the pipe, so 10// that they can coordinate to manage interface endpoints. 11// All these control messages will have the interface ID field in the message 12// header set to invalid. 13 14//////////////////////////////////////////////////////////////////////////////// 15// RunOrClosePipe@0xFFFFFFFE(RunOrClosePipeInput input); 16// 17// This control function runs the input command. If the operation fails or the 18// command is not supported, the message pipe is closed. 19 20const uint32 kRunOrClosePipeMessageId = 0xFFFFFFFE; 21 22struct RunOrClosePipeMessageParams { 23 RunOrClosePipeInput input; 24}; 25 26union RunOrClosePipeInput { 27 PeerAssociatedEndpointClosedEvent peer_associated_endpoint_closed_event; 28 AssociatedEndpointClosedBeforeSentEvent 29 associated_endpoint_closed_before_sent_event; 30}; 31 32// An event to notify that an interface endpoint set up at the message sender 33// side has been closed. 34// 35// This event is only used for associated interfaces. When a master interface 36// is closed, the message pipe is shutdown directly. 37struct PeerAssociatedEndpointClosedEvent { 38 // The interface ID. 39 uint32 id; 40}; 41 42// An event to notify that an interface endpoint that is meant to be set up at 43// the message receiver side has been closed before sent over the message pipe. 44// 45// This event is only used for associated interfaces. 46struct AssociatedEndpointClosedBeforeSentEvent { 47 // The interface ID. 48 uint32 id; 49}; 50 51