xref: /aosp_15_r20/system/chre/host/tinysys/hal/tinysys_context_hub.h (revision 84e339476a462649f82315436d70fd732297a399)
1 /*
2  * Copyright (C) 2023 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 #ifndef ANDROID_HARDWARE_CONTEXTHUB_AIDL_CONTEXTHUB_H
18 #define ANDROID_HARDWARE_CONTEXTHUB_AIDL_CONTEXTHUB_H
19 
20 #include "chre_host/preloaded_nanoapp_loader.h"
21 #include "chre_host/time_syncer.h"
22 #include "multi_client_context_hub_base.h"
23 #include "tinysys_chre_connection.h"
24 
25 namespace aidl::android::hardware::contexthub {
26 
27 using namespace ::android::hardware::contexthub::common::implementation;
28 using namespace ::android::chre;
29 
30 /** The implementation of HAL for Tinysys. */
31 class TinysysContextHub : public MultiClientContextHubBase {
32  public:
33   TinysysContextHub();
34 
35  protected:
36   void onChreRestarted() override;
37   const std::string kPreloadedNanoappsConfigPath =
38       "/vendor/etc/chre/preloaded_nanoapps.json";
39   const std::string kClientIdMappingFilePath =
40       "/data/vendor/chre/chre_hal_clients.json";
41 };
42 }  // namespace aidl::android::hardware::contexthub
43 #endif  // ANDROID_HARDWARE_CONTEXTHUB_AIDL_CONTEXTHUB_H
44