blob: 16c0c8ce063b5e58d706b5baf0765d9e3925b33f [file] [log] [blame]
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hidl.manager@1.0;
interface IServiceManager {
/**
* Retrieve an existing service.
*
* WARNING: This function is for libhidl/HwBinder use only. You are likely
* looking for 'IMyInterface::getService("name")' instead.
*
* @param iface Fully-qualified interface name.
* e.x. "android.hidl.manager@1.0::IServiceManager"
* @param name Name of the specific instance of the service. Same as
* name in IServiceManager::add. e.x. "manager"
*
* @return service Handle to requested service, same as provided in
* IServiceManager::add.
*/
get(string fqName, string name) generates (interface service);
/**
* Register a service.
*
* WARNING: This function is for libhidl/HwBinder use only. You are likely
* looking for 'INTERFACE::registerAsService("name")' instead.
*
* @param interfaceChain List of fully-qualified interface names. The first
* must be the actual interface name. Subsequent names must
* follow the inheritance hierarchy of the interface.
* @param name Can be anything. Must also be used to retrieve service.
* @param service Handle to registering service.
*
* @return success Whether or not the service was registered.
*
*/
add(vec<string> interfaceChain, string name, interface service)
generates (bool success);
};