blob: 16c0c8ce063b5e58d706b5baf0765d9e3925b33f [file] [log] [blame]
Steven Moreland5d5ef7f2016-10-20 19:19:55 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hidl.manager@1.0;
18
19interface IServiceManager {
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070020
21 /**
22 * Retrieve an existing service.
23 *
Steven Morelandf0cc0972016-11-02 17:51:46 -070024 * WARNING: This function is for libhidl/HwBinder use only. You are likely
25 * looking for 'IMyInterface::getService("name")' instead.
26 *
27 * @param iface Fully-qualified interface name.
28 * e.x. "android.hidl.manager@1.0::IServiceManager"
29 * @param name Name of the specific instance of the service. Same as
30 * name in IServiceManager::add. e.x. "manager"
31 *
32 * @return service Handle to requested service, same as provided in
33 * IServiceManager::add.
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070034 */
Steven Morelandf0cc0972016-11-02 17:51:46 -070035 get(string fqName, string name) generates (interface service);
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070036
37 /**
38 * Register a service.
39 *
Steven Morelandf0cc0972016-11-02 17:51:46 -070040 * WARNING: This function is for libhidl/HwBinder use only. You are likely
41 * looking for 'INTERFACE::registerAsService("name")' instead.
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070042 *
Steven Morelandf0cc0972016-11-02 17:51:46 -070043 * @param interfaceChain List of fully-qualified interface names. The first
44 * must be the actual interface name. Subsequent names must
45 * follow the inheritance hierarchy of the interface.
46 * @param name Can be anything. Must also be used to retrieve service.
47 * @param service Handle to registering service.
48 *
49 * @return success Whether or not the service was registered.
50 *
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070051 */
Steven Morelandf0cc0972016-11-02 17:51:46 -070052 add(vec<string> interfaceChain, string name, interface service)
53 generates (bool success);
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070054
55};