Repository navigation
Expand file tree
/
Copy pathExport.cpp
More file actions
63 lines (51 loc) · 1.95 KB
/
Copy pathExport.cpp
File metadata and controls
63 lines (51 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <cstdint>
#include <cstddef>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"
#include <atomic>
#include <stdexcept>
#include <string>
namespace {
std::atomic<bool> g_initialized{false};
void RequireInitialized(const char* function) {
if (!g_initialized.load()) throw std::logic_error(std::string(function) + ": not initialized");
}
}
extern "C" {
int APS5_VABI sceContentDeleteInitialize(const ContentDeleteInitParam* init_param) {
if (init_param == nullptr) APS5_INVALID_ARG_EX;
bool expected = false;
if (!g_initialized.compare_exchange_strong(expected, true)) throw std::logic_error(std::string(__func__) + ": already initialized");
return 0;
}
int APS5_VABI sceContentDeleteByPath(const char* contentPath) {
if (contentPath == nullptr) APS5_INVALID_ARG_EX;
RequireInitialized(__func__);
throw std::logic_error(std::string(__func__) + ": " + contentPath + " is not in the host content library, which is empty, and the console's error for it is unknown");
}
int APS5_VABI sceContentDeleteById(std::int64_t contentId) {
RequireInitialized(__func__);
throw std::logic_error(std::string(__func__) + ": content id " + std::to_string(contentId) + " is not in the host content library, which is empty, and the console's error for it is unknown");
}
int APS5_VABI sceContentDeleteByIdListForSf(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceContentDeleteGlobalMstat(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceContentDeleteMemoryInitialize(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceContentDeleteMemoryTerminate(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceContentDeleteTerminate(void) {
bool expected = true;
if (!g_initialized.compare_exchange_strong(expected, false)) throw std::logic_error(std::string(__func__) + ": not initialized");
return 0;
}
}