PSPSDK 2024-12-24
Loading...
Searching...
No Matches
pspreg.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspreg.h - Prototypes for the sceReg library.
7 *
8 * Copyright (c) 2005 James F
9 *
10 */
11
12#ifndef __REG_H__
13#define __REG_H__
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
23#define SYSTEM_REGISTRY "/system"
24
26#define REG_KEYNAME_SIZE 27
27
40
42typedef unsigned int REGHANDLE;
43
46{
47 unsigned int regtype; /* 0x0, set to 1 only for system */
49 char name[256]; /* 0x4-0x104 */
51 unsigned int namelen; /* 0x104 */
53 unsigned int unk2; /* 0x108 */
55 unsigned int unk3; /* 0x10C */
56};
57
67int sceRegOpenRegistry(struct RegParam *reg, int mode, REGHANDLE *h);
68
77
86
97int sceRegOpenCategory(REGHANDLE h, const char *name, int mode, REGHANDLE *hd);
98
108
117
126
138int sceRegGetKeyInfo(REGHANDLE hd, const char *name, REGHANDLE *hk, unsigned int *type, SceSize *size);
139
150int sceRegGetKeyInfoByName(REGHANDLE hd, const char *name, unsigned int *type, SceSize *size);
151
163
174int sceRegGetKeyValueByName(REGHANDLE hd, const char *name, void *buf, SceSize size);
175
186int sceRegSetKeyValue(REGHANDLE hd, const char *name, const void *buf, SceSize size);
187
197
207int sceRegGetKeys(REGHANDLE hd, char *buf, int num);
208
220
229
232#ifdef __cplusplus
233}
234#endif
235
236#endif
unsigned int REGHANDLE
Typedef for a registry handle.
Definition pspreg.h:42
int sceRegGetKeyInfoByName(REGHANDLE hd, const char *name, unsigned int *type, SceSize *size)
Get a key's information by name.
int sceRegGetKeyInfo(REGHANDLE hd, const char *name, REGHANDLE *hk, unsigned int *type, SceSize *size)
Get a key's information.
int sceRegFlushCategory(REGHANDLE hd)
Flush the registry directory to disk.
int sceRegGetKeyValue(REGHANDLE hd, REGHANDLE hk, void *buf, SceSize size)
Get a key's value.
int sceRegFlushRegistry(REGHANDLE h)
Flush the registry to disk.
int sceRegSetKeyValue(REGHANDLE hd, const char *name, const void *buf, SceSize size)
Set a key's value.
int sceRegCloseRegistry(REGHANDLE h)
Close the registry.
int sceRegGetKeysNum(REGHANDLE hd, int *num)
Get number of subkeys in the current dir.
int sceRegGetKeyValueByName(REGHANDLE hd, const char *name, void *buf, SceSize size)
Get a key's value by name.
int sceRegRemoveCategory(REGHANDLE h, const char *name)
Remove a registry dir.
int sceRegGetKeys(REGHANDLE hd, char *buf, int num)
Get the key names in the current directory.
int sceRegOpenRegistry(struct RegParam *reg, int mode, REGHANDLE *h)
Open the registry.
int sceRegCreateKey(REGHANDLE hd, const char *name, int type, SceSize size)
Create a key.
int sceRegRemoveRegistry(struct RegParam *reg)
Remove a registry (HONESTLY, DO NOT USE)
int sceRegOpenCategory(REGHANDLE h, const char *name, int mode, REGHANDLE *hd)
Open a registry directory.
RegKeyTypes
Key types.
Definition pspreg.h:30
int sceRegCloseCategory(REGHANDLE hd)
Close the registry directory.
@ REG_TYPE_INT
Key is an integer (4 bytes)
Definition pspreg.h:34
@ REG_TYPE_STR
Key is a string.
Definition pspreg.h:36
@ REG_TYPE_BIN
Key is a binary string.
Definition pspreg.h:38
@ REG_TYPE_DIR
Key is a directory.
Definition pspreg.h:32
unsigned int SceSize
Definition pspkerneltypes.h:27
char * name
Definition pspsysmem_kernel.h:4
unsigned char size
Definition pspsysmem_kernel.h:6
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:2
float x
Definition psptypes.h:0
Struct used to open a registry.
Definition pspreg.h:46
char name[256]
Seemingly never used, set to SYSTEM_REGISTRY.
Definition pspreg.h:49
unsigned int unk2
Unknown, set to 1.
Definition pspreg.h:53
unsigned int regtype
Definition pspreg.h:47
unsigned int unk3
Unknown, set to 1.
Definition pspreg.h:55
unsigned int namelen
Length of the name.
Definition pspreg.h:51