1 /*
2  * Copyright (C) 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 
17 #pragma once
18 
19 #include <string>
20 #include <fstream>
21 
22 // this file provide a few device (cvd or emulator) specific hooks for
23 // modem-simulator
24 
25 namespace cuttlefish {
26 namespace modem {
27 
28 class DeviceConfig {
29  public:
30   static int host_id();
31   static std::string PerInstancePath(const char* file_name);
32   static std::string DefaultHostArtifactsPath(const std::string& file);
33   static std::string ril_address_and_prefix();
34   static std::string ril_gateway();
35   static std::string ril_dns();
36   static std::ifstream open_ifstream_crossplat(const char* filename);
37   static std::ofstream open_ofstream_crossplat(const char* filename, std::ios_base::openmode mode = std::ios_base::out);
38 };
39 
40 }  // namespace modem
41 }  // namespace cuttlefish
42