19f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland/*
29f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * Copyright (C) 2016 The Android Open Source Project
39f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland *
49f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * Licensed under the Apache License, Version 2.0 (the "License");
59f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * you may not use this file except in compliance with the License.
69f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * You may obtain a copy of the License at
79f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland *
89f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland *      http://www.apache.org/licenses/LICENSE-2.0
99f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland *
109f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * Unless required by applicable law or agreed to in writing, software
119f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * distributed under the License is distributed on an "AS IS" BASIS,
129f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * See the License for the specific language governing permissions and
149f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland * limitations under the License.
159f8b5c7b1649c989c21fbb88781c36ed95e4d358Steven Moreland */
1621a1c58b6c8d9eec2d337a72c4ee19249d50a0e4Steven Moreland#define LOG_TAG "android.hardware.tests.extension.light@2.0-service"
1708484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland
18f9d303435d80161fabb16cdff3b8f2f75f362480Yifan Hong#include <android/log.h>
19028223775be7539c5b569a454524584a7ad8e152Martijn Coenen#include <hidl/HidlTransportSupport.h>
2008484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland
2108484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland#include "Light.h"
2208484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland
23028223775be7539c5b569a454524584a7ad8e152Martijn Coenenusing android::hardware::configureRpcThreadpool;
24028223775be7539c5b569a454524584a7ad8e152Martijn Coenenusing android::hardware::joinRpcThreadpool;
2508484f825dba697ac8b0e8b2094d808f44490f7dSteven Morelandusing android::sp;
2608484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland
2708484f825dba697ac8b0e8b2094d808f44490f7dSteven Morelandusing android::hardware::light::V2_0::ILight;
2821a1c58b6c8d9eec2d337a72c4ee19249d50a0e4Steven Morelandusing android::hardware::tests::extension::light::V2_0::implementation::Light;
2908484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland
3008484f825dba697ac8b0e8b2094d808f44490f7dSteven Morelandint main() {
3108484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland    android::sp<ILight> service = new Light();
32028223775be7539c5b569a454524584a7ad8e152Martijn Coenen    configureRpcThreadpool(1, true /*callerWillJoin*/);
33074111d1f00d53b33f0b471f0304d8f9cc11d799Chris Phoenix    service->registerAsService();
34028223775be7539c5b569a454524584a7ad8e152Martijn Coenen    joinRpcThreadpool();
3508484f825dba697ac8b0e8b2094d808f44490f7dSteven Moreland}
36