pspsdk-1.0+beta2
Main Page
Modules
Data Structures
Files
File List
Globals
pspnet_adhocmatching.h
Go to the documentation of this file.
1
/*
2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5
*
6
* pspnet_adhocmatching.h - PSP Adhoc matching networking libraries.
7
*
8
* Copyright (c) 2006 James F.
9
* Copyright (c) 2008 InsertWittyName <tias_dp@hotmail.com>
10
*
11
* Based on the adhoc code in SMS Plus
12
*
13
* $Id: pspnet_adhocmatching.h 2433 2008-10-15 10:00:27Z iwn $
14
*/
15
#ifndef __PSPNETMATCHING_ADHOC_H__
16
#define __PSPNETMATCHING_ADHOC_H__
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
25
enum
pspAdhocMatchingEvents
26
{
28
PSP_ADHOC_MATCHING_EVENT_HELLO
= 1,
30
PSP_ADHOC_MATCHING_EVENT_JOIN
= 2,
32
PSP_ADHOC_MATCHING_EVENT_LEFT
= 3,
34
PSP_ADHOC_MATCHING_EVENT_REJECT
= 4,
36
PSP_ADHOC_MATCHING_EVENT_CANCEL
= 5,
38
PSP_ADHOC_MATCHING_EVENT_ACCEPT
= 6,
40
PSP_ADHOC_MATCHING_EVENT_COMPLETE
= 7,
42
PSP_ADHOC_MATCHING_EVENT_TIMEOUT
= 8,
44
PSP_ADHOC_MATCHING_EVENT_ERROR
= 9,
46
PSP_ADHOC_MATCHING_EVENT_DISCONNECT
= 10,
48
PSP_ADHOC_MATCHING_EVENT_DATA
= 11,
50
PSP_ADHOC_MATCHING_EVENT_DATA_CONFIRM
= 12,
52
PSP_ADHOC_MATCHING_EVENT_DATA_TIMEOUT
= 13
53
};
54
58
enum
pspAdhocMatchingModes
59
{
61
PSP_ADHOC_MATCHING_MODE_HOST
= 1,
63
PSP_ADHOC_MATCHING_MODE_CLIENT
= 2,
65
PSP_ADHOC_MATCHING_MODE_PTP
= 3
66
};
67
71
struct
pspAdhocMatchingMember
72
{
73
struct
pspAdhocMatchingMember
*
next
;
74
unsigned
char
mac
[6];
75
char
unknown
[2];
76
};
77
81
struct
pspAdhocPoolStat
82
{
84
int
size
;
86
int
maxsize
;
88
int
freesize
;
89
};
90
98
int
sceNetAdhocMatchingInit
(
int
memsize);
99
105
int
sceNetAdhocMatchingTerm
(
void
);
106
108
typedef
void (*
pspAdhocMatchingCallback
)(
int
matchingid,
int
event,
unsigned
char
*mac,
int
optlen,
void
*optdata);
109
125
int
sceNetAdhocMatchingCreate
(
int
mode,
int
maxpeers,
unsigned
short
port,
int
bufsize,
unsigned
int
hellodelay,
unsigned
int
pingdelay,
int
initcount,
unsigned
int
msgdelay,
pspAdhocMatchingCallback
callback);
126
134
int
sceNetAdhocMatchingDelete
(
int
matchingid);
135
149
int
sceNetAdhocMatchingStart
(
int
matchingid,
int
evthpri,
int
evthstack,
int
inthpri,
int
inthstack,
int
optlen,
void
*optdata);
150
158
int
sceNetAdhocMatchingStop
(
int
matchingid);
159
170
int
sceNetAdhocMatchingSelectTarget
(
int
matchingid,
unsigned
char
*mac,
int
optlen,
void
*optdata);
171
180
int
sceNetAdhocMatchingCancelTarget
(
int
matchingid,
unsigned
char
*mac);
181
192
int
sceNetAdhocMatchingCancelTargetWithOpt
(
int
matchingid,
unsigned
char
*mac,
int
optlen,
void
*optdata);
193
204
int
sceNetAdhocMatchingSendData
(
int
matchingid,
unsigned
char
*mac,
int
datalen,
void
*data);
205
214
int
sceNetAdhocMatchingAbortSendData
(
int
matchingid,
unsigned
char
*mac);
215
225
int
sceNetAdhocMatchingSetHelloOpt
(
int
matchingid,
int
optlen,
void
*optdata);
226
236
int
sceNetAdhocMatchingGetHelloOpt
(
int
matchingid,
int
*optlen,
void
*optdata);
237
247
int
sceNetAdhocMatchingGetMembers
(
int
matchingid,
int
*length,
void
*buf);
248
254
int
sceNetAdhocMatchingGetPoolMaxAlloc
(
void
);
255
263
int
sceNetAdhocMatchingGetPoolStat
(
struct
pspAdhocPoolStat
*poolstat);
264
265
#ifdef __cplusplus
266
}
267
#endif
268
269
#endif
src
net
pspnet_adhocmatching.h
Generated on Sat Apr 9 2016 07:00:25 for pspsdk-1.0+beta2 by
1.8.1.2