blob: 2e19dc594db69f34558a5a89e34ee9e7e3bd51c3 [file] [log] [blame]
Tanmay Patilb2897b42020-06-08 17:55:02 -07001/*
2 * Copyright 2020 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#ifndef SURROUND_VIEW_SERVICE_IMPL_IOMODULE_H_
17#define SURROUND_VIEW_SERVICE_IMPL_IOMODULE_H_
18
19#include "IOModuleCommon.h"
20
21namespace android {
22namespace hardware {
23namespace automotive {
24namespace sv {
25namespace V1_0 {
26namespace implementation {
27
28// I/O Module class processing all I/O related operations.
29class IOModule {
30public:
31 // Constructor with file name( and path) of config file.
32 IOModule(const std::string& svConfigFile);
33
34 // Reads all config files and stores parsed results in mIOModuleConfig.
35 IOStatus initialize();
36
37 // Gets config data read from files. initialize must be called this.
38 bool getConfig(IOModuleConfig* ioModuleConfig);
39
40private:
41 // Config string filename.
42 std::string mSvConfigFile;
43
44 // Indicates initialize success/fail.
45 bool mIsInitialized;
46
47 // Stores the parsed config.
48 IOModuleConfig mIOModuleConfig;
49};
50
51} // namespace implementation
52} // namespace V1_0
53} // namespace sv
54} // namespace automotive
55} // namespace hardware
56} // namespace android
57#endif // SURROUND_VIEW_SERVICE_IMPL_IOMODULE_H_