RetroArch
tasks_internal.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2017 - Higor Euripedes
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 #ifndef TASKS_HANDLER_INTERNAL_H
17 #define TASKS_HANDLER_INTERNAL_H
18 
19 #include <stdint.h>
20 
21 #include <boolean.h>
22 #include <retro_common_api.h>
23 #include <retro_miscellaneous.h>
24 
25 #include <queues/message_queue.h>
26 #include <queues/task_queue.h>
27 
28 #ifdef HAVE_CONFIG_H
29 #include "../config.h"
30 #endif
31 
32 #include "../content.h"
33 #include "../core_type.h"
34 #include "../msg_hash.h"
35 
37 
38 typedef int (*transfer_cb_t)(void *data, size_t len);
39 
41 {
46 };
47 
49 {
54 };
55 
57 {
60 };
61 
63 {
74 };
75 
76 typedef struct nbio_handle
77 {
80  unsigned status;
81  unsigned pos_increment;
83  void *data;
84  char *path;
85  struct nbio_t *handle;
89 
90 typedef struct
91 {
92  enum msg_hash_enums enum_idx;
95 
96 #ifdef HAVE_NETWORKING
97 typedef struct
98 {
99  char *data;
100  size_t len;
101 } http_transfer_data_t;
102 
103 void *task_push_http_transfer(const char *url, bool mute, const char *type,
104  retro_task_callback_t cb, void *userdata);
105 
106 void *task_push_http_post_transfer(const char *url, const char *post_data, bool mute, const char *type,
107  retro_task_callback_t cb, void *userdata);
108 
110 
112 
114 
116  const char *hostname, const char *corename);
117 
119 
120 bool task_push_netplay_nat_traversal(void *nat_traversal_state, uint16_t port);
121 
122 #endif
123 
124 bool task_push_image_load(const char *fullpath,
125  retro_task_callback_t cb, void *userdata);
126 
127 #ifdef HAVE_LIBRETRODB
128 bool task_push_dbscan(
129  const char *playlist_directory,
130  const char *content_database,
131  const char *fullpath,
132  bool directory, bool show_hidden_files,
134 #endif
135 
136 #ifdef HAVE_OVERLAY
138  retro_task_callback_t cb, void *user_data);
139 #endif
140 
141 bool task_check_decompress(const char *source_file);
142 
144  const char *source_file,
145  const char *target_dir,
146  const char *target_file,
147  const char *subdir,
148  const char *valid_ext,
150  void *user_data);
151 
153  const char *fullpath,
154  content_ctx_info_t *content_info,
155  enum rarch_core_type type,
157  void *user_data);
158 
160  const char *core_path,
161  const char *fullpath,
162  content_ctx_info_t *content_info,
163  enum rarch_core_type type,
165  void *user_data);
166 
168  const char *core_path,
169  const char *fullpath,
170  content_ctx_info_t *content_info,
171  enum rarch_core_type type,
173  void *user_data);
174 
176  enum rarch_core_type type,
178  void *user_data);
179 
181 
183 
185  const char *core_path,
186  const char *fullpath,
187  content_ctx_info_t *content_info,
189  void *user_data);
190 
191 #ifdef HAVE_MENU
192 bool task_push_load_content_with_new_core_from_menu(
193  const char *core_path,
194  const char *fullpath,
195  content_ctx_info_t *content_info,
196  enum rarch_core_type type,
198  void *user_data);
199 
200 bool task_push_load_content_from_playlist_from_menu(
201  const char *core_path,
202  const char *fullpath,
203  const char *label,
204  content_ctx_info_t *content_info,
206  void *user_data);
207 
208 bool task_push_load_content_with_core_from_menu(
209  const char *fullpath,
210  content_ctx_info_t *content_info,
211  enum rarch_core_type type,
213  void *user_data);
214 bool task_push_load_subsystem_with_core_from_menu(
215  const char *fullpath,
216  content_ctx_info_t *content_info,
217  enum rarch_core_type type,
219  void *user_data);
220 #endif
221 
223 
225 
226 bool take_screenshot(const char *path, bool silence, bool has_valid_framebuffer, bool fullpath, bool use_thread);
227 
228 bool event_load_save_files(void);
229 
230 bool event_save_files(void);
231 
232 void path_init_savefile_rtc(const char *savefile_path);
233 
234 void *savefile_ptr_get(void);
235 
236 void path_init_savefile_new(void);
237 
238 bool input_is_autoconfigured(unsigned i);
239 
240 unsigned input_autoconfigure_get_device_name_index(unsigned i);
241 
242 void input_autoconfigure_reset(void);
243 
245  const char *name,
246  const char *display_name,
247  const char *driver,
248  unsigned idx,
249  unsigned vid,
250  unsigned pid);
251 
252 bool input_autoconfigure_disconnect(unsigned i, const char *ident);
253 
255 
257 
258 void task_push_get_powerstate(void);
259 
260 enum frontend_powerstate get_last_powerstate(int *percent);
261 
263  const char *fullpath, retro_task_callback_t cb, void *user_data);
264 
266  const char *fullpath, retro_task_callback_t cb, void *user_data);
267 
269 
270 extern const char* const input_builtin_autoconfs[];
271 
272 
274 
275 #endif
enum frontend_powerstate get_last_powerstate(int *percent)
Definition: task_powerstate.c:33
rarch_core_type
Definition: core_type.h:19
GLuint const GLchar * name
Definition: glext.h:6671
Definition: tasks_internal.h:50
bool task_push_load_content_with_new_core_from_companion_ui(const char *core_path, const char *fullpath, content_ctx_info_t *content_info, retro_task_callback_t cb, void *user_data)
Definition: task_content.c:1602
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
bool task_push_wifi_scan(retro_task_callback_t cb)
Definition: task_wifi.c:37
unsigned status
Definition: tasks_internal.h:80
Definition: tasks_internal.h:73
Definition: tasks_internal.h:71
struct nbio_handle nbio_handle_t
Definition: tasks_internal.h:72
Definition: task_queue.h:123
GLsizei const GLchar ** path
Definition: glext.h:7901
Definition: tasks_internal.h:76
GLenum GLsizei len
Definition: glext.h:7389
bool input_autoconfigure_disconnect(unsigned i, const char *ident)
Definition: task_autodetect.c:911
bool task_push_load_content_from_cli(const char *core_path, const char *fullpath, content_ctx_info_t *content_info, enum rarch_core_type type, retro_task_callback_t cb, void *user_data)
Definition: task_content.c:1630
unsigned pos_increment
Definition: tasks_internal.h:81
bool take_screenshot(const char *path, bool silence, bool has_valid_framebuffer, bool fullpath, bool use_thread)
Definition: task_screenshot.c:402
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on Download All Thumbnails This Playlist Configured in port
Definition: msg_hash_us.h:7699
bool event_load_save_files(void)
Definition: task_save.c:1535
Definition: tasks_internal.h:64
const char *const input_builtin_autoconfs[]
Definition: input_autodetect_builtin.c:634
transfer_cb_t cb
Definition: tasks_internal.h:87
nbio_type
Definition: tasks_internal.h:62
Definition: tasks_internal.h:42
Definition: tasks_internal.h:69
#define PATH_MAX_LENGTH
Definition: retro_miscellaneous.h:83
Definition: tasks_internal.h:65
void * task_push_http_transfer(const char *url, bool mute, const char *type, retro_task_callback_t cb, void *user_data)
Definition: task_http.c:330
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
bool is_finished
Definition: tasks_internal.h:79
GLuint GLsizei const GLchar * label
Definition: glext.h:8583
bool task_push_decompress(const char *source_file, const char *target_dir, const char *target_file, const char *subdir, const char *valid_ext, retro_task_callback_t cb, void *user_data)
Definition: task_decompress.c:268
task_retriever_info_t * http_task_get_transfer_list(void)
Definition: task_http.c:353
bool task_push_load_new_core(const char *core_path, const char *fullpath, content_ctx_info_t *content_info, enum rarch_core_type type, retro_task_callback_t cb, void *user_data)
Definition: task_content.c:1361
bool task_push_netplay_lan_scan(retro_task_callback_t cb)
Definition: task_netplay_lan_scan.c:46
void * savefile_ptr_get(void)
Definition: task_save.c:1583
Definition: tasks_internal.h:67
GLenum type
Definition: glext.h:6233
nbio_status_flags
Definition: tasks_internal.h:56
bool event_save_files(void)
Definition: task_save.c:1520
Definition: tasks_internal.h:70
msg_queue_t * msg_queue
Definition: tasks_internal.h:86
bool input_is_autoconfigured(unsigned i)
Definition: task_autodetect.c:972
typedefRETRO_BEGIN_DECLS struct msg_queue msg_queue_t
Definition: message_queue.h:32
void(* retro_task_callback_t)(void *task_data, void *user_data, const char *error)
Definition: task_queue.h:47
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
bool task_push_start_dummy_core(content_ctx_info_t *content_info)
Definition: task_content.c:1072
void task_file_load_handler(retro_task_t *task)
Definition: task_file_transfer.c:59
bool task_push_start_builtin_core(content_ctx_info_t *content_info, enum rarch_core_type type, retro_task_callback_t cb, void *user_data)
Definition: task_content.c:1645
bool input_autoconfigure_connect(const char *name, const char *display_name, const char *driver, unsigned idx, unsigned vid, unsigned pid)
Definition: task_autodetect.c:982
bool task_push_overlay_load_default(retro_task_callback_t cb, void *user_data)
Definition: task_overlay.c:729
unsigned input_autoconfigure_get_device_name_index(unsigned i)
Definition: task_autodetect.c:977
bool task_push_start_current_core(content_ctx_info_t *content_info)
Definition: task_content.c:1265
Definition: task_queue.h:67
Definition: tasks_internal.h:90
Definition: tasks_internal.h:52
enum nbio_type type
Definition: tasks_internal.h:78
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 idx
Definition: pixman-arm-neon-asm.h:96
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
RETRO_BEGIN_DECLS struct content_ctx_info content_ctx_info_t
Definition: tasks_internal.h:51
bool task_push_netplay_nat_traversal(void *nat_traversal_state, uint16_t port)
Definition: task_netplay_nat_traversal.c:64
static bool show_hidden_files
Definition: config.def.h:261
void * data
Definition: tasks_internal.h:83
frontend_powerstate
Definition: frontend_driver.h:29
struct nbio_t * handle
Definition: tasks_internal.h:85
msg_hash_enums
Definition: msg_hash.h:152
void path_init_savefile_new(void)
Definition: task_save.c:1577
void task_push_get_powerstate(void)
Definition: task_powerstate.c:67
bool task_audio_mixer_load_handler(retro_task_t *task)
Definition: task_audio_mixer.c:345
bool task_check_decompress(const char *source_file)
Definition: task_decompress.c:256
nbio_status_enum
Definition: tasks_internal.h:48
uint32_t status_flags
Definition: tasks_internal.h:82
Definition: tasks_internal.h:66
void path_init_savefile_rtc(const char *savefile_path)
Definition: task_save.c:1549
Definition: tasks_internal.h:58
bool task_push_load_content_with_current_core_from_companion_ui(const char *fullpath, content_ctx_info_t *content_info, enum rarch_core_type type, retro_task_callback_t cb, void *user_data)
Definition: task_content.c:1673
void * task_push_http_post_transfer(const char *url, const char *post_data, bool mute, const char *type, retro_task_callback_t cb, void *user_data)
Definition: task_http.c:341
Definition: tasks_internal.h:53
bool task_push_audio_mixer_load_and_play(const char *fullpath, retro_task_callback_t cb, void *user_data)
Definition: task_audio_mixer.c:377
content_mode_load
Definition: tasks_internal.h:40
RETRO_BEGIN_DECLS typedef int(* transfer_cb_t)(void *data, size_t len)
Definition: tasks_internal.h:38
void set_save_state_in_background(bool state)
Definition: task_save.c:1588
void input_autoconfigure_reset(void)
Definition: task_autodetect.c:954
bool input_autoconfigure_get_swap_override(void)
Definition: task_autodetect.c:122
bool task_push_netplay_crc_scan(uint32_t crc, char *name, const char *hostname, const char *core_name)
Definition: task_netplay_find_content.c:318
void input_autoconfigure_joypad_reindex_devices(void)
Definition: task_autodetect.c:129
bool task_push_dbscan(const char *playlist_directory, const char *content_database, const char *fullpath, bool directory, bool show_hidden_files, retro_task_callback_t cb)
Definition: task_database.c:1309
bool task_push_image_load(const char *fullpath, retro_task_callback_t cb, void *userdata)
Definition: task_image.c:289
bool task_push_netplay_lan_scan_rooms(retro_task_callback_t cb)
Definition: task_netplay_lan_scan.c:63
unsigned short uint16_t
Definition: stdint.h:125
unsigned int uint32_t
Definition: stdint.h:126
Definition: tasks_internal.h:59
Definition: tasks_internal.h:68
char * path
Definition: tasks_internal.h:84
bool task_push_audio_mixer_load(const char *fullpath, retro_task_callback_t cb, void *user_data)
Definition: task_audio_mixer.c:470