pspsdk-1.0+beta2
|
Go to the source code of this file.
Data Structures | |
struct | pspAdhocMatchingMember |
Linked list for sceNetAdhocMatchingGetMembers. More... | |
struct | pspAdhocPoolStat |
Linked list for sceNetAdhocMatchingGetMembers. More... |
Typedefs | |
typedef void(* | pspAdhocMatchingCallback )(int matchingid, int event, unsigned char *mac, int optlen, void *optdata) |
Matching callback. |
Enumerations | |
enum | pspAdhocMatchingEvents { PSP_ADHOC_MATCHING_EVENT_HELLO = 1, PSP_ADHOC_MATCHING_EVENT_JOIN = 2, PSP_ADHOC_MATCHING_EVENT_LEFT = 3, PSP_ADHOC_MATCHING_EVENT_REJECT = 4, PSP_ADHOC_MATCHING_EVENT_CANCEL = 5, PSP_ADHOC_MATCHING_EVENT_ACCEPT = 6, PSP_ADHOC_MATCHING_EVENT_COMPLETE = 7, PSP_ADHOC_MATCHING_EVENT_TIMEOUT = 8, PSP_ADHOC_MATCHING_EVENT_ERROR = 9, PSP_ADHOC_MATCHING_EVENT_DISCONNECT = 10, PSP_ADHOC_MATCHING_EVENT_DATA = 11, PSP_ADHOC_MATCHING_EVENT_DATA_CONFIRM = 12, PSP_ADHOC_MATCHING_EVENT_DATA_TIMEOUT = 13 } |
Matching events used in pspAdhocMatchingCallback. More... | |
enum | pspAdhocMatchingModes { PSP_ADHOC_MATCHING_MODE_HOST = 1, PSP_ADHOC_MATCHING_MODE_CLIENT = 2, PSP_ADHOC_MATCHING_MODE_PTP = 3 } |
Matching modes used in sceNetAdhocMatchingCreate. More... |
Functions | |
int | sceNetAdhocMatchingInit (int memsize) |
Initialise the Adhoc matching library. | |
int | sceNetAdhocMatchingTerm (void) |
Terminate the Adhoc matching library. | |
int | sceNetAdhocMatchingCreate (int mode, int maxpeers, unsigned short port, int bufsize, unsigned int hellodelay, unsigned int pingdelay, int initcount, unsigned int msgdelay, pspAdhocMatchingCallback callback) |
Create an Adhoc matching object. | |
int | sceNetAdhocMatchingDelete (int matchingid) |
Delete an Adhoc matching object. | |
int | sceNetAdhocMatchingStart (int matchingid, int evthpri, int evthstack, int inthpri, int inthstack, int optlen, void *optdata) |
Start a matching object. | |
int | sceNetAdhocMatchingStop (int matchingid) |
Stop a matching object. | |
int | sceNetAdhocMatchingSelectTarget (int matchingid, unsigned char *mac, int optlen, void *optdata) |
Select a matching target. | |
int | sceNetAdhocMatchingCancelTarget (int matchingid, unsigned char *mac) |
Cancel a matching target. | |
int | sceNetAdhocMatchingCancelTargetWithOpt (int matchingid, unsigned char *mac, int optlen, void *optdata) |
Cancel a matching target (with optional data) | |
int | sceNetAdhocMatchingSendData (int matchingid, unsigned char *mac, int datalen, void *data) |
Send data to a matching target. | |
int | sceNetAdhocMatchingAbortSendData (int matchingid, unsigned char *mac) |
Abort a data send to a matching target. | |
int | sceNetAdhocMatchingSetHelloOpt (int matchingid, int optlen, void *optdata) |
Set the optional hello message. | |
int | sceNetAdhocMatchingGetHelloOpt (int matchingid, int *optlen, void *optdata) |
Get the optional hello message. | |
int | sceNetAdhocMatchingGetMembers (int matchingid, int *length, void *buf) |
Get a list of matching members. | |
int | sceNetAdhocMatchingGetPoolMaxAlloc (void) |
Get the maximum memory usage by the matching library. | |
int | sceNetAdhocMatchingGetPoolStat (struct pspAdhocPoolStat *poolstat) |
Get the status of the memory pool used by the matching library. |
typedef void(* pspAdhocMatchingCallback)(int matchingid, int event, unsigned char *mac, int optlen, void *optdata) |
Matching callback.
Matching events used in pspAdhocMatchingCallback.
int sceNetAdhocMatchingAbortSendData | ( | int | matchingid, |
unsigned char * | mac | ||
) |
Abort a data send to a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to send the data to |
int sceNetAdhocMatchingCancelTarget | ( | int | matchingid, |
unsigned char * | mac | ||
) |
Cancel a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to cancel |
int sceNetAdhocMatchingCancelTargetWithOpt | ( | int | matchingid, |
unsigned char * | mac, | ||
int | optlen, | ||
void * | optdata | ||
) |
Cancel a matching target (with optional data)
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to cancel |
optlen | - Optional data length |
optdata | - Pointer to the optional data |
int sceNetAdhocMatchingCreate | ( | int | mode, |
int | maxpeers, | ||
unsigned short | port, | ||
int | bufsize, | ||
unsigned int | hellodelay, | ||
unsigned int | pingdelay, | ||
int | initcount, | ||
unsigned int | msgdelay, | ||
pspAdhocMatchingCallback | callback | ||
) |
Create an Adhoc matching object.
mode | - One of pspAdhocMatchingModes |
maxpeers | - Maximum number of peers to match (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST) |
port | - Port. Lumines uses 0x22B |
bufsize | - Receiving buffer size |
hellodelay | - Hello message send delay in microseconds (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST or PSP_ADHOC_MATCHING_MODE_PTP) |
pingdelay | - Ping send delay in microseconds. Lumines uses 0x5B8D80 (only used when mode is PSP_ADHOC_MATCHING_MODE_HOST or PSP_ADHOC_MATCHING_MODE_PTP) |
initcount | - Initial count of the of the resend counter. Lumines uses 3 |
msgdelay | - Message send delay in microseconds |
callback | - Callback to be called for matching |
int sceNetAdhocMatchingDelete | ( | int | matchingid | ) |
Delete an Adhoc matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
int sceNetAdhocMatchingGetHelloOpt | ( | int | matchingid, |
int * | optlen, | ||
void * | optdata | ||
) |
Get the optional hello message.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
optlen | - Length of the hello data |
optdata | - Pointer to the hello data |
int sceNetAdhocMatchingGetMembers | ( | int | matchingid, |
int * | length, | ||
void * | buf | ||
) |
Get a list of matching members.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
length | - The length of the list. |
buf | - An allocated area of size length. |
int sceNetAdhocMatchingGetPoolMaxAlloc | ( | void | ) |
Get the maximum memory usage by the matching library.
int sceNetAdhocMatchingGetPoolStat | ( | struct pspAdhocPoolStat * | poolstat | ) |
Get the status of the memory pool used by the matching library.
poolstat | - A pspAdhocPoolStat. |
int sceNetAdhocMatchingInit | ( | int | memsize | ) |
Initialise the Adhoc matching library.
memsize | - Internal memory pool size. Lumines uses 0x20000 |
int sceNetAdhocMatchingSelectTarget | ( | int | matchingid, |
unsigned char * | mac, | ||
int | optlen, | ||
void * | optdata | ||
) |
Select a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - MAC address to select |
optlen | - Optional data length |
optdata | - Pointer to the optional data |
int sceNetAdhocMatchingSendData | ( | int | matchingid, |
unsigned char * | mac, | ||
int | datalen, | ||
void * | data | ||
) |
Send data to a matching target.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
mac | - The MAC address to send the data to |
datalen | - Length of the data |
data | - Pointer to the data |
int sceNetAdhocMatchingSetHelloOpt | ( | int | matchingid, |
int | optlen, | ||
void * | optdata | ||
) |
Set the optional hello message.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
optlen | - Length of the hello data |
optdata | - Pointer to the hello data |
int sceNetAdhocMatchingStart | ( | int | matchingid, |
int | evthpri, | ||
int | evthstack, | ||
int | inthpri, | ||
int | inthstack, | ||
int | optlen, | ||
void * | optdata | ||
) |
Start a matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
evthpri | - Priority of the event handler thread. Lumines uses 0x10 |
evthstack | - Stack size of the event handler thread. Lumines uses 0x2000 |
inthpri | - Priority of the input handler thread. Lumines uses 0x10 |
inthstack | - Stack size of the input handler thread. Lumines uses 0x2000 |
optlen | - Size of hellodata |
optdata | - Pointer to block of data passed to callback |
int sceNetAdhocMatchingStop | ( | int | matchingid | ) |
Stop a matching object.
matchingid | - The ID returned from sceNetAdhocMatchingCreate |
int sceNetAdhocMatchingTerm | ( | void | ) |
Terminate the Adhoc matching library.