diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj
index 89795ce63f..10ecca5966 100644
--- a/src/core/core.vcxproj
+++ b/src/core/core.vcxproj
@@ -153,7 +153,7 @@
-
+
@@ -186,7 +186,8 @@
-
+
+
diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters
index eece5d4865..d450224a4c 100644
--- a/src/core/core.vcxproj.filters
+++ b/src/core/core.vcxproj.filters
@@ -25,6 +25,9 @@
{8b62769e-3e2a-4a57-a7bc-b3b2933c2bc7}
+
+ {812c5189-ca49-4704-b842-3ffad09092d3}
+
@@ -78,10 +81,10 @@
-
+
hle
-
+
hle
@@ -163,7 +166,10 @@
hle
-
+
+ hle\service
+
+
hle
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index d62d2d0ce6..32aff0eb59 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -5,7 +5,7 @@
#include
#include "core/hle/hle.h"
-#include "core/hle/hle_syscall.h"
+#include "core/hle/syscall.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ void RegisterModule(std::string name, int num_functions, const FunctionDef* func
}
void RegisterAllModules() {
- Register_Syscall();
+ Syscall::Register();
}
void Init() {
diff --git a/src/core/hle/hle_syscall.h b/src/core/hle/hle_syscall.h
deleted file mode 100644
index 80b20c3589..0000000000
--- a/src/core/hle/hle_syscall.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include "common/common_types.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-//template
-//class KernelObject {
-//public:
-// virtual ~KernelObject() {}
-//
-// T GetNative() const {
-// return m_native;
-// }
-//
-// void SetNative(const T& native) {
-// m_native = native;
-// }
-//
-// virtual const char *GetTypeName() {return "[BAD KERNEL OBJECT TYPE]";}
-// virtual const char *GetName() {return "[UNKNOWN KERNEL OBJECT]";}
-//
-//private:
-// T m_native;
-//};
-
-//class Handle : public KernelObject {
-// const char* GetTypeName() {
-// return "Handle";
-// }
-//};
-
-void Register_Syscall();
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
new file mode 100644
index 0000000000..f150999823
--- /dev/null
+++ b/src/core/hle/service/service.h
@@ -0,0 +1,60 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include
+
+#include "common/common_types.h"
+#include "core/hle/syscall.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Namespace Service
+
+namespace Service {
+
+typedef s32 NativeUID;
+
+/// Interface to a CTROS service
+class Interface {
+public:
+
+ virtual ~Interface() {
+ }
+
+ /**
+ * Gets the UID for the serice
+ * @return UID of service in native format
+ */
+ NativeUID GetUID() const {
+ return (NativeUID)m_uid;
+ }
+
+ /**
+ * Gets the string name used by CTROS for a service
+ * @return String name of service
+ */
+ virtual std::string GetName() {
+ return "[UNKNOWN SERVICE NAME]";
+ }
+
+ /**
+ * Gets the string name used by CTROS for a service
+ * @return Port name of service
+ */
+ virtual std::string GetPort() {
+ return "[UNKNOWN SERVICE PORT]";
+ }
+
+ /**
+ * Called when svcSendSyncRequest is called, loads command buffer and executes comand
+ * @return Return result of svcSendSyncRequest passed back to user app
+ */
+ virtual Syscall::Result Sync() = 0;
+
+private:
+ u32 m_uid;
+};
+
+} // namespace
diff --git a/src/core/hle/hle_syscall.cpp b/src/core/hle/syscall.cpp
similarity index 58%
rename from src/core/hle/hle_syscall.cpp
rename to src/core/hle/syscall.cpp
index 92d9b0c853..98155dc8ea 100644
--- a/src/core/hle/hle_syscall.cpp
+++ b/src/core/hle/syscall.cpp
@@ -2,15 +2,15 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include