diff options
author | 2021-08-22 09:06:15 +1000 | |
---|---|---|
committer | 2021-08-22 09:06:15 +1000 | |
commit | e8bbea1fc6e94e14768509d322f6c624403ffb36 (patch) | |
tree | 74dd1606a900d83de8aecff17a6737af4113308d /src/osd/modules/file/winfile.h | |
parent | e319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff) |
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter.
unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename.
Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums.
Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/osd/modules/file/winfile.h')
-rw-r--r-- | src/osd/modules/file/winfile.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/osd/modules/file/winfile.h b/src/osd/modules/file/winfile.h index 927cb299545..83f0814733d 100644 --- a/src/osd/modules/file/winfile.h +++ b/src/osd/modules/file/winfile.h @@ -5,13 +5,16 @@ // winfile.h - File access functions // //============================================================ -#ifndef MAME_OSD_WINDOWS_WINFILE_H -#define MAME_OSD_WINDOWS_WINFILE_H +#ifndef MAME_OSD_MODULES_FILE_WINFILE_H +#define MAME_OSD_MODULES_FILE_WINFILE_H + +#pragma once #include "osdfile.h" #include <cstdint> #include <string> +#include <system_error> #include <winsock2.h> @@ -20,15 +23,15 @@ // PROTOTYPES //============================================================ -bool win_init_sockets(); -void win_cleanup_sockets(); +bool win_init_sockets() noexcept; +void win_cleanup_sockets() noexcept; -bool win_check_socket_path(std::string const &path); -osd_file::error win_open_socket(std::string const &path, std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize); +bool win_check_socket_path(std::string const &path) noexcept; +std::error_condition win_open_socket(std::string const &path, std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize) noexcept; -bool win_check_ptty_path(std::string const &path); -osd_file::error win_open_ptty(std::string const &path, std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize); +bool win_check_ptty_path(std::string const &path) noexcept; +std::error_condition win_open_ptty(std::string const &path, std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize) noexcept; -osd_file::error win_error_to_file_error(DWORD error); +std::error_condition win_error_to_file_error(DWORD error) noexcept; -#endif // MAME_OSD_WINDOWS_WINFILE_H +#endif // MAME_OSD_MODULES_FILE_WINFILE_H |