1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-13 21:56:42 +00:00
AIO-switch-updater/include/extract.hpp

30 lines
944 B
C++
Raw Normal View History

2020-09-20 01:21:28 +01:00
#pragma once
2021-02-10 16:28:47 +00:00
#include "constants.hpp"
2020-09-20 01:21:28 +01:00
#include <switch.h>
#include <set>
2021-02-10 16:28:47 +00:00
#include <string>
#include <vector>
2020-09-20 01:21:28 +01:00
static constexpr u32 MaxTitleCount = 64000;
typedef struct Title {
std::string id;
std::string name;
bool operator ==(const Title&x) const {
return id == x.id;
}
bool operator <(const Title&x) const {
return id < x.id;
}
} Title;
void extract(const char* filename, const char* workingPath = ROOT_PATH, int overwriteInis = 1);
void extract(const char * filename, const char* workingPath, const char* toExclude);
2020-09-20 01:21:28 +01:00
std::string formatApplicationId(u64 ApplicationId);
std::vector<Title> getInstalledTitlesNs();
std::vector<Title> excludeTitles(const char* path, std::vector<Title> listedTitles);
void writeTitlesToFile(std::set<std::string> titles, const char* path);
2020-09-20 01:21:28 +01:00
void extractCheats(const char * zipPath, std::vector<Title> titles, CFW cfw, bool credits = false);
void removeCheats(CFW cfw);