Static.h revision b2c9c75b74c87e651dd08a100015eab17319556e
17211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen/* 27211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * Copyright (C) 2016 The Android Open Source Project 37211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * 47211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * Licensed under the Apache License, Version 2.0 (the "License"); 57211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * you may not use this file except in compliance with the License. 67211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * You may obtain a copy of the License at 77211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * 87211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * http://www.apache.org/licenses/LICENSE-2.0 97211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * 107211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * Unless required by applicable law or agreed to in writing, software 117211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * distributed under the License is distributed on an "AS IS" BASIS, 127211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * See the License for the specific language governing permissions and 147211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen * limitations under the License. 157211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen */ 167211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen 177211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen// All static variables go here, to control initialization and 187211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen// destruction order in the library. 197211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen 20b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong#include <android/hidl/base/1.0/IBase.h> 215d5ef7fcf17889a078212fbe75ac15d72a56586cSteven Moreland#include <android/hidl/manager/1.0/IServiceManager.h> 22b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong#include <hwbinder/IBinder.h> 23b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong#include <utils/threads.h> 247211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen 257211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenennamespace android { 267211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenennamespace hardware { 277211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen 285d5ef7fcf17889a078212fbe75ac15d72a56586cSteven Moreland// For ServiceManagement.cpp 297211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenenextern Mutex gDefaultServiceManagerLock; 305d5ef7fcf17889a078212fbe75ac15d72a56586cSteven Morelandextern sp<android::hidl::manager::V1_0::IServiceManager> gDefaultServiceManager; 317211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen 32b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong// For HidlBinderSupport 33b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)), 34b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong// returns sp<IBinder> 35b2c9c75b74c87e651dd08a100015eab17319556eYifan Hongextern std::map<std::string, std::function<sp<IBinder>(void*)>> gBnConstructorMap; 36b2c9c75b74c87e651dd08a100015eab17319556eYifan Hong 377211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen} // namespace hardware 387211016cd72b5fa9f61fb8cf77b62faa207362e4Martijn Coenen} // namespace android 39