RetroArch
database_info.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  * Copyright (C) 2016-2017 - Brad Parker
5  *
6  * RetroArch is free software: you can redistribute it and/or modify it under the terms
7  * of the GNU General Public License as published by the Free Software Found-
8  * ation, either version 3 of the License, or (at your option) any later version.
9  *
10  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  * PURPOSE. See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with RetroArch.
15  * If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef DATABASE_INFO_H_
19 #define DATABASE_INFO_H_
20 
21 #include <stdint.h>
22 #include <stddef.h>
23 
24 #include <file/archive_file.h>
25 #include <retro_common_api.h>
26 #include <queues/task_queue.h>
27 
29 
31 {
38 };
39 
41 {
48 };
49 
51 {
71 };
72 
73 typedef struct
74 {
75  enum database_status status;
77  size_t list_ptr;
78  struct string_list *list;
81 
82 typedef struct
83 {
88  unsigned size;
92  unsigned max_users;
93  unsigned releasemonth;
94  unsigned releaseyear;
95  unsigned tgdb_rating;
96  char *name;
97  char *rom_name;
98  char *serial;
99  char *description;
100  char *genre;
101  char *publisher;
103  char *origin;
104  char *franchise;
106  char *bbfc_rating;
108  char *esrb_rating;
109  char *pegi_rating;
110  char *cero_rating;
112  char *sha1;
113  char *md5;
114  void *userdata;
116 
117 typedef struct
118 {
119  size_t count;
122 
123 database_info_list_t *database_info_list_new(const char *rdb_path,
124  const char *query);
125 
127 
129  enum database_type type, retro_task_t *task,
130  bool show_hidden_files);
131 
133  enum database_type type, retro_task_t *task);
134 
136 
138  char *query, size_t len, enum database_query_type type, const char *path);
139 
140 /* NOTE: Allocates memory, it is the caller's responsibility to free the
141  * memory after it is no longer required. */
142 char *bin_to_hex_alloc(const uint8_t *data, size_t len);
143 
145 
146 #endif /* CORE_INFO_H_ */
char * edge_magazine_review
Definition: database_info.h:105
char * sha1
Definition: database_info.h:112
Definition: database_info.h:52
Definition: database_info.h:32
unsigned max_users
Definition: database_info.h:92
char * genre
Definition: database_info.h:100
void database_info_list_free(database_info_list_t *list)
Definition: database_info.c:542
Definition: database_info.h:43
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
char * serial
Definition: database_info.h:98
char * rom_name
Definition: database_info.h:97
Definition: database_info.h:44
Definition: database_info.h:67
Definition: database_info.h:63
char * origin
Definition: database_info.h:103
database_query_type
Definition: database_info.h:50
char * cero_rating
Definition: database_info.h:110
database_info_t * list
Definition: database_info.h:120
GLsizei const GLchar ** path
Definition: glext.h:7901
struct string_list * list
Definition: database_info.h:78
GLenum GLsizei len
Definition: glext.h:7389
int coop_supported
Definition: database_info.h:86
Definition: database_info.h:54
Definition: database_info.h:62
Definition: database_info.h:34
Definition: database_info.h:65
char * bbfc_rating
Definition: database_info.h:106
size_t list_ptr
Definition: database_info.h:77
Definition: ibxm.h:9
Definition: database_info.h:70
uint32_t crc32
Definition: database_info.h:87
Definition: database_info.h:45
char * bin_to_hex_alloc(const uint8_t *data, size_t len)
Definition: database_info.c:138
int rumble_supported
Definition: database_info.h:85
char * md5
Definition: database_info.h:113
database_status
Definition: database_info.h:30
Definition: database_info.h:69
char * description
Definition: database_info.h:99
database_type
Definition: database_info.h:40
int analog_supported
Definition: database_info.h:84
GLenum type
Definition: glext.h:6233
unsigned releasemonth
Definition: database_info.h:93
void * userdata
Definition: database_info.h:114
Definition: database_info.h:35
Definition: database_info.h:66
Definition: database_info.h:117
Definition: archive_file.h:63
unsigned edge_magazine_issue
Definition: database_info.h:91
char * publisher
Definition: database_info.h:101
Definition: database_info.h:53
Definition: database_info.h:58
Definition: task_queue.h:67
Definition: database_info.h:46
char * pegi_rating
Definition: database_info.h:109
Definition: database_info.h:60
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
int database_info_build_query_enum(char *query, size_t len, enum database_query_type type, const char *path)
Definition: database_info.c:34
static bool show_hidden_files
Definition: config.def.h:261
size_t count
Definition: database_info.h:119
char * franchise
Definition: database_info.h:104
Definition: database_info.h:42
unsigned edge_magazine_rating
Definition: database_info.h:90
unsigned famitsu_magazine_rating
Definition: database_info.h:89
unsigned tgdb_rating
Definition: database_info.h:95
database_info_list_t * database_info_list_new(const char *rdb_path, const char *query)
Definition: database_info.c:443
Definition: database_info.h:68
Definition: database_info.h:47
Definition: database_info.h:59
char * elspa_rating
Definition: database_info.h:107
Definition: query.c:81
Definition: database_info.h:82
unsigned releaseyear
Definition: database_info.h:94
Definition: database_info.h:55
Definition: database_info.h:36
Definition: database_info.h:37
Definition: database_info.h:33
char * esrb_rating
Definition: database_info.h:108
Definition: database_info.h:57
unsigned size
Definition: database_info.h:88
Definition: database_info.h:56
char * enhancement_hw
Definition: database_info.h:111
Definition: database_info.h:73
unsigned char uint8_t
Definition: stdint.h:124
Definition: database_info.h:64
unsigned int uint32_t
Definition: stdint.h:126
Definition: database_info.h:61
file_archive_transfer_t state
Definition: database_info.h:79
struct string_list * developer
Definition: database_info.h:102
Definition: string_list.h:47
database_info_handle_t * database_info_file_init(const char *path, enum database_type type, retro_task_t *task)
Definition: database_info.c:404
void database_info_free(database_info_handle_t *handle)
Definition: database_info.c:435
database_info_handle_t * database_info_dir_init(const char *dir, enum database_type type, retro_task_t *task, bool show_hidden_files)
Definition: database_info.c:370
char * name
Definition: database_info.h:96