MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / TryFindApplicationTicket

Function TryFindApplicationTicket

Goldleaf/source/cnt/cnt_Ticket.cpp:152–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 bool TryFindApplicationTicket(const u64 app_id, Ticket &out_tik) {
153 ScopedLock lk(g_TicketsLock);
154 const auto tik_it = std::find_if(g_Tickets.begin(), g_Tickets.end(), [app_id](const Ticket &tik) {
155 return esGetRightsIdApplicationId(&tik.rights_id) == app_id;
156 });
157 if(tik_it != g_Tickets.end()) {
158 out_tik = *tik_it;
159 return true;
160 }
161 else {
162 return false;
163 }
164 }
165
166 TicketFile ReadTicket(const std::string &path) {
167 TicketFile tik_file = {};

Callers 1

DisplayContentInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected