2020-09-20 01:21:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <regex>
|
|
|
|
#include <set>
|
2020-09-26 15:55:24 +01:00
|
|
|
#include <switch.h>
|
2020-09-20 01:21:28 +01:00
|
|
|
#include "constants.hpp"
|
2021-02-10 16:28:47 +00:00
|
|
|
#include <borealis.hpp>
|
|
|
|
|
2020-09-20 01:21:28 +01:00
|
|
|
|
2020-09-26 15:55:24 +01:00
|
|
|
typedef char NsApplicationName[0x201];
|
|
|
|
typedef uint8_t NsApplicationIcon[0x20000];
|
|
|
|
|
|
|
|
struct app
|
|
|
|
{
|
|
|
|
uint64_t tid;
|
|
|
|
NsApplicationName name;
|
|
|
|
NsApplicationIcon icon;
|
|
|
|
brls::ListItem* listItem;
|
|
|
|
};
|
|
|
|
|
2020-09-20 01:21:28 +01:00
|
|
|
std::vector<std::string> htmlProcess(std::string s, std::regex rgx);
|
|
|
|
void createTree(std::string path);
|
|
|
|
void clearConsole();
|
|
|
|
bool isArchive(const char * path);
|
|
|
|
void downloadArchive(std::string url, archiveType type);
|
2020-10-07 01:08:39 +01:00
|
|
|
void extractArchive(archiveType type, std::string tag = "0");
|
2020-09-20 01:21:28 +01:00
|
|
|
void progressTest(std::string url, archiveType type);
|
|
|
|
std::string formatListItemTitle(const std::string str, size_t maxScore = 140);
|
|
|
|
std::string formatApplicationId(u64 ApplicationId);
|
|
|
|
std::set<std::string> readLineByLine(const char * path);
|
|
|
|
std::vector<std::string> fetchPayloads();
|
2020-09-20 21:58:40 +01:00
|
|
|
void shut_down(bool reboot = false);
|
2020-09-22 22:12:05 +01:00
|
|
|
int showDialogBox(std::string text, std::string opt);
|
2020-09-21 19:36:46 +01:00
|
|
|
int showDialogBox(std::string text, std::string opt1, std::string opt2);
|
2020-09-23 12:21:05 +01:00
|
|
|
std::string getLatestTag(const char *url);
|
2020-09-29 15:41:43 +01:00
|
|
|
Result CopyFile(const char src_path[FS_MAX_PATH], const char dest_path[FS_MAX_PATH]);
|
|
|
|
void saveVersion(std::string version, const char* path);
|
2021-01-28 19:26:41 +00:00
|
|
|
std::string readVersion(const char* path);
|
2021-02-15 00:02:34 +00:00
|
|
|
void cp(const char *to, const char *from);
|
2021-02-15 14:19:49 +00:00
|
|
|
std::string copyFiles(const char* path);
|
2021-02-17 18:00:12 +00:00
|
|
|
int removeDir(const char* path);
|
2021-03-02 14:05:06 +00:00
|
|
|
bool isErista();
|
|
|
|
void removeSysmodulesFlags(const char * directory);
|