mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Revise LR API to use actual LR function names
This commit is contained in:
parent
65cca4bf13
commit
1cc0ac7a94
@ -20,22 +20,22 @@ typedef struct {
|
||||
Result lrInitialize(void);
|
||||
void lrExit(void);
|
||||
|
||||
Result lrGetLocationResolver(FsStorageId storage, LrLocationResolver* out);
|
||||
Result lrGetRegisteredLocationResolver(LrRegisteredLocationResolver* out);
|
||||
Result lrOpenLocationResolver(FsStorageId storage, LrLocationResolver* out);
|
||||
Result lrOpenRegisteredLocationResolver(LrRegisteredLocationResolver* out);
|
||||
// TODO: Other ILocationResolverManager commands
|
||||
|
||||
// ILocationResolver
|
||||
Result lrLrGetProgramPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrSetProgramPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrGetControlPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrGetUserControlPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrSetControlPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrGetDocHtmlPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrSetDocHtmlPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrGetInfoHtmlPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrSetInfoHtmlPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrClearOverridePaths(LrLocationResolver* lr);
|
||||
Result lrLrResolveProgramPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrRedirectProgramPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrResolveApplicationControlPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrResolveApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrResolveDataPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrRedirectApplicationControlPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrRedirectApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrResolveLegalInformationPath(LrLocationResolver* lr, u64 tid, char *out);
|
||||
Result lrLrRedirectLegalInformationPath(LrLocationResolver* lr, u64 tid, const char *path);
|
||||
Result lrLrRefresh(LrLocationResolver* lr);
|
||||
|
||||
// IRegisteredLocationResolver
|
||||
Result lrRegLrGetProgramPath(LrRegisteredLocationResolver* reg, u64 tid, char *out);
|
||||
Result lrRegLrResolveProgramPath(LrRegisteredLocationResolver* reg, u64 tid, char *out);
|
||||
// TODO: Other IRegisteredLocationResolver commands
|
||||
|
@ -27,7 +27,7 @@ void lrExit(void) {
|
||||
}
|
||||
}
|
||||
|
||||
Result lrGetLocationResolver(FsStorageId storage, LrLocationResolver* out) {
|
||||
Result lrOpenLocationResolver(FsStorageId storage, LrLocationResolver* out) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
@ -63,7 +63,7 @@ Result lrGetLocationResolver(FsStorageId storage, LrLocationResolver* out) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result lrGetRegisteredLocationResolver(LrRegisteredLocationResolver* out) {
|
||||
Result lrOpenRegisteredLocationResolver(LrRegisteredLocationResolver* out) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
@ -98,10 +98,10 @@ Result lrGetRegisteredLocationResolver(LrRegisteredLocationResolver* out) {
|
||||
}
|
||||
|
||||
/*
|
||||
All the LocationResolver/RegisteredLocationResolver "Get" commands have a common API.
|
||||
All the LocationResolver/RegisteredLocationResolver "Resolve" commands have a common API.
|
||||
This is a helper function to perform the work for those funcs, given a command ID.
|
||||
*/
|
||||
static Result _lrGetPath(Service* s, u64 cmd_id, u64 tid, char *out) {
|
||||
static Result _lrResolvePath(Service* s, u64 cmd_id, u64 tid, char *out) {
|
||||
char out_path[FS_MAX_PATH] = {0};
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
@ -140,10 +140,10 @@ static Result _lrGetPath(Service* s, u64 cmd_id, u64 tid, char *out) {
|
||||
}
|
||||
|
||||
/*
|
||||
All the LocationResolver/RegisteredLocationResolver "Set" commands have a common API.
|
||||
All the LocationResolver/RegisteredLocationResolver "Redirect" commands have a common API.
|
||||
This is a helper function to perform the work for those funcs, given a command ID.
|
||||
*/
|
||||
static Result _lrSetPath(Service* s, u64 cmd_id, u64 tid, const char *path) {
|
||||
static Result _lrRedirectPath(Service* s, u64 cmd_id, u64 tid, const char *path) {
|
||||
char send_path[FS_MAX_PATH] = {0};
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
@ -179,43 +179,43 @@ static Result _lrSetPath(Service* s, u64 cmd_id, u64 tid, const char *path) {
|
||||
}
|
||||
|
||||
|
||||
Result lrLrGetProgramPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrGetPath(&lr->s, 0, tid, out);
|
||||
Result lrLrResolveProgramPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrResolvePath(&lr->s, 0, tid, out);
|
||||
}
|
||||
|
||||
Result lrLrSetProgramPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrSetPath(&lr->s, 1, tid, path);
|
||||
Result lrLrRedirectProgramPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrRedirectPath(&lr->s, 1, tid, path);
|
||||
}
|
||||
|
||||
Result lrLrGetUserControlPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrGetPath(&lr->s, 2, tid, out);
|
||||
Result lrLrResolveApplicationControlPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrResolvePath(&lr->s, 2, tid, out);
|
||||
}
|
||||
|
||||
Result lrLrGetControlPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrGetPath(&lr->s, 4, tid, out);
|
||||
Result lrLrResolveApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrResolvePath(&lr->s, 3, tid, out);
|
||||
}
|
||||
|
||||
Result lrLrSetControlPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrSetPath(&lr->s, 5, tid, path);
|
||||
Result lrLrResolveDataPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrResolvePath(&lr->s, 4, tid, out);
|
||||
}
|
||||
|
||||
Result lrLrGetDocHtmlPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrGetPath(&lr->s, 3, tid, out);
|
||||
Result lrLrRedirectApplicationControlPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrRedirectPath(&lr->s, 5, tid, path);
|
||||
}
|
||||
|
||||
Result lrLrSetDocHtmlPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrSetPath(&lr->s, 6, tid, path);
|
||||
Result lrLrRedirectApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrRedirectPath(&lr->s, 6, tid, path);
|
||||
}
|
||||
|
||||
Result lrLrGetInfoHtmlPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrGetPath(&lr->s, 7, tid, out);
|
||||
Result lrLrResolveLegalInformationPath(LrLocationResolver* lr, u64 tid, char *out) {
|
||||
return _lrResolvePath(&lr->s, 7, tid, out);
|
||||
}
|
||||
|
||||
Result lrLrSetInfoHtmlPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrSetPath(&lr->s, 8, tid, path);
|
||||
Result lrLrRedirectLegalInformationPath(LrLocationResolver* lr, u64 tid, const char *path) {
|
||||
return _lrRedirectPath(&lr->s, 8, tid, path);
|
||||
}
|
||||
|
||||
Result lrLrClearOverridePaths(LrLocationResolver* lr) {
|
||||
Result lrLrRefresh(LrLocationResolver* lr) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
@ -246,6 +246,6 @@ Result lrLrClearOverridePaths(LrLocationResolver* lr) {
|
||||
}
|
||||
|
||||
|
||||
Result lrRegLrGetProgramPath(LrRegisteredLocationResolver* reg, u64 tid, char *out) {
|
||||
return _lrGetPath(®->s, 0, tid, out);
|
||||
Result lrRegLrResolveProgramPath(LrRegisteredLocationResolver* reg, u64 tid, char *out) {
|
||||
return _lrResolvePath(®->s, 0, tid, out);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user