diff options
author | Sergi Granell | 2017-06-15 13:40:11 +0200 |
---|---|---|
committer | GitHub | 2017-06-15 13:40:11 +0200 |
commit | c97e63a89346069d8a4757c2de0f99f650d8bb45 (patch) | |
tree | f43c7b22e3744c98007033e696ffdf9ee281e57a /include/kernel | |
parent | Add UART, syscon, I2C nids. Add I2C header. (diff) | |
parent | Add SceRegMgrForDriver functions (diff) | |
download | vds-libraries-c97e63a89346069d8a4757c2de0f99f650d8bb45.tar.gz |
Merge pull request #185 from joel16/master
Add SceRegMgrForDriver functions
Diffstat (limited to 'include/kernel')
-rw-r--r-- | include/kernel/registrymgr.h | 84 |
1 files changed, 84 insertions, 0 deletions
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 <psp2/types.h> + +#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_ */ |