mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
The core builds with a static Makefile (Makefile + Makefile.common) in the manner of the other ParaLLEl cores, for every target .gitlab-ci.yml has: Linux x86_64/aarch64, Windows (MinGW, native or cross), macOS, iOS, tvOS, Android arm64/x86_64 and webOS. CMake, vcpkg and their overlay ports are gone; the libraries the core needs are submodules built with it (fmt 12.1.0, glm 1.0.1, glslang 15.1.0, libusb 1.0.29, pugixml 1.15, zlib 1.3.1, zstd 1.5.7), with the generated files and the graphic packs produced by the Makefile itself (tools/pack_graphic_packs.c), and a precompiled header for gcc and clang. The core is renamed parallel_gx2 (parallel_gx2_libretro.info, library name "ParaLLEl GX2"). HTTP and TLS go through RetroArch's libretro-common (net_http with the per-request TLS settings, the built-in TLS client, x509, the hashes and the KDF) in place of libcurl, OpenSSL and mbedTLS: dependencies/curl-compat is the small libcurl API nlibcurl and napi use, on one transfer thread with lock-free submission and per-handle event queues, with its own tests against local HTTP and TLS servers, plain and under ASan/UBSan and TSan, in both CIs. The libretro-common files are plain copies from RetroArch. boost is replaced by the few headers the core uses (boost-compat), and the CI files build with the Makefile.
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef _LIBRETRO_ENCODINGS_BASE64_H
|
|
#define _LIBRETRO_ENCODINGS_BASE64_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#include <retro_common_api.h>
|
|
|
|
RETRO_BEGIN_DECLS
|
|
|
|
/**
|
|
* Encodes binary data into a \c NULL-terminated base64 string.
|
|
*
|
|
* @param binaryData The data to encode.
|
|
* Behavior is undefined if \c NULL.
|
|
* @param len The length of the data to encode.
|
|
* @param flen Pointer to the length of the returned string.
|
|
* @return Pointer to the base64-encoded string, or \c NULL on failure.
|
|
* The returned string is owned by the caller and must be released with \c free().
|
|
* @see unbase64
|
|
*/
|
|
char* base64(const void* binaryData, int len, int *flen);
|
|
|
|
/**
|
|
* Decodes a base64-encoded string into binary data.
|
|
*
|
|
* @param ascii The base64 string to decode, in ASCII format.
|
|
* @param len Length of the string to decode.
|
|
* @param flen Pointer to the length of the returned data.
|
|
* @return The decoded binary data, or \c NULL on failure.
|
|
* The returned buffer is owned by the caller and must be released with \c free().
|
|
* @see base64
|
|
*/
|
|
unsigned char* unbase64(const char* ascii, int len, int *flen);
|
|
|
|
RETRO_END_DECLS
|
|
|
|
#endif
|