RetroArch
parser.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2015-2018 - Andre Leiradella
3  *
4  * RetroArch is free software: you can redistribute it and/or modify it under the terms
5  * of the GNU General Public License as published by the Free Software Found-
6  * ation, either version 3 of the License, or (at your option) any later version.
7  *
8  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  * PURPOSE. See the GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License along with RetroArch.
13  * If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef __RARCH_CHEEVOS_PARSER_H
17 #define __RARCH_CHEEVOS_PARSER_H
18 
19 #include <stdint.h>
20 #include <stddef.h>
21 #include <boolean.h>
22 
23 #include <retro_common_api.h>
24 
26 
27 typedef struct {
28  const char* title;
29  const char* description;
30  const char* badge;
31  const char* memaddr;
32  unsigned points;
33  unsigned id;
35 
36 typedef struct {
37  const char* title;
38  const char* description;
39  const char* format;
40  const char* mem;
41  unsigned id;
43 
44 typedef struct {
45  unsigned console_id;
46 
50 
51  unsigned core_count;
52  unsigned unofficial_count;
53  unsigned lboard_count;
55 
56 typedef void (*cheevos_unlock_cb_t)(unsigned id, void* userdata);
57 
58 int cheevos_get_token(const char* json, char* token, size_t length);
59 
60 int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata);
62 
63 void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata);
64 
65 unsigned chevos_get_gameid(const char* json);
66 
68 
69 #endif
int cheevos_get_token(const char *json, char *token, size_t length)
Definition: parser.c:145
Definition: parser.h:36
const char * mem
Definition: parser.h:40
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
cheevos_ralboard_t * lboards
Definition: parser.h:49
int cheevos_get_patchdata(const char *json, cheevos_rapatchdata_t *patchdata)
Definition: parser.c:477
void cheevos_free_patchdata(cheevos_rapatchdata_t *patchdata)
Definition: parser.c:550
static const char json[]
Definition: namespacetest.cpp:32
GLenum GLuint id
Definition: glext.h:6233
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
const char * format
Definition: parser.h:39
const char * description
Definition: parser.h:38
const char * title
Definition: parser.h:28
unsigned core_count
Definition: parser.h:51
unsigned unofficial_count
Definition: parser.h:52
const char * badge
Definition: parser.h:30
cheevos_racheevo_t * unofficial
Definition: parser.h:48
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
const char * title
Definition: parser.h:37
cheevos_racheevo_t * core
Definition: parser.h:47
void cheevos_deactivate_unlocks(const char *json, cheevos_unlock_cb_t unlock_cb, void *userdata)
Definition: parser.c:635
unsigned points
Definition: parser.h:32
Definition: parser.h:27
void(* cheevos_unlock_cb_t)(unsigned id, void *userdata)
Definition: parser.h:56
unsigned console_id
Definition: parser.h:45
unsigned id
Definition: parser.h:41
unsigned chevos_get_gameid(const char *json)
Definition: parser.c:666
Definition: parser.h:44
const char * description
Definition: parser.h:29
const char * memaddr
Definition: parser.h:31
unsigned id
Definition: parser.h:33
unsigned lboard_count
Definition: parser.h:53
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233