MCPcopy Create free account
hub / github.com/devkitPro/libctru / aptGetServiceHandle

Function aptGetServiceHandle

libctru/source/services/apt.c:122–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static Result aptGetServiceHandle(Handle* aptuHandle)
123{
124 static const char* serviceName;
125 static const char* const serviceNameTable[3] = {"APT:S", "APT:A", "APT:U"};
126
127 if (serviceName)
128 return srvGetServiceHandleDirect(aptuHandle, serviceName);
129
130 Result ret;
131 int i;
132 for (i = 0; i < 3; i ++)
133 {
134 ret = srvGetServiceHandleDirect(aptuHandle, serviceNameTable[i]);
135 if (R_SUCCEEDED(ret))
136 {
137 serviceName = serviceNameTable[i];
138 break;
139 }
140 }
141
142 return ret;
143}
144
145static inline int countPrmWords(u32 hdr)
146{

Callers 1

aptSendCommandFunction · 0.85

Calls 1

Tested by

no test coverage detected