diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-19 00:24:24 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-19 00:24:24 +0200 |
commit | 725d240bf7b9cb48de7a66f8696695ef7aabc889 (patch) | |
tree | f9bbcff151b96109da675e00b23fb65c7a042f25 /src/core/hle/service/service.h | |
parent | - moved Handle/Result definitions to kernel.h (diff) | |
download | yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar.gz yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar.bz2 yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar.lz yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar.xz yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.tar.zst yuzu-725d240bf7b9cb48de7a66f8696695ef7aabc889.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/service.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 026e3d5de..c3dbd202f 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -20,8 +20,6 @@ namespace Service { -typedef s32 NativeUID; ///< Native handle for a service - static const int kMaxPortSize = 0x08; ///< Maximum size of a port name (8 characters) static const int kCommandHeaderOffset = 0x80; ///< Offset into command buffer of header @@ -56,11 +54,11 @@ public: }; /** - * Gets the UID for the serice - * @return UID of service in native format + * Gets the Handle for the serice + * @return Handle of service in native format */ - NativeUID GetUID() const { - return (NativeUID)m_uid; + Handle GetHandle() const { + return m_handle; } /** @@ -73,7 +71,7 @@ public: /// Allocates a new handle for the service Handle NewHandle() { - Handle handle = (m_handles.size() << 16) | m_uid; + Handle handle = (m_handles.size() << 16) | m_handle; m_handles.push_back(handle); return handle; } @@ -124,7 +122,7 @@ protected: } private: - u32 m_uid; + u32 m_handle; std::vector<Handle> m_handles; std::map<u32, FunctionInfo> m_functions; @@ -145,7 +143,7 @@ public: void DeleteService(std::string port_name); /// Get a Service Interface from its UID - Interface* FetchFromUID(u32 uid); + Interface* FetchFromHandle(u32 uid); /// Get a Service Interface from its port Interface* FetchFromPortName(std::string port_name); @@ -153,13 +151,13 @@ public: private: /// Convert an index into m_services vector into a UID - static u32 GetUIDFromIndex(const int index) { + static Handle GetHandleFromIndex(const int index) { return index | 0x10000000; } /// Convert a UID into an index into m_services - static int GetIndexFromUID(const u32 uid) { - return uid & 0x0FFFFFFF; + static int GetIndexFromHandle(const Handle handle) { + return handle & 0x0FFFFFFF; } std::vector<Interface*> m_services; |