提交 09ec800e 编写于 作者: S Simon Fels

Move all qemu stuff in the correct subdirectory/namespace

上级 3ccf1d04
......@@ -52,7 +52,6 @@ set(SOURCES
anbox/network/message_processor.h
anbox/network/connector.h
anbox/network/connection_creator.h
anbox/network/qemu_pipe_connection_creator.cpp
anbox/network/published_socket_connector.cpp
anbox/network/connections.h
anbox/network/socket_connection.cpp
......@@ -67,16 +66,17 @@ set(SOURCES
anbox/input/manager.cpp
anbox/input/device.cpp
anbox/support/null_message_processor.cpp
anbox/support/qemud_message_processor.cpp
anbox/support/boot_properties_message_processor.cpp
anbox/support/hwcontrol_message_processor.cpp
anbox/support/sensors_message_processor.cpp
anbox/support/camera_message_processor.cpp
anbox/support/fingerprint_message_processor.cpp
anbox/support/gsm_message_processor.cpp
anbox/support/at_parser.cpp
anbox/support/bootanimation_message_processor.cpp
anbox/qemu/pipe_connection_creator.cpp
anbox/qemu/null_message_processor.cpp
anbox/qemu/qemud_message_processor.cpp
anbox/qemu/boot_properties_message_processor.cpp
anbox/qemu/hwcontrol_message_processor.cpp
anbox/qemu/sensors_message_processor.cpp
anbox/qemu/camera_message_processor.cpp
anbox/qemu/fingerprint_message_processor.cpp
anbox/qemu/gsm_message_processor.cpp
anbox/qemu/at_parser.cpp
anbox/qemu/bootanimation_message_processor.cpp
anbox/bridge/constants.h
anbox/bridge/connection_creator.cpp
......
......@@ -27,7 +27,7 @@
#include "anbox/common/dispatcher.h"
#include "anbox/cmds/run.h"
#include "anbox/network/published_socket_connector.h"
#include "anbox/network/qemu_pipe_connection_creator.h"
#include "anbox/qemu/pipe_connection_creator.h"
#include "anbox/graphics/gl_renderer_server.h"
#include "anbox/input/manager.h"
#include "anbox/bridge/connection_creator.h"
......@@ -109,9 +109,9 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory)
auto qemu_pipe_connector = std::make_shared<network::PublishedSocketConnector>(
utils::string_format("%s/qemu_pipe", config::data_path()),
rt,
std::make_shared<network::QemuPipeConnectionCreator>(rt,
renderer->socket_path(),
icon_));
std::make_shared<qemu::PipeConnectionCreator>(rt,
renderer->socket_path(),
icon_));
auto android_api_stub = std::make_shared<bridge::AndroidApiStub>();
......
......@@ -19,7 +19,7 @@
#include "anbox/network/delegate_connection_creator.h"
#include "anbox/network/delegate_message_processor.h"
#include "anbox/network/socket_messenger.h"
#include "anbox/support/null_message_processor.h"
#include "anbox/qemu/null_message_processor.h"
#include "anbox/logger.h"
#include <time.h>
......@@ -163,7 +163,7 @@ void Device::new_client(std::shared_ptr<boost::asio::local::stream_protocol::soc
auto const messenger = std::make_shared<network::SocketMessenger>(socket);
auto const& connection = std::make_shared<network::SocketConnection>(
messenger, messenger, next_id(), connections_,
std::make_shared<support::NullMessageProcessor>());
std::make_shared<qemu::NullMessageProcessor>());
connections_->add(connection);
......
......@@ -15,12 +15,12 @@
*
*/
#include "anbox/support/at_parser.h"
#include "anbox/qemu//at_parser.h"
#include "anbox/utils.h"
#include "anbox/logger.h"
namespace anbox {
namespace support {
namespace qemu {
AtParser::AtParser() {
}
......@@ -70,5 +70,5 @@ void AtParser::processs_command(const std::string &command) {
handler(real_command);
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,8 +15,8 @@
*
*/
#ifndef ANBOX_SUPPORT_AT_PARSER_H_
#define ANBOX_SUPPORT_AT_PARSER_H_
#ifndef ANBOX_QEMU_AT_PARSER_H_
#define ANBOX_QEMU_AT_PARSER_H_
#include <vector>
#include <map>
......@@ -26,7 +26,7 @@
#include "anbox/do_not_copy_or_move.h"
namespace anbox {
namespace support {
namespace qemu {
class AtParser {
public:
typedef std::function<void(const std::string&)> CommandHandler;
......@@ -42,7 +42,7 @@ private:
std::map<std::string,CommandHandler> handlers_;
};
} // namespace support
} // namespace qemu
} // namespace anbox
#endif
......@@ -15,11 +15,11 @@
*
*/
#include "anbox/support/boot_properties_message_processor.h"
#include "anbox/qemu//boot_properties_message_processor.h"
#include "anbox/logger.h"
namespace anbox {
namespace support {
namespace qemu {
BootPropertiesMessageProcessor::BootPropertiesMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
QemudMessageProcessor(messenger) {
}
......@@ -74,5 +74,5 @@ void BootPropertiesMessageProcessor::list_properties() {
finish_message();
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_BOOT_PROPERTIES_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_BOOT_PROPERTIES_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_BOOT_PROPERTIES_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_BOOT_PROPERTIES_MESSAGE_PROCESSOR_H_
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu//qemud_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class BootPropertiesMessageProcessor : public QemudMessageProcessor {
public:
BootPropertiesMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -16,12 +16,12 @@
*/
#include "anbox/logger.h"
#include "anbox/support/bootanimation_message_processor.h"
#include "anbox/qemu//bootanimation_message_processor.h"
#include <fstream>
namespace anbox {
namespace support {
namespace qemu {
BootAnimationMessageProcessor::BootAnimationMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger,
const std::string &icon_path) :
QemudMessageProcessor(messenger),
......@@ -48,5 +48,5 @@ void BootAnimationMessageProcessor::retrieve_icon() {
}
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_BOOT_ANIMATION_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_BOOT_ANIMATION_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_BOOT_ANIMATION_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_BOOT_ANIMATION_MESSAGE_PROCESSOR_H_
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu//qemud_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class BootAnimationMessageProcessor : public QemudMessageProcessor {
public:
BootAnimationMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger,
......
......@@ -16,10 +16,10 @@
*/
#include "anbox/logger.h"
#include "anbox/support/camera_message_processor.h"
#include "anbox/qemu/camera_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
CameraMessageProcessor::CameraMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
messenger_(messenger) {
}
......@@ -65,5 +65,5 @@ void CameraMessageProcessor::list() {
snprintf(buf, 5, "\n");
messenger_->send(buf, strlen(buf));
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,14 +15,14 @@
*
*/
#ifndef ANBOX_SUPPORT_CAMERA_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_CAMERA_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_CAMERA_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_CAMERA_MESSAGE_PROCESSOR_H_
#include "anbox/network/message_processor.h"
#include "anbox/network/socket_messenger.h"
namespace anbox {
namespace support {
namespace qemu {
class CameraMessageProcessor : public network::MessageProcessor {
public:
CameraMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -16,10 +16,10 @@
*/
#include "anbox/logger.h"
#include "anbox/support/fingerprint_message_processor.h"
#include "anbox/qemu/fingerprint_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
FingerprintMessageProcessor::FingerprintMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
QemudMessageProcessor(messenger) {
}
......@@ -39,5 +39,5 @@ void FingerprintMessageProcessor::listen() {
messenger_->send(buf, strlen(buf));
finish_message();
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_FINGERPRINT_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_FINGERPRINT_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_FINGERPRINT_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_FINGERPRINT_MESSAGE_PROCESSOR_H_
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu/qemud_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class FingerprintMessageProcessor : public QemudMessageProcessor {
public:
FingerprintMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -16,8 +16,8 @@
*/
#include "anbox/logger.h"
#include "anbox/support/gsm_message_processor.h"
#include "anbox/support/at_parser.h"
#include "anbox/qemu/gsm_message_processor.h"
#include "anbox/qemu/at_parser.h"
#include <algorithm>
#include <functional>
......@@ -25,7 +25,7 @@
using namespace std::placeholders;
namespace anbox {
namespace support {
namespace qemu {
GsmMessageProcessor::GsmMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
messenger_(messenger),
parser_(std::make_shared<AtParser>()) {
......@@ -107,5 +107,5 @@ void GsmMessageProcessor::handle_cfun(const std::string &command) {
else if (utils::string_starts_with(command, "+CFUN="))
send_reply("");
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,14 +15,14 @@
*
*/
#ifndef ANBOX_SUPPORT_GSM_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_GSM_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_GSM_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_GSM_MESSAGE_PROCESSOR_H_
#include "anbox/network/message_processor.h"
#include "anbox/network/socket_messenger.h"
namespace anbox {
namespace support {
namespace qemu {
class AtParser;
class GsmMessageProcessor : public network::MessageProcessor {
public:
......
......@@ -15,11 +15,11 @@
*
*/
#include "anbox/support/hwcontrol_message_processor.h"
#include "anbox/qemu/hwcontrol_message_processor.h"
#include "anbox/logger.h"
namespace anbox {
namespace support {
namespace qemu {
HwControlMessageProcessor::HwControlMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
QemudMessageProcessor(messenger) {
}
......@@ -37,5 +37,5 @@ void HwControlMessageProcessor::handle_command(const std::string &command) {
else
DEBUG("Unknown command '%s'", command);
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_HWCONTROL_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_HWCONTROL_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_HWCONTROL_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_HWCONTROL_MESSAGE_PROCESSOR_H_
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu/qemud_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class HwControlMessageProcessor : public QemudMessageProcessor {
public:
HwControlMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -15,14 +15,14 @@
*
*/
#include "anbox/support/null_message_processor.h"
#include "anbox/qemu/null_message_processor.h"
#include "anbox/utils.h"
#include "anbox/logger.h"
#include <string.h>
namespace anbox {
namespace support {
namespace qemu {
NullMessageProcessor::NullMessageProcessor() {
}
......@@ -33,5 +33,5 @@ bool NullMessageProcessor::process_data(const std::vector<std::uint8_t> &data) {
DEBUG("Received: %s", utils::hex_dump(data.data(), data.size()));
return true;
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_NULL_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_NULL_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_NULL_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_NULL_MESSAGE_PROCESSOR_H_
#include "anbox/network/message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class NullMessageProcessor : public network::MessageProcessor {
public:
NullMessageProcessor();
......
......@@ -18,52 +18,52 @@
#include <string>
#include "anbox/logger.h"
#include "anbox/network/qemu_pipe_connection_creator.h"
#include "anbox/network/socket_messenger.h"
#include "anbox/graphics/opengles_message_processor.h"
#include "anbox/support/boot_properties_message_processor.h"
#include "anbox/support/null_message_processor.h"
#include "anbox/support/hwcontrol_message_processor.h"
#include "anbox/support/sensors_message_processor.h"
#include "anbox/support/camera_message_processor.h"
#include "anbox/support/fingerprint_message_processor.h"
#include "anbox/support/gsm_message_processor.h"
#include "anbox/support/bootanimation_message_processor.h"
#include "anbox/qemu/pipe_connection_creator.h"
#include "anbox/qemu/boot_properties_message_processor.h"
#include "anbox/qemu/null_message_processor.h"
#include "anbox/qemu/hwcontrol_message_processor.h"
#include "anbox/qemu/sensors_message_processor.h"
#include "anbox/qemu/camera_message_processor.h"
#include "anbox/qemu/fingerprint_message_processor.h"
#include "anbox/qemu/gsm_message_processor.h"
#include "anbox/qemu/bootanimation_message_processor.h"
namespace ba = boost::asio;
namespace anbox {
namespace network {
QemuPipeConnectionCreator::QemuPipeConnectionCreator(const std::shared_ptr<Runtime> &rt,
const std::string &renderer_socket_path,
const std::string &boot_animation_icon_path) :
namespace qemu {
PipeConnectionCreator::PipeConnectionCreator(const std::shared_ptr<Runtime> &rt,
const std::string &renderer_socket_path,
const std::string &boot_animation_icon_path) :
runtime_(rt),
next_connection_id_(0),
connections_(std::make_shared<Connections<SocketConnection>>()),
connections_(std::make_shared<network::Connections<network::SocketConnection>>()),
renderer_socket_path_(renderer_socket_path),
boot_animation_icon_path_(boot_animation_icon_path) {
}
QemuPipeConnectionCreator::~QemuPipeConnectionCreator() {
PipeConnectionCreator::~PipeConnectionCreator() {
}
void QemuPipeConnectionCreator::create_connection_for(
void PipeConnectionCreator::create_connection_for(
std::shared_ptr<boost::asio::local::stream_protocol::socket> const& socket) {
auto const messenger = std::make_shared<SocketMessenger>(socket);
auto const messenger = std::make_shared<network::SocketMessenger>(socket);
const auto type = identify_client(messenger);
auto const processor = create_processor(type, messenger);
if (!processor)
BOOST_THROW_EXCEPTION(std::runtime_error("Unhandled client type"));
auto const& connection = std::make_shared<SocketConnection>(
auto const& connection = std::make_shared<network::SocketConnection>(
messenger, messenger, next_id(), connections_, processor);
connections_->add(connection);
connection->read_next_message();
}
QemuPipeConnectionCreator::client_type QemuPipeConnectionCreator::identify_client(
std::shared_ptr<SocketMessenger> const& messenger) {
PipeConnectionCreator::client_type PipeConnectionCreator::identify_client(
std::shared_ptr<network::SocketMessenger> const& messenger) {
// The client will identify itself as first thing by writing a string
// in the format 'pipe:<name>[:<arguments>]\0' to the channel.
......@@ -104,31 +104,30 @@ QemuPipeConnectionCreator::client_type QemuPipeConnectionCreator::identify_clien
return client_type::invalid;
}
std::shared_ptr<MessageProcessor> QemuPipeConnectionCreator::create_processor(const client_type &type, const std::shared_ptr<SocketMessenger> &messenger) {
std::shared_ptr<network::MessageProcessor> PipeConnectionCreator::create_processor(const client_type &type, const std::shared_ptr<network::SocketMessenger> &messenger) {
if (type == client_type::opengles)
return std::make_shared<graphics::OpenGlesMessageProcessor>(renderer_socket_path_, runtime_, messenger);
else if (type == client_type::qemud_boot_properties)
return std::make_shared<support::BootPropertiesMessageProcessor>(messenger);
return std::make_shared<qemu::BootPropertiesMessageProcessor>(messenger);
else if (type == client_type::qemud_hw_control)
return std::make_shared<support::HwControlMessageProcessor>(messenger);
return std::make_shared<qemu::HwControlMessageProcessor>(messenger);
else if (type == client_type::qemud_sensors)
return std::make_shared<support::SensorsMessageProcessor>(messenger);
return std::make_shared<qemu::SensorsMessageProcessor>(messenger);
else if (type == client_type::qemud_camera)
return std::make_shared<support::CameraMessageProcessor>(messenger);
return std::make_shared<qemu::CameraMessageProcessor>(messenger);
else if (type == client_type::qemud_fingerprint)
return std::make_shared<support::FingerprintMessageProcessor>(messenger);
return std::make_shared<qemu::FingerprintMessageProcessor>(messenger);
else if (type == client_type::qemud_gsm)
return std::make_shared<support::GsmMessageProcessor>(messenger);
return std::make_shared<qemu::GsmMessageProcessor>(messenger);
else if (type == client_type::bootanimation)
return std::make_shared<support::BootAnimationMessageProcessor>(messenger, boot_animation_icon_path_);
return std::make_shared<qemu::BootAnimationMessageProcessor>(messenger, boot_animation_icon_path_);
return std::make_shared<support::NullMessageProcessor>();
return std::make_shared<qemu::NullMessageProcessor>();
}
int QemuPipeConnectionCreator::next_id()
int PipeConnectionCreator::next_id()
{
return next_connection_id_.fetch_add(1);
}
} // namespace qemu
} // namespace anbox
} // namespace network
......@@ -30,15 +30,14 @@
#include "anbox/network/socket_messenger.h"
namespace anbox {
namespace network {
class QemuPipeConnectionCreator : public ConnectionCreator {
namespace qemu {
class PipeConnectionCreator : public network::ConnectionCreator {
public:
QemuPipeConnectionCreator(
PipeConnectionCreator(
const std::shared_ptr<Runtime> &rt,
const std::string &renderer_socket_path,
const std::string &boot_animation_icon_path);
~QemuPipeConnectionCreator() noexcept;
~PipeConnectionCreator() noexcept;
void create_connection_for(
std::shared_ptr<boost::asio::local::stream_protocol::socket> const& socket) override;
......@@ -58,18 +57,18 @@ public:
private:
int next_id();
client_type identify_client(std::shared_ptr<SocketMessenger> const& messenger);
std::shared_ptr<MessageProcessor> create_processor(
const client_type &type, const std::shared_ptr<SocketMessenger> &messenger);
client_type identify_client(std::shared_ptr<network::SocketMessenger> const& messenger);
std::shared_ptr<network::MessageProcessor> create_processor(
const client_type &type, const std::shared_ptr<network::SocketMessenger> &messenger);
std::shared_ptr<Runtime> runtime_;
std::atomic<int> next_connection_id_;
std::shared_ptr<Connections<SocketConnection>> const connections_;
std::shared_ptr<network::Connections<network::SocketConnection>> const connections_;
std::string renderer_socket_path_;
std::string boot_animation_icon_path_;
};
} // namespace qemu
} // namespace anbox
} // namespace network
#endif
......@@ -15,7 +15,7 @@
*
*/
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu/qemud_message_processor.h"
#include "anbox/utils.h"
#include "anbox/logger.h"
......@@ -26,7 +26,7 @@ static constexpr const long header_size{4};
}
namespace anbox {
namespace support {
namespace qemu {
QemudMessageProcessor::QemudMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
messenger_(messenger) {
}
......@@ -83,5 +83,5 @@ void QemudMessageProcessor::finish_message() {
// Send terminating NULL byte
messenger_->send(static_cast<const char*>(""), 1);
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,14 +15,14 @@
*
*/
#ifndef ANBOX_SUPPORT_QEMUD_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_QEMUD_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_QEMUD_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_QEMUD_MESSAGE_PROCESSOR_H_
#include "anbox/network/message_processor.h"
#include "anbox/network/socket_messenger.h"
namespace anbox {
namespace support {
namespace qemu {
class QemudMessageProcessor : public network::MessageProcessor {
public:
QemudMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -16,10 +16,10 @@
*/
#include "anbox/logger.h"
#include "anbox/support/sensors_message_processor.h"
#include "anbox/qemu/sensors_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
SensorsMessageProcessor::SensorsMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger) :
QemudMessageProcessor(messenger) {
}
......@@ -42,5 +42,5 @@ void SensorsMessageProcessor::list_sensors() {
messenger_->send(buf, strlen(buf));
finish_message();
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,13 +15,13 @@
*
*/
#ifndef ANBOX_SUPPORT_SENSORS_MESSAGE_PROCESSOR_H_
#define ANBOX_SUPPORT_SENSORS_MESSAGE_PROCESSOR_H_
#ifndef ANBOX_QEMU_SENSORS_MESSAGE_PROCESSOR_H_
#define ANBOX_QEMU_SENSORS_MESSAGE_PROCESSOR_H_
#include "anbox/support/qemud_message_processor.h"
#include "anbox/qemu/qemud_message_processor.h"
namespace anbox {
namespace support {
namespace qemu {
class SensorsMessageProcessor : public QemudMessageProcessor {
public:
SensorsMessageProcessor(const std::shared_ptr<network::SocketMessenger> &messenger);
......
......@@ -15,12 +15,12 @@
*
*/
#include "anbox/support/telephony_manager.h"
#include "anbox/qemu/telephony_manager.h"
#include "anbox/dbus/ofono.h"
#include "anbox/logger.h"
namespace anbox {
namespace support {
namespace qemu {
TelephonyManager::TelephonyManager(const core::dbus::Bus::Ptr &bus) :
bus_(bus) {
ofono_ = core::dbus::Service::use_service(bus_, "org.ofono");
......@@ -34,5 +34,5 @@ TelephonyManager::TelephonyManager(const core::dbus::Bus::Ptr &bus) :
TelephonyManager::~TelephonyManager() {
}
} // namespace support
} // namespace qemu
} // namespace anbox
......@@ -15,15 +15,15 @@
*
*/
#ifndef ANBOX_SUPPORT_TELEPHONY_MANAGER_H_
#define ANBOX_SUPPORT_TELEPHONY_MANAGER_H_
#ifndef ANBOX_QEMU_TELEPHONY_MANAGER_H_
#define ANBOX_QEMU_TELEPHONY_MANAGER_H_
#include <core/dbus/bus.h>
#include <core/dbus/service.h>
#include <core/dbus/object.h>
namespace anbox {
namespace support {
namespace qemu {
class TelephonyManager {
public:
TelephonyManager(const core::dbus::Bus::Ptr &bus);
......@@ -34,7 +34,7 @@ private:
core::dbus::Service::Ptr ofono_;
core::dbus::Object::Ptr modem_;
};
} // namespace support
} // namespace qemu
} // namespace anbox
#endif
......@@ -15,14 +15,14 @@
*
*/
#include "anbox/support/at_parser.h"
#include "anbox/qemu/at_parser.h"
#include <gtest/gtest.h>
#include <algorithm>
TEST(AtParser, BasicCommands) {
anbox::support::AtParser parser;
anbox::qemu::AtParser parser;
std::string command = "ATE0Q0V1\nATE0Q0V1\n";
std::vector<uint8_t> data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册