SysArgSlot

Syntax

#include <cafe/sysapp.h>

typedef enum SysArgType
{
    SYS_ARG_TYPE_NODATA = 0,
    SYS_ARG_TYPE_U32,
    SYS_ARG_TYPE_U64,
    SYS_ARG_TYPE_DATA_BLOCK,
    SYS_ARG_TYPE_CONST_DATA_BLOCK,
    SYS_ARG_TYPE_NUM
} SysArgType;

typedef enum SysArgID
{
    SYS_ARG_ID_TERMINATOR       = 0,
    SYS_ARG_ID_ANCHOR           = 100,
    SYS_ARG_ID_RESULT,
    SYS_ARG_ID_VOD_URL          = 200,
    SYS_ARG_ID_MIIVERSE_DATA    = 300,
    SYS_ARG_ID_JOIN_PID         = 400

} SysArgID;

typedef struct SysArgBase
{
    SysArgID        id;
    SysArgType      type;
} SysArgBase;

typedef struct SysArgU32
{
    SysArgBase      base;
    u32             value;
} SysArgU32;

typedef struct SysArgU64
{
    SysArgBase      base;
    u64             value;
} SysArgU64;

typedef struct SysArgDataBlock
{
    SysArgBase      base;
    char *          p_Data;
    u32             dataSize;
} SysArgDataBlock;

typedef struct SysArgConstDataBlock
{
    SysArgBase      base;
    const char *    cp_Data;
    u32             dataSize;
} SysArgConstDataBlock;

typedef union SysArgSlot
{
    SysArgBase              _base;
    SysArgU32               _u32;
    SysArgU64               _u64;
    SysArgDataBlock         _blk;
    SysArgConstDataBlock    _cblk;
} SysArgSlot;

Elements

_base This structure is shared among all of the structures included in the union. Determine which structure to access according to the value of this structure's type.
_u32 Access the data in this structure if the _base.type is SYS_ARG_TYPE_U32.
_u64 Access the data in this structure if the _base.type is SYS_ARG_TYPE_U64.
_blk Access the data in this structure if the _base.type is SYS_ARG_TYPE_DATA_BLOCK. p_Data is a pointer to the data. dataSize is the size of the data. Be sure not to write data in excess of dataSize.
_cblk Access the data in this structure if the _base.type is SYS_ARG_TYPE_CONST_DATA_BLOCK. cp_Data is a pointer to the data. dataSize is the size of the data.

Description

This union is passed to SYSGetArguments to get arguments.

See Also

SYSGetArguments

Revision History

2013-08-07 Initial version.


CONFIDENTIAL