psptypes.h File Reference

Header for the Platform Support Package - Platform dependent types. More...

#include "pspplat.h"#include "psptypes-doxygen.h"#include "rdmretcodetypes.h"#include "pspplatpackage.h"
Include dependency graph for psptypes.h:
This graph shows which files directly or indirectly include this file:

Macros

#define RDM_UNREF(a) ((void) a)
#define EXTERNAL_FCN_PTR EXTERNAL_FCN *
#define RDM_STARTUP_HOOK
#define RDM_SHUTDOWN_HOOK
#define RDM_CHAR_T RDM_CHAR_T
#define RDM_T(text) text
#define RDM_TCHAR_T RDM_TCHAR_T
#define RDM_TSTR_FMT "%s"
#define RDM_STARTUP_EXAMPLE(name)
#define RDM_STARTUP_EXAMPLE_CR(name) RDM_STARTUP_EXAMPLE(name)
#define RDM_LEN(x) (sizeof(x) / sizeof(x[0]))
#define RDM_ASSERT(x)
#define RDM_MIN(a, b) ((a) < (b) ? (a) : (b))
#define RDM_MAX(a, b) ((a) > (b) ? (a) : (b))
#define RDM_INT8_MIN ((int8_t) 0x80U)
#define RDM_INT8_MAX ((int8_t) 0x7FU)
#define RDM_UINT8_MAX ((uint8_t) 0xFFU)
#define RDM_INT16_MIN ((int16_t) 0x8000U)
#define RDM_INT16_MAX ((int16_t) 0x7FFFU)
#define RDM_UINT16_MAX ((uint16_t) 0xFFFFU)
#define RDM_INT32_MIN ((int32_t) 0x80000000U)
#define RDM_INT32_MAX ((int32_t) 0x7FFFFFFFU)
#define RDM_UINT32_MAX ((uint32_t) 0xFFFFFFFFU)
#define RDM_INT64_MIN (-9223372036854775807LL - 1)
#define RDM_INT64_MAX (9223372036854775807LL)
#define RDM_UINT64_MAX ( 18446744073709551615ULL)
#define RDM_INT64_FMTRDM_T("%") RDM_64BIT_CODERDM_T("d")
#define RDM_UINT64_FMTRDM_T("%") RDM_64BIT_CODERDM_T("u")
#define RDM_INT64_FMT_HEXRDM_T("%") RDM_64BIT_CODERDM_T("X")
#define RDM_UINT64_FMT_HEXRDM_T("%") RDM_64BIT_CODERDM_T("X")
#define RDM_INT64_FMT_SIZE(size) RDM_T("%") #size RDM_64BIT_CODERDM_T("d")
#define RDM_UINT64_FMT_SIZE(size) RDM_T("%") #size RDM_64BIT_CODERDM_T("u")
#define RDM_INT64_FMT_SIZE_HEX(size) RDM_T("%") #size RDM_64BIT_CODERDM_T("X")
#define RDM_UINT64_FMT_SIZE_HEX(size) RDM_T("%") #size RDM_64BIT_CODERDM_T("X")
#define RDM_STRINGIFY_(data) #data
#define RDM_STRINGIFY(data) RDM_STRINGIFY_(data)
#define RDM_BYTES_PER_UTF8_CHAR 4
#define RDM_BYTES_PER_UTF8_CHAR_OPTION ("bytes_per_utf8_char= " RDM_STRINGIFY(RDM_BYTES_PER_UTF8_CHAR))
#define RDM_BYTES_PER_UTF8_CHAR_OPTION_VALUERDM_STRINGIFY(RDM_BYTES_PER_UTF8_CHAR)

Typedefs

typedef struct RDM_ENCRYPT_S * RDM_ENCRYPT

Enumerations

enum RDM_BOOL_T { RDM_FALSE = 0, RDM_TRUE = 1 }
enum RDM_COMPARE { RDM_LT = -1, RDM_EQ = 0, RDM_GT = 1 }
enum RDM_ENC_TYPE { RDM_ENC_NONE, RDM_ENC_XOR, RDM_ENC_AES128, RDM_ENC_AES192, RDM_ENC_AES256, RDM_ENC_DEFAULT }

Detailed Description

Header for the Platform Support Package - Platform dependent types.

Macro Definition Documentation

EXTERNAL_FCN_PTR

#define EXTERNAL_FCN_PTR EXTERNAL_FCN *

RDM_ASSERT

#define RDM_ASSERT ( x )

Macro for doing assertions. Will be turned off if NDEBUG is defined

