mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
added error codes file
This commit is contained in:
parent
b8f166cb54
commit
963190f11f
@ -601,6 +601,7 @@ set(CAMERA_LIBS src/core/libraries/camera/camera.cpp
|
|||||||
|
|
||||||
set(COMPANION_LIBS src/core/libraries/companion/companion_httpd.cpp
|
set(COMPANION_LIBS src/core/libraries/companion/companion_httpd.cpp
|
||||||
src/core/libraries/companion/companion_httpd.h
|
src/core/libraries/companion/companion_httpd.h
|
||||||
|
src/core/libraries/companion/companion_error.h
|
||||||
)
|
)
|
||||||
set(DEV_TOOLS src/core/devtools/layer.cpp
|
set(DEV_TOOLS src/core/devtools/layer.cpp
|
||||||
src/core/devtools/layer.h
|
src/core/devtools/layer.h
|
||||||
|
20
src/core/libraries/companion/companion_error.h
Normal file
20
src/core/libraries/companion/companion_error.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// companion_httpd error codes
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_UNKNOWN = 0x80E40001;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_FATAL = 0x80E40002;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NOMEM = 0x80E40003;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_INVALID_PARAM = 0x80E40004;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_INVALID_OPERATION = 0x80E40005;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NOT_INITIALIZED = 0x80E40006;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_ALREADY_INITIALIZED = 0x80E40007;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NO_EVENT = 0x80E40008;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NOT_GENERATE_RESPONSE = 0x80E40009;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_ALREADY_STARTED = 0x80E4000A;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NOT_STARTED = 0x80E4000B;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_ALREADY_REGISTERED = 0x80E4000;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_NOT_CONNECTED = 0x80E4000D;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_ERROR_USER_NOT_FOUND = 0x80E4000E;
|
@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
#include "companion_error.h"
|
||||||
#include "core/libraries/companion/companion_httpd.h"
|
#include "core/libraries/companion/companion_httpd.h"
|
||||||
#include "core/libraries/error_codes.h"
|
#include "core/libraries/error_codes.h"
|
||||||
#include "core/libraries/libs.h"
|
#include "core/libraries/libs.h"
|
||||||
@ -21,9 +22,9 @@ sceCompanionHttpdGet2ndScreenStatus(Libraries::UserService::OrbisUserServiceUser
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceCompanionHttpdGetEvent(OrbisCompanionHttpdEvent* pEvent) {
|
s32 PS4_SYSV_ABI sceCompanionHttpdGetEvent(OrbisCompanionHttpdEvent* pEvent) {
|
||||||
pEvent->event = 0x10000002; // disconnected
|
pEvent->event = ORBIS_COMPANION_HTTPD_EVENT_DISCONNECT; // disconnected
|
||||||
LOG_DEBUG(Lib_CompanionHttpd, "device disconnected");
|
LOG_DEBUG(Lib_CompanionHttpd, "device disconnected");
|
||||||
return 0x80E40008; // No events to obtain
|
return ORBIS_COMPANION_HTTPD_ERROR_NO_EVENT; // No events to obtain
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI
|
s32 PS4_SYSV_ABI
|
||||||
|
@ -13,6 +13,10 @@ class SymbolsResolver;
|
|||||||
|
|
||||||
namespace Libraries::CompanionHttpd {
|
namespace Libraries::CompanionHttpd {
|
||||||
|
|
||||||
|
// OrbisCompanionHttpdEvent event codes
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_EVENT_CONNECT = 0x10000001;
|
||||||
|
constexpr int ORBIS_COMPANION_HTTPD_EVENT_DISCONNECT = 0x10000002;
|
||||||
|
|
||||||
struct OrbisCompanionHttpdHeader {
|
struct OrbisCompanionHttpdHeader {
|
||||||
char* key;
|
char* key;
|
||||||
char* value;
|
char* value;
|
||||||
|
Loading…
Reference in New Issue
Block a user