blob: 52db02510705199b9eea953cc6d177d3bf565737 [file] [log] [blame]
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +09001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
Jaesoo Lee812e85e2017-04-28 18:29:40 +09004 * Licensed under the Apache License, Version 2.1 (the "License");
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +09005 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
Jaesoo Lee812e85e2017-04-28 18:29:40 +09008 * http://www.apache.org/licenses/LICENSE-2.1
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +09009 *
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
Jaesoo Lee812e85e2017-04-28 18:29:40 +090017#define LOG_TAG "android.hardware.configstore@1.1-service"
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090018
Jaesoo Lee812e85e2017-04-28 18:29:40 +090019#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
Jaesoo Lee2d66f612017-03-20 13:57:10 +090020#include <hidl/HidlTransportSupport.h>
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090021
Jaesoo Lee2d66f612017-03-20 13:57:10 +090022#include "SurfaceFlingerConfigs.h"
23
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090024using android::hardware::configureRpcThreadpool;
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090025using android::hardware::joinRpcThreadpool;
Jaesoo Lee812e85e2017-04-28 18:29:40 +090026using android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
27using android::hardware::configstore::V1_1::implementation::SurfaceFlingerConfigs;
Jaesoo Lee2d66f612017-03-20 13:57:10 +090028using android::sp;
Steven Morelandf88a9fe2017-03-19 14:38:20 -070029using android::status_t;
30using android::OK;
31
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090032int main() {
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090033 configureRpcThreadpool(10, true);
Steven Morelandf88a9fe2017-03-19 14:38:20 -070034
Jaesoo Lee2d66f612017-03-20 13:57:10 +090035 sp<ISurfaceFlingerConfigs> surfaceFlingerConfigs = new SurfaceFlingerConfigs;
36 status_t status = surfaceFlingerConfigs->registerAsService();
Steven Morelandf88a9fe2017-03-19 14:38:20 -070037 LOG_ALWAYS_FATAL_IF(status != OK, "Could not register ISurfaceFlingerConfigs");
38
Jiyong Parkc5d7c8a2017-01-14 19:40:33 +090039 // other interface registration comes here
40 joinRpcThreadpool();
41 return 0;
42}