libragephoto Version: 0.6.0
Loading...
Searching...
No Matches
RagePhotoInstance Struct Reference

#include <RagePhoto.h>

Public Types

typedef void * ragephoto_t
 

Public Member Functions

ragephoto_t ragephoto_open ()
 
void ragephoto_addparser (ragephoto_t instance, RagePhotoFormatParser *rp_parser)
 
void ragephoto_clear (ragephoto_t instance)
 
bool ragephoto_load (ragephoto_t instance, const char *data, size_t size)
 
bool ragephoto_loadfile (ragephoto_t instance, const char *filename)
 
int32_t ragephoto_error (ragephoto_t instance)
 
RagePhotoDataragephoto_getphotodata (ragephoto_t instance)
 
const char * ragephoto_getphotodesc (ragephoto_t instance)
 
uint32_t ragephoto_getphotoformat (ragephoto_t instance)
 
const char * ragephoto_getphotojpeg (ragephoto_t instance)
 
const char * ragephoto_getphotojson (ragephoto_t instance)
 
const char * ragephoto_getphotoheader (ragephoto_t instance)
 
uint64_t ragephoto_getphotosign (ragephoto_t instance)
 
uint64_t ragephoto_getphotosignf (ragephoto_t instance, uint32_t photoFormat)
 
void ragephoto_getphotosigns (ragephoto_t instance, char *data, size_t size)
 
void ragephoto_getphotosignsf (ragephoto_t instance, char *data, size_t size, uint32_t photoFormat)
 
uint32_t ragephoto_getphotosize (ragephoto_t instance)
 
const char * ragephoto_getphototitle (ragephoto_t instance)
 
size_t ragephoto_getsavesize (ragephoto_t instance)
 
size_t ragephoto_getsavesizef (ragephoto_t instance, uint32_t photoFormat)
 
bool ragephoto_save (ragephoto_t instance, char *data)
 
bool ragephoto_savef (ragephoto_t instance, char *data, uint32_t photoFormat)
 
bool ragephoto_savefile (ragephoto_t instance, const char *filename)
 
bool ragephoto_savefilef (ragephoto_t instance, const char *filename, uint32_t photoFormat)
 
void ragephoto_setbufferdefault (ragephoto_t instance)
 
void ragephoto_setbufferoffsets (ragephoto_t instance)
 
bool ragephoto_setphotodata (ragephoto_t instance, RagePhotoData *rp_data)
 
bool ragephoto_setphotodatac (ragephoto_t instance, RagePhotoData *rp_data)
 
void ragephoto_setphotodesc (ragephoto_t instance, const char *description, uint32_t bufferSize)
 
void ragephoto_setphotoformat (ragephoto_t instance, uint32_t photoFormat)
 
bool ragephoto_setphotojpeg (ragephoto_t instance, const char *data, uint32_t size, uint32_t bufferSize)
 
void ragephoto_setphotojson (ragephoto_t instance, const char *json, uint32_t bufferSize)
 
void ragephoto_setphotoheader (ragephoto_t instance, const char *header, uint32_t headerSum)
 
void ragephoto_setphotoheader2 (ragephoto_t instance, const char *header, uint32_t headerSum, uint32_t headerSum2)
 
void ragephoto_setphototitle (ragephoto_t instance, const char *title, uint32_t bufferSize)
 
void ragephoto_close (ragephoto_t instance)
 

Public Attributes

RagePhotoDatadata
 
RagePhotoFormatParserparser
 

Related Symbols

(Note that these are not member symbols.)

uint32_t ragephoto_defpbuf_gta5 ()
 
uint32_t ragephoto_defpbuf_rdr2 ()
 
uint32_t ragephoto_format_gta5 ()
 
uint32_t ragephoto_format_rdr2 ()
 
void ragephoto_setlibraryflag (RagePhotoLibraryFlag flag, bool state)
 
const char * ragephoto_version ()
 

Detailed Description

RagePhoto instance struct for storing data and format parser pointer.

Member Typedef Documentation

◆ ragephoto_t

typedef void* ragephoto_t

RagePhoto typedef for C instance/C++ object.

Member Function Documentation

◆ ragephoto_addparser()

void ragephoto_addparser ( ragephoto_t instance,
RagePhotoFormatParser * rp_parser )

