From de1463d7effc33b1335ecf6460a29f402fc43f90 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Wed, 14 Jun 2017 23:10:50 -0400 Subject: Add SceRegMgrForDriver functions --- include/kernel/registrymgr.h | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 include/kernel/registrymgr.h (limited to 'include/kernel/registrymgr.h') diff --git a/include/kernel/registrymgr.h b/include/kernel/registrymgr.h new file mode 100644 index 0000000..96565b7 --- /dev/null +++ b/include/kernel/registrymgr.h @@ -0,0 +1,84 @@ +#ifndef _PSP2_REGISTRYMGR_H_ +#define _PSP2_REGISTRYMGR_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Get a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to a buffer to hold the value + * @param size - The size of the buffer + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrGetKeyBin(const char *category, const char *name, void *buf, int size); + +/** + * Get a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to a int buffer to hold the value + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrGetKeyInt(const char* category, const char* name, int* buf); + +/** + * Get a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to a char buffer to hold the value + * @param size - The size of the buffer + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrGetKeyStr(const char* category, const char* name, char* buf, const int size); + +/** + * Set a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to a buffer to hold the value + * @param size - The size of the buffer + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrSetKeyBin(const char *category, const char *name, void *buf, int size); + +/** + * Set a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to an int buffer to hold the value + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrSetKeyInt(const char* category, const char* name, int buf); + +/** + * Set a key's information by category and name + * + * @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM) + * @param name - Name of the key + * @param buf - Pointer to a char buffer to hold the value + * @param size - The size of the buffer + * + * @return 0 on success, < 0 on error + */ +int sceRegMgrSetKeyStr(const char* category, const char* name, char* buf, const int size); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_REGISTRYMGR_H_ */ -- cgit v1.2.3