mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-21 20:03:11 +00:00
mc.mitm: move mc service out of mitm namespace
This commit is contained in:
parent
cfa9041422
commit
1409d462ea
7 changed files with 16 additions and 18 deletions
2
Makefile
2
Makefile
|
@ -14,7 +14,7 @@ TARGETS := mcmitm_version.cpp mc_mitm
|
|||
all: $(TARGETS)
|
||||
|
||||
mcmitm_version.cpp: .git/HEAD .git/index
|
||||
echo "namespace ams::mitm { unsigned int mc_version = $(VERSION); const char *mc_build_name = \"$(BUILD_VERSION)\"; const char *mc_build_date = \"$(BUILD_DATE)\"; }" > mc_mitm/source/$@
|
||||
echo "namespace ams::mc { unsigned int mc_version = $(VERSION); const char *mc_build_name = \"$(BUILD_VERSION)\"; const char *mc_build_date = \"$(BUILD_DATE)\"; }" > mc_mitm/source/$@
|
||||
|
||||
mc_mitm:
|
||||
$(MAKE) -C $@
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "mc_module.hpp"
|
||||
#include "mc_service.hpp"
|
||||
|
||||
namespace ams::mitm::mc {
|
||||
namespace ams::mc {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -60,8 +60,8 @@ namespace ams::mitm::mc {
|
|||
|
||||
}
|
||||
|
||||
Result Launch() {
|
||||
R_TRY(os::CreateThread(&g_thread,
|
||||
void Launch() {
|
||||
R_ABORT_UNLESS(os::CreateThread(&g_thread,
|
||||
MissionControlThreadFunction,
|
||||
nullptr,
|
||||
g_thread_stack,
|
||||
|
@ -71,8 +71,6 @@ namespace ams::mitm::mc {
|
|||
|
||||
os::SetThreadNamePointer(&g_thread, "mc::MissionControlThread");
|
||||
os::StartThread(&g_thread);
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void WaitFinished() {
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
#pragma once
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
namespace ams::mitm::mc {
|
||||
namespace ams::mc {
|
||||
|
||||
Result Launch();
|
||||
void Launch();
|
||||
void WaitFinished();
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "mc_service.hpp"
|
||||
#include "../mcmitm_version.hpp"
|
||||
|
||||
namespace ams::mitm::mc {
|
||||
namespace ams::mc {
|
||||
|
||||
Result MissionControlService::GetVersion(sf::Out<u32> version) {
|
||||
version.SetValue(mc_version);
|
||||
|
@ -28,7 +28,7 @@ namespace ams::mitm::mc {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result MissionControlService::GetBuildDateString(sf::Out<ams::mitm::mc::DateString> date) {
|
||||
Result MissionControlService::GetBuildDateString(sf::Out<mc::DateString> date) {
|
||||
std::strncpy(date.GetPointer()->date, mc_build_date, sizeof(mc::DateString));
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
|
|
@ -20,20 +20,20 @@
|
|||
|
||||
#define AMS_MISSION_CONTROL_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, GetVersion, (sf::Out<u32> version), (version)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, GetBuildVersionString, (sf::Out<ams::mitm::mc::VersionString> version), (version)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, GetBuildDateString, (sf::Out<ams::mitm::mc::DateString> version), (version)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, GetBuildVersionString, (sf::Out<ams::mc::VersionString> version), (version)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, GetBuildDateString, (sf::Out<ams::mc::DateString> version), (version)) \
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(ams::mitm::mc, IMissionControlInterface, AMS_MISSION_CONTROL_INTERFACE_INFO, 0x30eba3d4)
|
||||
AMS_SF_DEFINE_INTERFACE(ams::mc, IMissionControlInterface, AMS_MISSION_CONTROL_INTERFACE_INFO, 0x30eba3d4)
|
||||
|
||||
namespace ams::mitm::mc {
|
||||
namespace ams::mc {
|
||||
|
||||
class MissionControlService {
|
||||
private:
|
||||
|
||||
public:
|
||||
Result GetVersion(sf::Out<u32> version);
|
||||
Result GetBuildVersionString(sf::Out<ams::mitm::mc::VersionString> version);
|
||||
Result GetBuildDateString(sf::Out<ams::mitm::mc::DateString> date);
|
||||
Result GetBuildVersionString(sf::Out<ams::mc::VersionString> version);
|
||||
Result GetBuildDateString(sf::Out<ams::mc::DateString> date);
|
||||
};
|
||||
static_assert(IsIMissionControlInterface<MissionControlService>);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
namespace ams::mitm::mc {
|
||||
namespace ams::mc {
|
||||
|
||||
struct VersionString {
|
||||
char version[32];
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
namespace ams::mitm {
|
||||
namespace ams::mc {
|
||||
|
||||
extern const unsigned int mc_version;
|
||||
extern const char *mc_build_name;
|
||||
|
|
Loading…
Reference in a new issue