Add a custom defined RagePhotoFormatParser.

Parameters
instanceragephoto_t instance
rp_parserParser to add

◆ ragephoto_clear()

void ragephoto_clear ( ragephoto_t instance)

Resets the Data object to default values.

Parameters
instanceragephoto_t instance

◆ ragephoto_close()

void ragephoto_close ( ragephoto_t instance)

Closes a ragephoto_t instance.

Parameters
instanceragephoto_t instance

◆ ragephoto_error()

int32_t ragephoto_error ( ragephoto_t instance)

Returns the last error occurred.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotodata()

RagePhotoData * ragephoto_getphotodata ( ragephoto_t instance)

Returns the internal Data object.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotodesc()

const char * ragephoto_getphotodesc ( ragephoto_t instance)

Returns the Photo description.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotoformat()

uint32_t ragephoto_getphotoformat ( ragephoto_t instance)

Returns the Photo Format (GTA V or RDR 2).

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotoheader()

const char * ragephoto_getphotoheader ( ragephoto_t instance)

Returns the Photo header.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotojpeg()

const char * ragephoto_getphotojpeg ( ragephoto_t instance)

Returns the Photo JPEG data.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotojson()

const char * ragephoto_getphotojson ( ragephoto_t instance)

Returns the Photo JSON data.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotosign()

uint64_t ragephoto_getphotosign ( ragephoto_t instance)

Returns the Photo JPEG sign.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphotosignf()

uint64_t ragephoto_getphotosignf ( ragephoto_t instance,
uint32_t photoFormat )

Returns the Photo JPEG sign.

Parameters
instanceragephoto_t instance
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_getphotosigns()

void ragephoto_getphotosigns ( ragephoto_t instance,
char * data,
size_t size )

Returns the Photo JPEG sign as string.

Parameters
instanceragephoto_t instance
dataString data
sizeString size

◆ ragephoto_getphotosignsf()

void ragephoto_getphotosignsf ( ragephoto_t instance,
char * data,
size_t size,
uint32_t photoFormat )

Returns the Photo JPEG sign as string.

Parameters
instanceragephoto_t instance
dataString data
sizeString size
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_getphotosize()

uint32_t ragephoto_getphotosize ( ragephoto_t instance)

Returns the Photo JPEG data size.

Parameters
instanceragephoto_t instance

◆ ragephoto_getphototitle()

const char * ragephoto_getphototitle ( ragephoto_t instance)

Returns the Photo title.

Parameters
instanceragephoto_t instance

◆ ragephoto_getsavesize()

size_t ragephoto_getsavesize ( ragephoto_t instance)

Returns the Photo save file size.

Parameters
instanceragephoto_t instance

◆ ragephoto_getsavesizef()

size_t ragephoto_getsavesizef ( ragephoto_t instance,
uint32_t photoFormat )

Returns the Photo save file size.

Parameters
instanceragephoto_t instance
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_load()

bool ragephoto_load ( ragephoto_t instance,
const char * data,
size_t size )

Loads a Photo from a const char*.

Parameters
instanceragephoto_t instance
dataPhoto data
sizePhoto data size

◆ ragephoto_loadfile()

bool ragephoto_loadfile ( ragephoto_t instance,
const char * filename )

Loads a Photo from a file.

Parameters
instanceragephoto_t instance
filenameFile to load

◆ ragephoto_open()

ragephoto_t ragephoto_open ( )

Opens a ragephoto_t instance.

◆ ragephoto_save()

bool ragephoto_save ( ragephoto_t instance,
char * data )

Saves a Photo to a char*.

Parameters
instanceragephoto_t instance
dataPhoto data

◆ ragephoto_savef()

bool ragephoto_savef ( ragephoto_t instance,
char * data,
uint32_t photoFormat )

Saves a Photo to a char*.

Parameters
instanceragephoto_t instance
dataPhoto data
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_savefile()

bool ragephoto_savefile ( ragephoto_t instance,
const char * filename )

Saves a Photo to a file.

Parameters
instanceragephoto_t instance
filenameFile to save

◆ ragephoto_savefilef()

bool ragephoto_savefilef ( ragephoto_t instance,
const char * filename,
uint32_t photoFormat )

Saves a Photo to a file.

