Android-cuttlefish cvd tool
device_config.h
Go to the documentation of this file.
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
25namespace cuttlefish {
26namespace modem {
27
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
Definition: device_config.h:28
static std::string DefaultHostArtifactsPath(const std::string &file)
Definition: cf_device_config.cpp:42
static std::string ril_address_and_prefix()
Definition: cf_device_config.cpp:46
static int host_id()
Definition: cf_device_config.cpp:24
static std::ifstream open_ifstream_crossplat(const char *filename)
Definition: cf_device_config.cpp:64
static std::string PerInstancePath(const char *file_name)
Definition: cf_device_config.cpp:33
static std::string ril_dns()
Definition: cf_device_config.cpp:58
static std::ofstream open_ofstream_crossplat(const char *filename, std::ios_base::openmode mode=std::ios_base::out)
Definition: cf_device_config.cpp:68
static std::string ril_gateway()
Definition: cf_device_config.cpp:52
Definition: alloc_utils.cpp:23