Remove http related header pollution (#9201)

* Remove http related header polution

* remove now invalid message

* fixed issued detected by clang

* Fixed CR at EOF
This commit is contained in:
Miodrag Milanović 2022-01-26 13:21:02 +01:00 committed by GitHub
parent 3e20b5d5ad
commit ba918b59fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 11 deletions

View File

@ -34,9 +34,6 @@
#include "attotime.h"
#include "profiler.h"
// http interface helpers
#include "http.h"
// commonly-referenced utilities imported from lib/util
#include "corealloc.h"
#include "palette.h"

View File

@ -152,6 +152,9 @@ class memory_view;
// declared in emuopts.h
class emu_options;
// declared in http.h
class http_manager;
// declared in gamedrv.h
class game_driver;

View File

@ -9,6 +9,9 @@
***************************************************************************/
#include "emu.h"
#include "http.h"
#include "server_http.hpp"
#include "server_ws.hpp"
#ifdef __sun
#define ASIO_DISABLE_DEV_POLL

View File

@ -10,18 +10,12 @@
#pragma once
#ifndef __EMU_H__
#error Dont include this file directly; include emu.h instead.
#endif
#ifndef MAME_EMU_HTTP_H
#define MAME_EMU_HTTP_H
#include <mutex>
#include <thread>
#include <ctime>
#include "server_http.hpp"
#include "server_ws.hpp"
//**************************************************************************
// TYPE DEFINITIONS
@ -33,6 +27,13 @@ namespace asio
class io_context;
}
namespace webpp
{
class http_server;
class ws_server;
struct Connection;
}
class http_manager
{
DISABLE_COPYING(http_manager);

View File

@ -26,6 +26,7 @@
#include "tilemap.h"
#include "natkeyboard.h"
#include "ui/uimain.h"
#include "http.h"
#include "corestr.h"
#include "unzip.h"

View File

@ -10,6 +10,7 @@
#include "emu.h"
#include "emuopts.h"
#include "http.h"
machine_manager::machine_manager(emu_options& options, osd_interface& osd)
: m_osd(osd),
@ -18,8 +19,17 @@ machine_manager::machine_manager(emu_options& options, osd_interface& osd)
{
}
machine_manager::~machine_manager()
{
}
void machine_manager::start_http_server()
{
m_http = std::make_unique<http_manager>(options().http(), options().http_port(), options().http_root());
}
http_manager *machine_manager::http()
{
return m_http.get();
}

View File

@ -71,7 +71,7 @@ protected:
// construction/destruction
machine_manager(emu_options& options, osd_interface& osd);
public:
virtual ~machine_manager() { }
virtual ~machine_manager();
osd_interface &osd() const { return m_osd; }
emu_options &options() const { return m_options; }
@ -88,7 +88,7 @@ public:
virtual void update_machine() { }
http_manager *http() { return m_http.get(); }
http_manager *http();
void start_http_server();
protected:

View File

@ -40,6 +40,7 @@
#include <set>
#include <tuple>
#include <cctype>
#include <iostream>
//**************************************************************************

View File

@ -4,6 +4,7 @@
Ensoniq panel/display device
*/
#include "emu.h"
#include "http.h"
#include "esqpanel.h"
#define ESQPANEL_EXTERNAL_TIMER_ID 47000

View File

@ -10,6 +10,7 @@
#pragma once
#include <mutex>
/***************************************************************************
DEVICE INTERFACE TYPE