|
| 1 | +/* |
| 2 | +# _____ ___ ____ ___ ____ |
| 3 | +# ____| | ____| | | |____| |
| 4 | +# | ___| |____ ___| ____| | \ PS2DEV Open Source Project. |
| 5 | +#----------------------------------------------------------------------- |
| 6 | +# Copyright ps2dev - http://www.ps2dev.org |
| 7 | +# Licenced under Academic Free License version 2.0 |
| 8 | +# Review ps2sdk README & LICENSE files for further details. |
| 9 | +*/ |
| 10 | + |
| 11 | +#ifndef _MSIFRPC_H |
| 12 | +#define _MSIFRPC_H |
| 13 | + |
| 14 | +typedef struct _sifm_rpc_data |
| 15 | +{ |
| 16 | + void *paddr; |
| 17 | + unsigned int pid; |
| 18 | + int tid; |
| 19 | + unsigned int mode; |
| 20 | +} sceSifMRpcData; |
| 21 | + |
| 22 | +typedef void (*sceSifMEndFunc)(void *); |
| 23 | + |
| 24 | +typedef struct _sifm_client_data |
| 25 | +{ |
| 26 | + sceSifMRpcData rpcd; |
| 27 | + int command; |
| 28 | + void *buff; |
| 29 | + void *cbuff; |
| 30 | + sceSifMEndFunc func; |
| 31 | + void *para; |
| 32 | + struct _sifm_serve_data *serve; |
| 33 | +} sceSifMClientData; |
| 34 | + |
| 35 | +typedef void *(*sceSifMRpcFunc)(unsigned int, void *, int); |
| 36 | + |
| 37 | +typedef struct _sifm_serve_data |
| 38 | +{ |
| 39 | + void *func_buff; |
| 40 | + int size; |
| 41 | + void *cfunc_buff; |
| 42 | + int csize; |
| 43 | + sceSifMClientData *client; |
| 44 | + void *paddr; |
| 45 | + unsigned int fno; |
| 46 | + void *receive; |
| 47 | + int rsize; |
| 48 | + int rmode; |
| 49 | + unsigned int rid; |
| 50 | + struct _sifm_serve_data *link; |
| 51 | + struct _sifm_serve_data *next; |
| 52 | + struct _sifm_queue_data *base; |
| 53 | + struct _sifm_serve_entry *sentry; |
| 54 | +} sceSifMServeData; |
| 55 | + |
| 56 | +typedef struct _sifm_serve_entry |
| 57 | +{ |
| 58 | + unsigned int mbxid; |
| 59 | + int command; |
| 60 | + sceSifMRpcFunc func; |
| 61 | + sceSifMRpcFunc cfunc; |
| 62 | + sceSifMServeData *serve_list; |
| 63 | + struct _sifm_serve_entry *next; |
| 64 | +} sceSifMServeEntry; |
| 65 | + |
| 66 | +extern void sceSifMInitRpc(unsigned int mode); |
| 67 | +extern int sceSifMTermRpc(int request, int flags); |
| 68 | +extern void sceSifMEntryLoop(sceSifMServeEntry *se, int request, sceSifMRpcFunc func, sceSifMRpcFunc cfunc); |
| 69 | + |
| 70 | +#define msifrpc_IMPORTS_start DECLARE_IMPORT_TABLE(msifrpc, 1, 2) |
| 71 | +#define msifrpc_IMPORTS_end END_IMPORT_TABLE |
| 72 | + |
| 73 | +#define I_sceSifMInitRpc DECLARE_IMPORT(4, sceSifMInitRpc) |
| 74 | +#define I_sceSifMTermRpc DECLARE_IMPORT(16, sceSifMTermRpc) |
| 75 | +#define I_sceSifMEntryLoop DECLARE_IMPORT(17, sceSifMEntryLoop) |
| 76 | + |
| 77 | +#endif |
0 commit comments