blob: 2b2266b12619976b21e3272c4c41478b9a6fa90a [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
17#ifndef ANDROID_HARDWARE_ISERVICE_MANAGER_H
18#define ANDROID_HARDWARE_ISERVICE_MANAGER_H
19
Steven Morelandcbefd352017-01-23 20:29:05 -080020#include <string>
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070021#include <utils/StrongPointer.h>
22
23namespace android {
24
25namespace hidl {
26namespace manager {
27namespace V1_0 {
28 struct IServiceManager;
29}; // namespace V1_0
30}; // namespace manager
31}; // namespace hidl
32
33namespace hardware {
34
Steven Moreland337e6b62017-01-18 17:25:13 -080035// These functions are for internal use by hidl. If you want to get ahold
36// of an interface, the best way to do this is by calling IFoo::getService()
37
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070038sp<::android::hidl::manager::V1_0::IServiceManager> defaultServiceManager();
Steven Moreland337e6b62017-01-18 17:25:13 -080039sp<::android::hidl::manager::V1_0::IServiceManager> getPassthroughServiceManager();
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070040
Steven Morelandcbefd352017-01-23 20:29:05 -080041namespace details {
Steven Morelandcd4dbdf2017-04-07 20:31:22 -070042// e.x.: android.hardware.foo@1.0, IFoo, default
43void onRegistration(const std::string &packageName,
44 const std::string &interfaceName,
45 const std::string &instanceName);
46
47// e.x.: android.hardware.foo@1.0::IFoo, default
Steven Morelandcbefd352017-01-23 20:29:05 -080048void waitForHwService(const std::string &interface, const std::string &instanceName);
49};
50
Steven Moreland5d5ef7f2016-10-20 19:19:55 -070051}; // namespace hardware
52}; // namespace android
53
54#endif // ANDROID_HARDWARE_ISERVICE_MANAGER_H
55