pspreg.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspreg.h - Prototypes for the sceReg library.
00007  *
00008  * Copyright (c) 2005 James F
00009  *
00010  * $Id: pspreg.h 2096 2006-12-10 14:19:25Z tyranid $
00011  */
00012 
00013 #ifndef __REG_H__
00014 #define __REG_H__
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00022 
00024 #define SYSTEM_REGISTRY "/system"
00025 
00027 #define REG_KEYNAME_SIZE 27
00028 
00030 enum RegKeyTypes
00031 {
00033         REG_TYPE_DIR = 1,
00035         REG_TYPE_INT = 2,
00037         REG_TYPE_STR = 3,
00039         REG_TYPE_BIN = 4,
00040 };
00041 
00043 typedef unsigned int REGHANDLE;
00044 
00046 struct RegParam
00047 {
00048         unsigned int regtype;     /* 0x0, set to 1 only for system */
00050         char name[256];        /* 0x4-0x104 */
00052         unsigned int namelen;     /* 0x104 */
00054         unsigned int unk2;     /* 0x108 */
00056         unsigned int unk3;     /* 0x10C */
00057 };
00058 
00068 int sceRegOpenRegistry(struct RegParam *reg, int mode, REGHANDLE *h);
00069 
00077 int sceRegFlushRegistry(REGHANDLE h);
00078 
00086 int sceRegCloseRegistry(REGHANDLE h);
00087 
00098 int sceRegOpenCategory(REGHANDLE h, const char *name, int mode, REGHANDLE *hd);
00099 
00108 int sceRegRemoveCategory(REGHANDLE h, const char *name);
00109 
00117 int sceRegCloseCategory(REGHANDLE hd);
00118 
00126 int sceRegFlushCategory(REGHANDLE hd);
00127 
00139 int sceRegGetKeyInfo(REGHANDLE hd, const char *name, REGHANDLE *hk, unsigned int *type, SceSize *size);
00140 
00151 int sceRegGetKeyInfoByName(REGHANDLE hd, const char *name, unsigned int *type, SceSize *size);
00152 
00163 int sceRegGetKeyValue(REGHANDLE hd, REGHANDLE hk, void *buf, SceSize size);
00164 
00175 int sceRegGetKeyValueByName(REGHANDLE hd, const char *name, void *buf, SceSize size);
00176 
00187 int sceRegSetKeyValue(REGHANDLE hd, const char *name, const void *buf, SceSize size);
00188 
00197 int sceRegGetKeysNum(REGHANDLE hd, int *num);
00198 
00208 int sceRegGetKeys(REGHANDLE hd, char *buf, int num);
00209 
00220 int sceRegCreateKey(REGHANDLE hd, const char *name, int type, SceSize size);
00221 
00229 int sceRegRemoveRegistry(struct RegParam *reg);
00230 
00233 #ifdef __cplusplus
00234 }
00235 #endif
00236 
00237 #endif

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2