So a new header would look like this:
Code: Select all
#ifndef HBL_API
#define HBL_API
// All functions return 0 on success and a value < 0 on error
#define HBL_ERROR_OK 0
#define HBL_ERROR_GENERIC 0x80000001
#define HBL_ERROR_BUFFER_TOO_SMALL 0x80000002
#define HBL_ERROR_INVALID_PARAMETER_ID 0x80000003
#define HBL_ERROR_PARAMETER_IS_READONLY 0x80000004
// String parameter IDs (R = readable, W = writable)
typedef enum
{
HBL_PARAM_HOMEBREW_PATH = 0, // R+W - starting folder for the menu
HBL_PARAM_NEXT_EXEC = 1, // R+W - path of the EBOOT that is run next
HBL_PARAM_CREDITS_STRING = 2, // R - HBL credits string
HBL_PARAM_VERSION_STRING = 3 // R - HBL version string
}
HblStringParameter;
// Integer parameter IDs (R = readable, W = writable)
typedef enum
{
HBL_PARAM_NEXT_EXEC_IS_MENU = 0, // R+W - treat the next EBOOT as an old style menu (API in argv[1])
HBL_PARAM_VERSION = 1, // R - HBL revision
HBL_PARAM_EXIT_TO_XMB = 2 // R+W - quit to the XMB after the current homebrew exits
}
HblIntParameter;
// Set the string parameter indicated by the ID
int hblSetParamString(HblStringParameter id, char* buffer);
// Get the string parameter indicated by the ID, bufferSize includes the trailing 0
int hblGetParamString(HblStringParameter id, char* buffer, unsigned int bufferSize);
// Get the size of a buffer (including the trailing 0) to hold the indicated parameter
int hblGetParamStringSize(HblStringParameter id);
// Set the int parameter indicated by the ID
int hblSetParamInt(HblIntParameter id, int value);
// Get the int parameter indicated by the ID
int hblGetParamInt(HblIntParameter id, int value);
#endif
Advertising