RDM_BYTES_PER_UTF8_CHAR

#define RDM_BYTES_PER_UTF8_CHAR 4

RDM_BYTES_PER_UTF8_CHAR_OPTION

#define RDM_BYTES_PER_UTF8_CHAR_OPTION ("bytes_per_utf8_char= " RDM_STRINGIFY(RDM_BYTES_PER_UTF8_CHAR))

RDM_BYTES_PER_UTF8_CHAR_OPTION_VALUE

#define RDM_BYTES_PER_UTF8_CHAR_OPTION_VALUE RDM_STRINGIFY(RDM_BYTES_PER_UTF8_CHAR)

RDM_CHAR_T

#define RDM_CHAR_T RDM_CHAR_T

RDM character

RDM_CHAR_T are always expanded to char. On Windows extra overloaded methods are provided with parameter types wchar_t instead of char

RDM_INT16_MAX

#define RDM_INT16_MAX ((int16_t) 0x7FFFU)

Maximum value for int64_t

RDM_INT16_MIN

#define RDM_INT16_MIN ((int16_t) 0x8000U)

Minimum value for int16_t

RDM_INT32_MAX

#define RDM_INT32_MAX ((int32_t) 0x7FFFFFFFU)

Maximum value for int64_t

RDM_INT32_MIN

#define RDM_INT32_MIN ((int32_t) 0x80000000U)

Minimum value for int32_t

RDM_INT64_FMT

#define RDM_INT64_FMT RDM_T("%") RDM_64BIT_CODE RDM_T("d")

Format string for 64 bit integer

RDM_INT64_FMT_HEX

#define RDM_INT64_FMT_HEX RDM_T("%") RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit integer in hexadecimal

RDM_INT64_FMT_SIZE

#define RDM_INT64_FMT_SIZE ( size ) RDM_T("%") #size RDM_64BIT_CODERDM_T("d")

Format string for 64 bit integer where size is specified

RDM_INT64_FMT_SIZE_HEX

#define RDM_INT64_FMT_SIZE_HEX ( size ) RDM_T("%") #size RDM_64BIT_CODERDM_T("X")

Format string for 64 bit integer in hexadecimal where size is specified

RDM_INT64_MAX

#define RDM_INT64_MAX (9223372036854775807LL)

Maximum value for int64_t

RDM_INT64_MIN

#define RDM_INT64_MIN (-9223372036854775807LL - 1)

Minimum value for int64_t

RDM_INT8_MAX

#define RDM_INT8_MAX ((int8_t) 0x7FU)

Maximum value for int64_t

RDM_INT8_MIN

#define RDM_INT8_MIN ((int8_t) 0x80U)

Minimum value for int_t

RDM_LEN

#define RDM_LEN ( x ) (sizeof(x) / sizeof(x[0]))

Macro to get the number of elements in an array of any type

RDM_MAX

#define RDM_MAX ( a,
b
) ((a) > (b) ? (a) : (b))

Macro fo taking the max of two arguments of any type

RDM_MIN

#define RDM_MIN ( a,
b
) ((a) < (b) ? (a) : (b))

Macro fo taking the min of two arguments of any type

RDM_SHUTDOWN_HOOK

#define RDM_SHUTDOWN_HOOK

Shutdown hook

Shutdown hook for tools, examples, and tests that are using any of the RDM_STARTUP macros

RDM_STARTUP_EXAMPLE

#define RDM_STARTUP_EXAMPLE ( name )
Value:
int32_t name##_main(int32_t argc, const RDM_TCHAR_T *const *argv); \
int main(int argc, const RDM_TCHAR_T *const *argv) { \
int32_t status; \
\
RDM_STARTUP_HOOK \
status = name##_main(argc, argv); \
RDM_SHUTDOWN_HOOK \
return status; \
}

Startup for examples

This sets up a main function, with a startup hook, a call to a named main function, and a shutdown hook.

This is used for examples.

RDM_STARTUP_EXAMPLE_CR

#define RDM_STARTUP_EXAMPLE_CR ( name ) RDM_STARTUP_EXAMPLE(name)

Startup for examples with CR

This sets up a main function, with a startup hook, a call to a named main function, and a shutdown hook.

This is used for examples where we want to prompt the user upon termination on some platforms.

RDM_STARTUP_HOOK

#define RDM_STARTUP_HOOK

Startup hook

Startup hook for tools, examples, and tests that are using any of the RDM_STARTUP macros

RDM_STRINGIFY

