diff options
| author | 2014-04-11 18:44:21 -0400 | |
|---|---|---|
| committer | 2014-04-11 18:44:21 -0400 | |
| commit | 02fbd42e7f006236199698c61ca917092afa1f7d (patch) | |
| tree | b60bd6801f624839dc80b53dffb523fa98b7b46f /src/core/hle/service | |
| parent | replace tabs with spaces (diff) | |
| download | yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.gz yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.xz yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.zip | |
- renamed hle_syscall to just syscall
- added service.h as an initial service interface
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/service.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h new file mode 100644 index 000000000..f15099982 --- /dev/null +++ b/src/core/hle/service/service.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <string> | ||
| 8 | |||
| 9 | #include "common/common_types.h" | ||
| 10 | #include "core/hle/syscall.h" | ||
| 11 | |||
| 12 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 13 | // Namespace Service | ||
| 14 | |||
| 15 | namespace Service { | ||
| 16 | |||
| 17 | typedef s32 NativeUID; | ||
| 18 | |||
| 19 | /// Interface to a CTROS service | ||
| 20 | class Interface { | ||
| 21 | public: | ||
| 22 | |||
| 23 | virtual ~Interface() { | ||
| 24 | } | ||
| 25 | |||
| 26 | /** | ||
| 27 | * Gets the UID for the serice | ||
| 28 | * @return UID of service in native format | ||
| 29 | */ | ||
| 30 | NativeUID GetUID() const { | ||
| 31 | return (NativeUID)m_uid; | ||
| 32 | } | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Gets the string name used by CTROS for a service | ||
| 36 | * @return String name of service | ||
| 37 | */ | ||
| 38 | virtual std::string GetName() { | ||
| 39 | return "[UNKNOWN SERVICE NAME]"; | ||
| 40 | } | ||
| 41 | |||
| 42 | /** | ||
| 43 | * Gets the string name used by CTROS for a service | ||
| 44 | * @return Port name of service | ||
| 45 | */ | ||
| 46 | virtual std::string GetPort() { | ||
| 47 | return "[UNKNOWN SERVICE PORT]"; | ||
| 48 | } | ||
| 49 | |||
| 50 | /** | ||
| 51 | * Called when svcSendSyncRequest is called, loads command buffer and executes comand | ||
| 52 | * @return Return result of svcSendSyncRequest passed back to user app | ||
| 53 | */ | ||
| 54 | virtual Syscall::Result Sync() = 0; | ||
| 55 | |||
| 56 | private: | ||
| 57 | u32 m_uid; | ||
| 58 | }; | ||
| 59 | |||
| 60 | } // namespace | ||