Parameters
instanceragephoto_t instance
filenameFile to save
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_setbufferdefault()

void ragephoto_setbufferdefault ( ragephoto_t instance)

Sets all cross-format Buffer to default size.

Parameters
instanceragephoto_t instance

◆ ragephoto_setbufferoffsets()

void ragephoto_setbufferoffsets ( ragephoto_t instance)

Moves all Buffer offsets to correct position.

Parameters
instanceragephoto_t instance

◆ ragephoto_setphotodata()

bool ragephoto_setphotodata ( ragephoto_t instance,
RagePhotoData * rp_data )

Sets the internal RagePhotoData object.

Parameters
instanceragephoto_t instance
rp_dataData object used to replace

◆ ragephoto_setphotodatac()

bool ragephoto_setphotodatac ( ragephoto_t instance,
RagePhotoData * rp_data )

Copies RagePhotoData object to internal RagePhotoData object.

Parameters
instanceragephoto_t instance
rp_dataData object used to copy

◆ ragephoto_setphotodesc()

void ragephoto_setphotodesc ( ragephoto_t instance,
const char * description,
uint32_t bufferSize )

Sets the Photo description.

Parameters
instanceragephoto_t instance
descriptionDescription
bufferSizeDescription buffer size

Default bufferSize: 256UL

◆ ragephoto_setphotoformat()

void ragephoto_setphotoformat ( ragephoto_t instance,
uint32_t photoFormat )

Sets the Photo Format (GTA V or RDR 2).

Parameters
instanceragephoto_t instance
photoFormatPhoto Format (GTA V or RDR 2)

◆ ragephoto_setphotoheader()

void ragephoto_setphotoheader ( ragephoto_t instance,
const char * header,
uint32_t headerSum )

Sets the Photo header.

◆ ragephoto_setphotoheader2()

void ragephoto_setphotoheader2 ( ragephoto_t instance,
const char * header,
uint32_t headerSum,
uint32_t headerSum2 )

Sets the Photo header. (RDR 2)

◆ ragephoto_setphotojpeg()

bool ragephoto_setphotojpeg ( ragephoto_t instance,
const char * data,
uint32_t size,
uint32_t bufferSize )

Sets the Photo JPEG data.

Parameters
instanceragephoto_t instance
dataJPEG data
sizeJPEG data size
bufferSizeJPEG buffer size

Default bufferSize: ragephoto_defpbuf_gta5() or ragephoto_defpbuf_rdr2()

◆ ragephoto_setphotojson()

void ragephoto_setphotojson ( ragephoto_t instance,
const char * json,
uint32_t bufferSize )

Sets the Photo JSON data.

Parameters
instanceragephoto_t instance
jsonJSON data
bufferSizeJSON data buffer size

Default bufferSize: 3072UL

◆ ragephoto_setphototitle()

void ragephoto_setphototitle ( ragephoto_t instance,
const char * title,
uint32_t bufferSize )

Sets the Photo title.

Parameters
instanceragephoto_t instance
titleTitle
bufferSizeTitle buffer size

Default bufferSize: 256UL

Friends And Related Symbol Documentation

◆ ragephoto_defpbuf_gta5()

uint32_t ragephoto_defpbuf_gta5 ( )
related

Returns the GTA V default Photo Buffer Size.

◆ ragephoto_defpbuf_rdr2()

uint32_t ragephoto_defpbuf_rdr2 ( )
related

Returns the RDR 2 default Photo Buffer Size.

◆ ragephoto_format_gta5()

uint32_t ragephoto_format_gta5 ( )
related

Returns the GTA V Photo Format.

◆ ragephoto_format_rdr2()

uint32_t ragephoto_format_rdr2 ( )
related

Returns the RDR 2 Photo Format.

◆ ragephoto_setlibraryflag()

void ragephoto_setlibraryflag ( RagePhotoLibraryFlag flag,
bool state )
related

Sets a library flag.

Parameters
flagLibrary flag
stateFlag state

◆ ragephoto_version()

const char * ragephoto_version ( )
related

Returns the library version.

Member Data Documentation

◆ data

RagePhotoData* RagePhotoInstance::data

Pointer for internal data

◆ parser

RagePhotoFormatParser* RagePhotoInstance::parser

Pointer for internal format parser


The documentation for this struct was generated from the following files: