1 /* 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 20 #include <string> 21 #include <utils/StrongPointer.h> 22 23 namespace android { 24 25 namespace hidl { 26 namespace manager { 27 namespace V1_0 { 28 struct IServiceManager; 29 }; // namespace V1_0 30 }; // namespace manager 31 }; // namespace hidl 32 33 namespace hardware { 34 35 // 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 38 sp<::android::hidl::manager::V1_0::IServiceManager> defaultServiceManager(); 39 sp<::android::hidl::manager::V1_0::IServiceManager> getPassthroughServiceManager(); 40 41 namespace details { 42 // e.x.: android.hardware.foo@1.0, IFoo, default 43 void 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 48 void waitForHwService(const std::string &interface, const std::string &instanceName); 49 }; 50 51 }; // namespace hardware 52 }; // namespace android 53 54 #endif // ANDROID_HARDWARE_ISERVICE_MANAGER_H 55 56