libnx  v4.8.0
lr.h
Go to the documentation of this file.
1 /**
2  * @file lr.h
3  * @brief Location Resolver (lr) service IPC wrapper.
4  * @author SciresM
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../sf/service.h"
10 #include "../services/ncm_types.h"
11 
12 typedef struct {
13  Service s;
15 
16 typedef struct {
17  Service s;
19 
20 /// Initialize lr.
22 
23 /// Exit lr.
24 void lrExit(void);
25 
26 /// Gets the Service object for the actual lr service session.
28 
29 Result lrOpenLocationResolver(NcmStorageId storage, LrLocationResolver* out);
30 Result lrOpenRegisteredLocationResolver(LrRegisteredLocationResolver* out);
31 // TODO: Other ILocationResolverManager commands
32 
33 // ILocationResolver
34 Result lrLrResolveProgramPath(LrLocationResolver* lr, u64 tid, char *out);
35 Result lrLrRedirectProgramPath(LrLocationResolver* lr, u64 tid, const char *path);
36 Result lrLrResolveApplicationControlPath(LrLocationResolver* lr, u64 tid, char *out);
37 Result lrLrResolveApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, char *out);
38 Result lrLrResolveDataPath(LrLocationResolver* lr, u64 tid, char *out);
39 Result lrLrRedirectApplicationControlPath(LrLocationResolver* lr, u64 tid, u64 tid2, const char *path);
40 Result lrLrRedirectApplicationHtmlDocumentPath(LrLocationResolver* lr, u64 tid, u64 tid2, const char *path);
41 Result lrLrResolveApplicationLegalInformationPath(LrLocationResolver* lr, u64 tid, char *out);
42 Result lrLrRedirectApplicationLegalInformationPath(LrLocationResolver* lr, u64 tid, u64 tid2, const char *path);
43 Result lrLrRefresh(LrLocationResolver* lr);
44 
45 /// Only available on [5.0.0+].
47 
48 // IRegisteredLocationResolver
49 Result lrRegLrResolveProgramPath(LrRegisteredLocationResolver* reg, u64 tid, char *out);
50 // TODO: Other IRegisteredLocationResolver commands
Result lrLrEraseProgramRedirection(LrLocationResolver *lr, u64 tid)
Only available on [5.0.0+].
Result lrInitialize(void)
Initialize lr.
Service * lrGetServiceSession(void)
Gets the Service object for the actual lr service session.
void lrExit(void)
Exit lr.
NcmStorageId
StorageId.
Definition: ncm_types.h:12
Definition: lr.h:12
Definition: lr.h:16
Service object structure.
Definition: service.h:14
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
u32 Result
Function error code result type.
Definition: types.h:44