mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
Implement scePthreadGetschedparam and scePthreadSetschedparam on top of the thread priority, POSIX utimes and fsync on top of sceKernelUtimes and sceKernelFsync, and sceUserServiceGetAccessibilityZoomFollowFocus like the other accessibility queries. Add the remaining imports of PPSA12544 as unimplemented exports and record unknown NIDs and signatures in the technical debt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
107 lines
2.3 KiB
C++
107 lines
2.3 KiB
C++
#include <cstdint>
|
|
#include <cstddef>
|
|
#include "SceTypes.hpp"
|
|
#include "prx/libc/include/General.hpp"
|
|
#include <atomic>
|
|
|
|
// No network is emulated: contexts, templates and requests can be created, but any request
|
|
// that would touch the network fails with the library's network error.
|
|
static constexpr int ERROR_NETWORK = static_cast<int>(0x80435001);
|
|
static std::atomic<int> g_nextHandle{1};
|
|
|
|
namespace {
|
|
|
|
constexpr int ERROR_NOT_FOUND = static_cast<int>(0x8095F004);
|
|
constexpr int ERROR_INVALID_ARG = static_cast<int>(0x8095177A);
|
|
|
|
struct SslData {
|
|
char* ptr;
|
|
size_t size;
|
|
};
|
|
|
|
struct SslCaCerts {
|
|
SslData* certs;
|
|
size_t num;
|
|
void* pool;
|
|
};
|
|
|
|
}
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI sceSslFreeCaCerts(int ssl_ctx_id, void* ca_certs) {
|
|
(void)ssl_ctx_id;
|
|
if (!ca_certs) return ERROR_INVALID_ARG;
|
|
*static_cast<SslCaCerts*>(ca_certs) = {};
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetCaCerts(int ssl_ctx_id, void* ca_certs) {
|
|
(void)ssl_ctx_id;
|
|
if (!ca_certs) return ERROR_INVALID_ARG;
|
|
*static_cast<SslCaCerts*>(ca_certs) = {};
|
|
return ERROR_NOT_FOUND;
|
|
}
|
|
|
|
int APS5_VABI sceSslInit_nid_postfix(uint64_t pool_size) {
|
|
(void)pool_size;
|
|
return g_nextHandle.fetch_add(1, std::memory_order_relaxed);
|
|
}
|
|
|
|
int APS5_VABI sceSslTerm_nid_postfix(int ssl_ctx_id) {
|
|
(void)ssl_ctx_id;
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslClose() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetSerialNumber() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslLoadCert() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetMemoryPoolStats() {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslFreeSslCertName(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetIssuerName(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetNameEntryCount(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetNameEntryInfo(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetPem(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceSslGetSubjectName(void) {
|
|
NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
}
|