Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Side by Side Diff: mojo/public/interfaces/bindings/service_describer.mojom

Issue 1741963002: Auto-formatted all .mojom files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 [DartPackage="mojo", JavaPackage="org.chromium.mojo.bindings"] 5 [DartPackage="mojo",
6 JavaPackage="org.chromium.mojo.bindings"]
6 // TODO(rudominer) Move this file into the module mojo.bindings when 7 // TODO(rudominer) Move this file into the module mojo.bindings when
7 // https://github.com/domokit/mojo/issues/435 is fixed. 8 // https://github.com/domokit/mojo/issues/435 is fixed.
8 module mojo.bindings.types; 9 module mojo.bindings.types;
9 10
10 import "mojom_types.mojom"; 11 import "mojom_types.mojom";
11 12
12 // This is a companion interface to ServiceProvider. An implementation of 13 // This is a companion interface to ServiceProvider. An implementation of
13 // ServiceProvider may optionally offer descriptions of the services it 14 // ServiceProvider may optionally offer descriptions of the services it
14 // provides by making this interface available. A client obtains access 15 // provides by making this interface available. A client obtains access
15 // to a ServiceDescriber service by invoking 16 // to a ServiceDescriber service by invoking
16 // ServiceProvider.ConnectToService(SERVICE_DESCRIBER_INTERFACE_NAME, pipe). 17 // ServiceProvider.ConnectToService(SERVICE_DESCRIBER_INTERFACE_NAME, pipe).
17 [ServiceName="mojo::bindings::types::ServiceDescriber"] 18 [ServiceName="mojo::bindings::types::ServiceDescriber"]
18 interface ServiceDescriber { 19 interface ServiceDescriber {
19 // Requests access to a ServiceDescription for the service with the 20 // Requests access to a ServiceDescription for the service with the
20 // given name. The |interface_name| is the same string that would be passed 21 // given name. The |interface_name| is the same string that would be passed
21 // to ServiceProvider.ConnectToService() in order to request the service 22 // to ServiceProvider.ConnectToService() in order to request the service
22 // with the given name. If the host is not willing or able to describe the 23 // with the given name. If the host is not willing or able to describe the
23 // service with the given name it will close the |description_request| pipe. 24 // service with the given name it will close the |description_request| pipe.
24 DescribeService(string interface_name, 25 DescribeService(string interface_name, ServiceDescription& description_request );
25 ServiceDescription& description_request);
26 }; 26 };
27 27
28 // A ServiceDescription allows a client to request information about the Mojom 28 // A ServiceDescription allows a client to request information about the Mojom
29 // types used to implement a particular Mojo service. 29 // types used to implement a particular Mojo service.
30 // 30 //
31 // A Mojo service has a *top-level* interface: the interface that is bound to 31 // A Mojo service has a *top-level* interface: the interface that is bound to
32 // the message pipe |pipe| as a result of calling 32 // the message pipe |pipe| as a result of calling
33 // ServiceProvider.ConnectToService(). 33 // ServiceProvider.ConnectToService().
34 // 34 //
35 // The *complete type set* of a Mojo service is the closure of this top-level 35 // The *complete type set* of a Mojo service is the closure of this top-level
36 // interface under type reference. That is, the complete type set includes all 36 // interface under type reference. That is, the complete type set includes all
37 // of the types referenced directly in the definition of the top-level interface 37 // of the types referenced directly in the definition of the top-level interface
38 // and the types referenced by those types etc. The complete type set of a Mojo 38 // and the types referenced by those types etc. The complete type set of a Mojo
39 // service may include other interfaces besides the top-level interface. 39 // service may include other interfaces besides the top-level interface.
40 // 40 //
41 // An implementation of ServiceDescription contains information about all 41 // An implementation of ServiceDescription contains information about all
42 // of the types in the complete type set of the service. 42 // of the types in the complete type set of the service.
43 interface ServiceDescription { 43 interface ServiceDescription {
44 // Returns a MojomInterface for the top-level interface of this service. 44 // Returns a MojomInterface for the top-level interface of this service.
45 GetTopLevelInterface() => (MojomInterface mojomInterface); 45 GetTopLevelInterface() => (MojomInterface mojomInterface);
46 46
47 // Returns the |UserDefinedType| for the given |type_key|. Valid keys are 47 // Returns the |UserDefinedType| for the given |type_key|. Valid keys are
48 // those that are embedded in the structures returned from earlier queries 48 // those that are embedded in the structures returned from earlier queries
49 // of this ServiceDescription. If the key is invalid then |type| will be null. 49 // of this ServiceDescription. If the key is invalid then |type| will be null.
50 GetTypeDefinition(string type_key) => 50 GetTypeDefinition(string type_key) => (mojo.bindings.types.UserDefinedType? ty pe);
vtl 2016/02/29 23:41:59 We should also decide whether/how we prefer to bre
51 (mojo.bindings.types.UserDefinedType? type);
52 51
53 // Returns all the data queryable via GetTypeDefinition in a single 52 // Returns all the data queryable via GetTypeDefinition in a single
54 // structure, or null if the implementation is not willing or not able to 53 // structure, or null if the implementation is not willing or not able to
55 // provide all of the data at once. 54 // provide all of the data at once.
56 GetAllTypeDefinitions() => (map<string, UserDefinedType>? definitions); 55 GetAllTypeDefinitions() => (map<string, UserDefinedType>? definitions);
57 }; 56 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698