blob: 839e8030eaec5415d91957386eac21ac95952237 [file] [log] [blame]
David Zeuthenc75ac312019-10-28 13:16:45 -04001/*
2 * Copyright 2019, 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#define LOG_TAG "android.hardware.identity@1.0-service"
18
19#include <android-base/logging.h>
20#include <hidl/HidlTransportSupport.h>
21
22#include "IdentityCredentialStore.h"
23
24using android::hardware::joinRpcThreadpool;
25using android::hardware::identity::implementation::IdentityCredentialStore;
26
27int main(int /* argc */, char* argv[]) {
28 ::android::hardware::configureRpcThreadpool(1, true /*willJoinThreadpool*/);
29
30 ::android::base::InitLogging(argv, &android::base::StderrLogger);
31
32 auto identity_store = new IdentityCredentialStore();
33 auto status = identity_store->registerAsService();
34 if (status != android::OK) {
35 LOG(FATAL) << "Could not register service for IdentityCredentialStore 1.0 (" << status
36 << ")";
37 }
38 joinRpcThreadpool();
39 return -1; // Should never get here.
40}