libragephoto Version: 0.5.0
|
#include "RagePhotoLibrary.h"
#include "RagePhotoTypedefs.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Typedefs | |
typedef void * | ragephoto_t |
C API for RagePhoto.
typedef void* ragephoto_t |
RagePhoto C instance/C++ class typedef.
void ragephoto_addparser | ( | ragephoto_t | instance, |
RagePhotoFormatParser * | rp_parser | ||
) |
Add a custom defined RagePhotoFormatParser.
instance | ragephoto_t instance |
rp_parser | RagePhotoFormatParser parser to add |
void ragephoto_clear | ( | ragephoto_t | instance | ) |
Resets the RagePhotoData object to default values.
instance | ragephoto_t instance |
void ragephoto_close | ( | ragephoto_t | instance | ) |
Closes a ragephoto_t
instance.
instance | ragephoto_t instance |
uint32_t ragephoto_defpbuf_gta5 | ( | ) |
Returns the GTA V default Photo Buffer Size.
uint32_t ragephoto_defpbuf_rdr2 | ( | ) |
Returns the RDR 2 default Photo Buffer Size.
int32_t ragephoto_error | ( | ragephoto_t | instance | ) |
Returns the last error occurred.
instance | ragephoto_t instance |
uint32_t ragephoto_format_gta5 | ( | ) |
Returns the GTA V Photo Format.
uint32_t ragephoto_format_rdr2 | ( | ) |
Returns the RDR 2 Photo Format.
RagePhotoData * ragephoto_getphotodata | ( | ragephoto_t | instance | ) |
Returns the internal RagePhotoData object.
instance | ragephoto_t instance |
const char * ragephoto_getphotodesc | ( | ragephoto_t | instance | ) |
Returns the Photo description.
instance | ragephoto_t instance |
uint32_t ragephoto_getphotoformat | ( | ragephoto_t | instance | ) |
Returns the Photo Format (GTA V or RDR 2).
instance | ragephoto_t instance |
const char * ragephoto_getphotoheader | ( | ragephoto_t | instance | ) |
Returns the Photo header.
instance | ragephoto_t instance |
const char * ragephoto_getphotojpeg | ( | ragephoto_t | instance | ) |
Returns the Photo JPEG data.
instance | ragephoto_t instance |
const char * ragephoto_getphotojson | ( | ragephoto_t | instance | ) |
Returns the Photo JSON data.
instance | ragephoto_t instance |
uint64_t ragephoto_getphotosign | ( | ragephoto_t | instance | ) |
Returns the Photo JPEG sign.
instance | ragephoto_t instance |
uint64_t ragephoto_getphotosignf | ( | ragephoto_t | instance, |
uint32_t | photoFormat | ||
) |
Returns the Photo JPEG sign.
instance | ragephoto_t instance |
photoFormat | Photo Format (GTA V or RDR 2) |
uint32_t ragephoto_getphotosize | ( | ragephoto_t | instance | ) |
Returns the Photo JPEG data size.
instance | ragephoto_t instance |
const char * ragephoto_getphototitle | ( | ragephoto_t | instance | ) |
Returns the Photo title.
instance | ragephoto_t instance |
size_t ragephoto_getsavesize | ( | ragephoto_t | instance | ) |
Returns the Photo save file size.
instance | ragephoto_t instance |
size_t ragephoto_getsavesizef | ( | ragephoto_t | instance, |
uint32_t | photoFormat | ||
) |
Returns the Photo save file size.
instance | ragephoto_t instance |
photoFormat | Photo Format (GTA V or RDR 2) |
bool ragephoto_load | ( | ragephoto_t | instance, |
const char * | data, | ||
size_t | size | ||
) |
Loads a Photo from a const char*.
instance | ragephoto_t instance |
data | Photo data |
size | Photo data size |
bool ragephoto_loadfile | ( | ragephoto_t | instance, |
const char * | filename | ||
) |
Loads a Photo from a file.
instance | ragephoto_t instance |
filename | File to load |
ragephoto_t ragephoto_open | ( | ) |
Opens a ragephoto_t
instance.
bool ragephoto_save | ( | ragephoto_t | instance, |
char * | data | ||
) |
Saves a Photo to a char*.
instance | ragephoto_t instance |
data | Photo data |
bool ragephoto_savef | ( | ragephoto_t | instance, |
char * | data, | ||
uint32_t | photoFormat | ||
) |
Saves a Photo to a char*.
instance | ragephoto_t instance |
data | Photo data |
photoFormat | Photo Format (GTA V or RDR 2) |
bool ragephoto_savefile | ( | ragephoto_t | instance, |
const char * | filename | ||
) |
Saves a Photo to a file.
instance | ragephoto_t instance |
filename | File to save |
bool ragephoto_savefilef | ( | ragephoto_t | instance, |
const char * | filename, | ||
uint32_t | photoFormat | ||
) |
Saves a Photo to a file.
instance | ragephoto_t instance |
filename | File to save |
photoFormat | Photo Format (GTA V or RDR 2) |
void ragephoto_setbufferdefault | ( | ragephoto_t | instance | ) |
Sets all cross-format Buffer to default size.
instance | ragephoto_t instance |
void ragephoto_setbufferoffsets | ( | ragephoto_t | instance | ) |
Moves all Buffer offsets to correct position.
instance | ragephoto_t instance |
bool ragephoto_setphotodata | ( | ragephoto_t | instance, |
RagePhotoData * | rp_data | ||
) |
Sets the internal RagePhotoData object.
instance | ragephoto_t instance |
rp_data | RagePhotoData object being set |
bool ragephoto_setphotodatac | ( | ragephoto_t | instance, |
RagePhotoData * | rp_data | ||
) |
Copies RagePhotoData object to internal RagePhotoData object.
instance | ragephoto_t instance |
rp_data | RagePhotoData object being copied |
void ragephoto_setphotodesc | ( | ragephoto_t | instance, |
const char * | description, | ||
uint32_t | bufferSize | ||
) |
Sets the Photo description.
instance | ragephoto_t instance |
description | Description |
bufferSize | Description buffer size |
Default bufferSize: 256UL
void ragephoto_setphotoformat | ( | ragephoto_t | instance, |
uint32_t | photoFormat | ||
) |
Sets the Photo Format (GTA V or RDR 2).
instance | ragephoto_t instance |
photoFormat | Photo Format (GTA V or RDR 2) |
void ragephoto_setphotoheader | ( | ragephoto_t | instance, |
const char * | header, | ||
uint32_t | headerSum | ||
) |
Sets the Photo header.
void ragephoto_setphotoheader2 | ( | ragephoto_t | instance, |
const char * | header, | ||
uint32_t | headerSum, | ||
uint32_t | headerSum2 | ||
) |
Sets the Photo header. (RDR 2)
bool ragephoto_setphotojpeg | ( | ragephoto_t | instance, |
const char * | data, | ||
uint32_t | size, | ||
uint32_t | bufferSize | ||
) |
Sets the Photo JPEG data.
instance | ragephoto_t instance |
data | JPEG data |
size | JPEG data size |
bufferSize | JPEG buffer size |
Default bufferSize: ragephoto_defpbuf_gta5() or ragephoto_defpbuf_rdr2()
void ragephoto_setphotojson | ( | ragephoto_t | instance, |
const char * | json, | ||
uint32_t | bufferSize | ||
) |
Sets the Photo JSON data.
instance | ragephoto_t instance |
json | JSON data |
bufferSize | JSON data buffer size |
Default bufferSize: 3072UL
void ragephoto_setphototitle | ( | ragephoto_t | instance, |
const char * | title, | ||
uint32_t | bufferSize | ||
) |
Sets the Photo title.
instance | ragephoto_t instance |
title | Title |
bufferSize | Title buffer size |
Default bufferSize: 256UL
const char * ragephoto_version | ( | ) |
Returns the library version.
void ragephotodata_clear | ( | RagePhotoData * | rp_data | ) |
Resets the RagePhotoData object to default values.
rp_data | RagePhotoData object |
uint64_t ragephotodata_getphotosign | ( | RagePhotoData * | rp_data | ) |
Returns the Photo JPEG sign.
rp_data | RagePhotoData object |
uint64_t ragephotodata_getphotosignf | ( | RagePhotoData * | rp_data, |
uint32_t | photoFormat | ||
) |
Returns the Photo JPEG sign.
rp_data | RagePhotoData object |
photoFormat | Photo Format (GTA V or RDR 2) |
size_t ragephotodata_getsavesize | ( | RagePhotoData * | rp_data, |
RagePhotoFormatParser * | rp_parser | ||
) |
Returns the Photo save file size.
rp_data | RagePhotoData object |
rp_parser | RagePhotoFormatParser parser array |
size_t ragephotodata_getsavesizef | ( | RagePhotoData * | rp_data, |
RagePhotoFormatParser * | rp_parser, | ||
uint32_t | photoFormat | ||
) |
Returns the Photo save file size.
rp_data | RagePhotoData object |
rp_parser | RagePhotoFormatParser parser array |
photoFormat | Photo Format (GTA V or RDR 2) |
bool ragephotodata_load | ( | RagePhotoData * | rp_data, |
RagePhotoFormatParser * | rp_parser, | ||
const char * | data, | ||
size_t | size | ||
) |
Loads a Photo from a const char*.
rp_data | RagePhotoData object |
rp_parser | RagePhotoFormatParser parser array |
data | Photo data |
size | Photo data size |
bool ragephotodata_save | ( | RagePhotoData * | rp_data, |
RagePhotoFormatParser * | rp_parser, | ||
char * | data | ||
) |
Saves a Photo to a char*.
rp_data | RagePhotoData object |
rp_parser | RagePhotoFormatParser parser array |
data | Photo data |
bool ragephotodata_savef | ( | RagePhotoData * | rp_data, |
RagePhotoFormatParser * | rp_parser, | ||
char * | data, | ||
uint32_t | photoFormat | ||
) |
Saves a Photo to a char*.
rp_data | RagePhotoData object |
rp_parser | RagePhotoFormatParser parser array |
data | Photo data |
photoFormat | Photo Format (GTA V or RDR 2) |
void ragephotodata_setbufferdefault | ( | RagePhotoData * | rp_data | ) |
Sets all cross-format Buffer to default size.
rp_data | RagePhotoData object |
void ragephotodata_setbufferoffsets | ( | RagePhotoData * | rp_data | ) |
Moves all Buffer offsets to correct position.
rp_data | RagePhotoData object |