#define RDM_STRINGIFY ( data ) RDM_STRINGIFY_(data)

RDM_STRINGIFY_

#define RDM_STRINGIFY_ ( data ) #data

RDM_T

#define RDM_T ( text ) text

Macro for an RDM string

RDM_TCHAR_T

#define RDM_TCHAR_T RDM_TCHAR_T

RDM_TCHAR_T is expanded to wchar_t on Windows when _UNICODE is defined. Otherwise it is expanded to char.

RDM_TSTR_FMT

#define RDM_TSTR_FMT "%s"

RDM_UINT16_MAX

#define RDM_UINT16_MAX ((uint16_t) 0xFFFFU)

Maximum value for uint64_t

RDM_UINT32_MAX

#define RDM_UINT32_MAX ((uint32_t) 0xFFFFFFFFU)

Maximum value for uint64_t

RDM_UINT64_FMT

#define RDM_UINT64_FMT RDM_T("%") RDM_64BIT_CODE RDM_T("u")

Format string for 64 bit unsigned integer

RDM_UINT64_FMT_HEX

#define RDM_UINT64_FMT_HEX RDM_T("%") RDM_64BIT_CODE RDM_T("X")

Format string for 64 bit unsigned integer in hexadecimal

RDM_UINT64_FMT_SIZE

#define RDM_UINT64_FMT_SIZE ( size ) RDM_T("%") #size RDM_64BIT_CODERDM_T("u")

Format string for 64 bit unsigned integer where size is specified

RDM_UINT64_FMT_SIZE_HEX

#define RDM_UINT64_FMT_SIZE_HEX ( size ) RDM_T("%") #size RDM_64BIT_CODERDM_T("X")

Format string for 64 bit unsigned integer in hexadecimal where size is specified

RDM_UINT64_MAX

#define RDM_UINT64_MAX ( 18446744073709551615ULL)

Maximum value for uint64_t

RDM_UINT8_MAX

#define RDM_UINT8_MAX ((uint8_t) 0xFFU)

Maximum value for uint64_t

RDM_UNREF

#define RDM_UNREF ( a ) ((void) a)

Typedef Documentation

RDM_ENCRYPT

typedef struct RDM_ENCRYPT_S* RDM_ENCRYPT

RDM encryption handle

Enumeration Type Documentation

RDM_BOOL_T

enum RDM_BOOL_T

Enumeration for RDM boolen values

This enumeration adds support for a platform/language agnostic BOOLEAN value in the RDM library

Enumerator
RDM_FALSE

enum value for FALSE

RDM_TRUE

enum value for TRUE

57 {
58RDM_FALSE = 0,
59RDM_TRUE = 1
60 } RDM_BOOL_T;

RDM_COMPARE

Enumeration for RDM comparison values

Enumerator
RDM_LT

The first argument is lesser than the second argument

RDM_EQ

The arguments are equal

RDM_GT

The first argument is greater than the second argument

65 {
66RDM_LT = -1,
67RDM_EQ = 0,
68RDM_GT = 1

RDM_ENC_TYPE

Enumeration for RDM encryption algorithms

The enumeration identifies the supported encryption algorithms.

RDM_ENC_XOR is the only type of encryption that is included in packages without export restrictions.

Enumerator
RDM_ENC_NONE

No encryption

RDM_ENC_XOR

XOR encryption

RDM_ENC_AES128

AES-128 encryption

RDM_ENC_AES192

AES-192 encryption

RDM_ENC_AES256

AES-256 encryption

RDM_ENC_DEFAULT

Default encryption

@ RDM_FALSE
Definition: psptypes.h:58
#define RDM_TCHAR_T
Definition: psptypes.h:128
RDM_ENC_TYPE
Definition: psptypes.h:80
@ RDM_ENC_AES128
Definition: psptypes.h:84
@ RDM_ENC_AES256
Definition: psptypes.h:86
@ RDM_EQ
Definition: psptypes.h:67
@ RDM_TRUE
Definition: psptypes.h:59
@ RDM_LT
Definition: psptypes.h:66
@ RDM_ENC_NONE
Definition: psptypes.h:82
RDM_BOOL_T
Definition: psptypes.h:56
@ RDM_ENC_XOR
Definition: psptypes.h:83
RDM_COMPARE
Definition: psptypes.h:64
@ RDM_ENC_AES192
Definition: psptypes.h:85
@ RDM_GT
Definition: psptypes.h:68
@ RDM_ENC_DEFAULT
Definition: psptypes.h:87