Some header include changes - create task_file_transfer.h

This commit is contained in:
twinaphex 2019-01-20 02:17:43 +01:00
parent 9bb7132b97
commit 0083e10926
11 changed files with 83 additions and 44 deletions

View File

@ -31,6 +31,7 @@
#include "../verbosity.h"
#include "../msg_hash.h"
#include "../tasks/task_file_transfer.h"
#ifdef HAVE_NETWORKING
#include "../../network/netplay/netplay.h"

View File

@ -57,6 +57,7 @@
#include "../../defaults.h"
#include "../../managers/core_option_manager.h"
#include "../../managers/cheat_manager.h"
#include "../../tasks/task_file_transfer.h"
#include "../../tasks/tasks_internal.h"
#include "../../input/input_remapping.h"
#include "../../paths.h"

View File

@ -39,6 +39,7 @@
#include "../configuration.h"
#include "../file_path_special.h"
#include "../msg_hash.h"
#include "../tasks/task_file_transfer.h"
#include "../tasks/tasks_internal.h"
void print_buf_lines(file_list_t *list, char *buf,

View File

@ -32,6 +32,7 @@
#include "../file_path_special.h"
#include "../verbosity.h"
#include "task_file_transfer.h"
#include "tasks_internal.h"
typedef struct nbio_buf

View File

@ -21,6 +21,7 @@
#include <string/stdstring.h>
#include "task_file_transfer.h"
#include "tasks_internal.h"
#include "../verbosity.h"

View File

@ -0,0 +1,73 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TASKS_FILE_TRANSFER_H
#define TASKS_FILE_TRANSFER_H
#include <boolean.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
#include <queues/message_queue.h>
#include "../msg_hash.h"
RETRO_BEGIN_DECLS
enum nbio_type
{
NBIO_TYPE_NONE = 0,
NBIO_TYPE_JPEG,
NBIO_TYPE_PNG,
NBIO_TYPE_TGA,
NBIO_TYPE_BMP,
NBIO_TYPE_OGG,
NBIO_TYPE_FLAC,
NBIO_TYPE_MP3,
NBIO_TYPE_MOD,
NBIO_TYPE_WAV
};
enum nbio_status_flags
{
NBIO_FLAG_NONE = 0,
NBIO_FLAG_IMAGE_SUPPORTS_RGBA
};
typedef int (*transfer_cb_t)(void *data, size_t len);
typedef struct nbio_handle
{
enum nbio_type type;
bool is_finished;
unsigned status;
unsigned pos_increment;
uint32_t status_flags;
void *data;
char *path;
struct nbio_t *handle;
msg_queue_t *msg_queue;
transfer_cb_t cb;
} nbio_handle_t;
typedef struct
{
enum msg_hash_enums enum_idx;
char path[PATH_MAX_LENGTH];
} file_transfer_t;
RETRO_END_DECLS
#endif

View File

@ -24,6 +24,7 @@
#include "../verbosity.h"
#include "../gfx/video_display_server.h"
#include "task_file_transfer.h"
#include "tasks_internal.h"
enum http_status_enum

View File

@ -28,6 +28,7 @@
#include "../file_path_special.h"
#include "../verbosity.h"
#include "task_file_transfer.h"
#include "tasks_internal.h"
enum image_status_enum

View File

@ -18,6 +18,7 @@
#include <string/stdstring.h>
#include "../paths.h"
#include "task_file_transfer.h"
#include "tasks_internal.h"
#ifdef HAVE_CONFIG_H

View File

@ -21,6 +21,8 @@
#include <string/stdstring.h>
#include "tasks_internal.h"
#include "../msg_hash.h"
#include "../verbosity.h"
#include "../wifi/wifi_driver.h"

View File

@ -22,7 +22,6 @@
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
#include <queues/message_queue.h>
#include <queues/task_queue.h>
#ifdef HAVE_CONFIG_H
@ -33,12 +32,9 @@
#include "../content.h"
#include "../core_type.h"
#include "../msg_hash.h"
RETRO_BEGIN_DECLS
typedef int (*transfer_cb_t)(void *data, size_t len);
enum content_mode_load
{
CONTENT_MODE_LOAD_NONE = 0,
@ -55,46 +51,6 @@ enum nbio_status_enum
NBIO_STATUS_TRANSFER_FINISHED
};
enum nbio_status_flags
{
NBIO_FLAG_NONE = 0,
NBIO_FLAG_IMAGE_SUPPORTS_RGBA
};
enum nbio_type
{
NBIO_TYPE_NONE = 0,
NBIO_TYPE_JPEG,
NBIO_TYPE_PNG,
NBIO_TYPE_TGA,
NBIO_TYPE_BMP,
NBIO_TYPE_OGG,
NBIO_TYPE_FLAC,
NBIO_TYPE_MP3,
NBIO_TYPE_MOD,
NBIO_TYPE_WAV
};
typedef struct nbio_handle
{
enum nbio_type type;
bool is_finished;
unsigned status;
unsigned pos_increment;
uint32_t status_flags;
void *data;
char *path;
struct nbio_t *handle;
msg_queue_t *msg_queue;
transfer_cb_t cb;
} nbio_handle_t;
typedef struct
{
enum msg_hash_enums enum_idx;
char path[PATH_MAX_LENGTH];
} file_transfer_t;
#ifdef HAVE_NETWORKING
typedef struct
{