blob: a945033839effaf667df30001deceeeed89cbcc0 [file] [log] [blame]
Yifan Hongc0263aa2018-08-08 17:50:48 -07001/*
2 * Copyright 2018 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#include <hidl/HidlTransportSupport.h>
18#include "Storage.h"
19
20using android::OK;
21using android::sp;
22using android::status_t;
23using android::UNKNOWN_ERROR;
24using android::hardware::configureRpcThreadpool;
25using android::hardware::joinRpcThreadpool;
26using android::hardware::health::storage::V1_0::IStorage;
27using android::hardware::health::storage::V1_0::implementation::Storage;
28
29int main() {
30 configureRpcThreadpool(1, true);
31
32 sp<IStorage> service = new Storage();
33 status_t result = service->registerAsService();
34
35 if (result != OK) {
36 return result;
37 }
38
39 joinRpcThreadpool();
40 return UNKNOWN_ERROR;
41}