PS2SDK
PS2 Homebrew Libraries
iopmgr.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, 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 
16 #ifndef __IOPMGR_H__
17 #define __IOPMGR_H__
18 
19 #include <types.h>
20 #include <irx.h>
21 #ifndef __IOMANX_H__
22 #include <ioman.h>
23 #endif
24 #include <loadcore.h>
25 
26 /* Module info entry. */
27 typedef ModuleInfo_t smod_mod_info_t __attribute__ ((deprecated)); //For backward-compatibility with older projects.
28 
29 /* from smod.c */
31 extern ModuleInfo_t *smod_get_mod_by_name(const char *name);
32 extern int smod_get_modcount_by_name(const char *name);
33 extern int smod_get_modversion_by_name(const char *name);
34 extern int smod_unload_module(const char *name);
35 
36 /* from slib.c */
37 extern iop_library_t *slib_get_lib_by_name(const char *name);
38 extern void *slib_get_exportlist_by_name(const char *name);
39 extern int slib_get_version_by_name(const char *name);
40 extern int slib_release_library(const char *name);
41 
42 /* from devices.c */
43 extern iop_device_t *iopmgr_get_iomandev(char *device);
44 extern iop_device_t *iopmgr_get_iomanxdev(char *device);
45 extern iop_device_t *iopmgr_get_device(char *device);
46 extern int iopmgr_get_devicetype(char *device);
47 extern int iopmgr_get_devicelist(int man,int devtype,char *buffer);
48 
49 /* from modules.c */
50 
51 /* These are the types returned by the devicetype call as return values. */
52 #define IOPMGR_DEVTYPE_INVALID 0
53 #define IOPMGR_DEVTYPE_IOMAN 1
54 #define IOPMGR_DEVTYPE_IOMANX 2
55 #define IOPMGR_DEVTYPE_ALL 0xffff
56 
57 /* iomgr module identifier */
58 #define IOPMGR_MODNAME "IOP_Manager"
59 #define IOPMGR_LIBNAME "iopmgr"
60 
61 /* iomgr module version number, so programs can check required version is installed */
62 #define IOPMGR_VERSION_HIGH 1
63 #define IOPMGR_VERSION_LOW 1
64 
65 /* defines for ioman and iomanx module identifiers , so we can locate them */
66 #define IOPMGR_IOMAN_IDENT "IO/File_Manager"
67 #define IOPMGR_IOMANX_IDENT "IOX/File_Manager"
68 
69 #define iopmgr_IMPORTS_start DECLARE_IMPORT_TABLE(iopmgr, 1, 1)
70 #define iopmgr_IMPORTS_end END_IMPORT_TABLE
71 
72 #define I_smod_get_next_mod DECLARE_IMPORT(4, smod_get_next_mod)
73 #define I_smod_get_mod_by_name DECLARE_IMPORT(5, smod_get_mod_by_name)
74 #define I_smod_get_modcount_by_name DECLARE_IMPORT(6, smod_get_modcount_by_name)
75 #define I_smod_get_modversion_by_name DECLARE_IMPORT(7, smod_get_modversion_by_name)
76 #define I_smod_unload_module DECLARE_IMPORT(8, smod_unload_module)
77 #define I_slib_get_lib_by_name DECLARE_IMPORT(10, slib_get_lib_by_name)
78 #define I_slib_get_exportlist_by_name DECLARE_IMPORT(11, slib_get_exportlist_by_name)
79 #define I_slib_get_version_by_name DECLARE_IMPORT(12, slib_get_version_by_name)
80 #define I_slib_release_library DECLARE_IMPORT(13, slib_release_library)
81 #define I_iopmgr_get_iomandev DECLARE_IMPORT(15, iopmgr_get_iomandev)
82 #define I_iopmgr_get_iomanxdev DECLARE_IMPORT(16, iopmgr_get_iomanxdev)
83 #define I_iopmgr_get_device DECLARE_IMPORT(17, iopmgr_get_device)
84 #define I_iopmgr_get_devicetype DECLARE_IMPORT(18, iopmgr_get_devicetype)
85 #define I_iopmgr_get_devicelist DECLARE_IMPORT(19, iopmgr_get_devicelist)
86 
87 #endif /* __IOPMGR_H__ */
slib_get_exportlist_by_name
void * slib_get_exportlist_by_name(const char *name)
Definition: slib.c:62
iopmgr_get_devicelist
int iopmgr_get_devicelist(int man, int devtype, char *buffer)
Definition: devices.c:102
smod_get_modversion_by_name
int smod_get_modversion_by_name(const char *name)
Definition: smod.c:115
iopmgr_get_devicetype
int iopmgr_get_devicetype(char *device)
Definition: devices.c:184
smod_get_modcount_by_name
int smod_get_modcount_by_name(const char *name)
Definition: smod.c:88
loadcore.h
iopmgr_get_iomandev
iop_device_t * iopmgr_get_iomandev(char *device)
Definition: devices.c:34
_iop_library
Definition: loadcore.h:68
smod_unload_module
int smod_unload_module(const char *name)
Definition: smod.c:136
iopmgr_get_device
iop_device_t * iopmgr_get_device(char *device)
Definition: devices.c:163
_smod_mod_info
Definition: smod.h:24
irx.h
slib_get_lib_by_name
iop_library_t * slib_get_lib_by_name(const char *name)
Definition: slib.c:37
ioman.h
iopmgr_get_iomanxdev
iop_device_t * iopmgr_get_iomanxdev(char *device)
Definition: devices.c:67
smod_get_next_mod
ModuleInfo_t * smod_get_next_mod(ModuleInfo_t *cur_mod)
Definition: smod.c:39
slib_release_library
int slib_release_library(const char *name)
Definition: slib.c:103
smod_get_mod_by_name
ModuleInfo_t * smod_get_mod_by_name(const char *name)
Definition: smod.c:63
slib_get_version_by_name
int slib_get_version_by_name(const char *name)
Definition: slib.c:82
__attribute__
Definition: gif_registers.h:38
_iop_device
Definition: ioman.h:64
_ModuleInfo
Definition: loadcore.h:31