diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-12 00:44:21 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-12 00:44:21 +0200 |
commit | 02fbd42e7f006236199698c61ca917092afa1f7d (patch) | |
tree | b60bd6801f624839dc80b53dffb523fa98b7b46f /src/core/hle/service/service.h | |
parent | replace tabs with spaces (diff) | |
download | yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.gz yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.bz2 yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.lz yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.xz yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.tar.zst yuzu-02fbd42e7f006236199698c61ca917092afa1f7d.zip |
Diffstat (limited to 'src/core/hle/service/service.h')
-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 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include <string> + +#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 |