summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/archive.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-25 18:15:35 -0400
committerGravatar bunnei2014-06-27 16:58:30 -0400
commit8b8c8f4c13c8959853aadf931161f2b867158068 (patch)
treebc7b20495507fdcde69a1ec37d59f3545eca4428 /src/core/hle/kernel/archive.cpp
parentCore: Removed unused directory_file_system and meta_file_system modules. (diff)
downloadyuzu-8b8c8f4c13c8959853aadf931161f2b867158068.tar.gz
yuzu-8b8c8f4c13c8959853aadf931161f2b867158068.tar.xz
yuzu-8b8c8f4c13c8959853aadf931161f2b867158068.zip
Kernel: Added stubbed code to support creation of kernel Archive objects.
Diffstat (limited to 'src/core/hle/kernel/archive.cpp')
-rw-r--r--src/core/hle/kernel/archive.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
new file mode 100644
index 000000000..d7351e702
--- /dev/null
+++ b/src/core/hle/kernel/archive.cpp
@@ -0,0 +1,61 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#include "common/common_types.h"
6
7#include "core/hle/kernel/kernel.h"
8#include "core/hle/kernel/archive.h"
9
10////////////////////////////////////////////////////////////////////////////////////////////////////
11// Kernel namespace
12
13namespace Kernel {
14
15class Archive : public Object {
16public:
17 const char* GetTypeName() const { return "Archive"; }
18 const char* GetName() const { return name.c_str(); }
19
20 static Kernel::HandleType GetStaticHandleType() { return HandleType::Archive; }
21 Kernel::HandleType GetHandleType() const { return HandleType::Archive; }
22
23 std::string name; ///< Name of archive (optional)
24
25 /**
26 * Wait for kernel object to synchronize
27 * @param wait Boolean wait set if current thread should wait as a result of sync operation
28 * @return Result of operation, 0 on success, otherwise error code
29 */
30 Result WaitSynchronization(bool* wait) {
31 // TODO(bunnei): ImplementMe
32 ERROR_LOG(OSHLE, "unimplemented function");
33 return 0;
34 }
35};
36
37/**
38 * Creates an Archive
39 * @param name Optional name of Archive
40 * @param handle Handle to newly created archive object
41 * @return Newly created Archive object
42 */
43Archive* CreateArchive(Handle& handle, const std::string& name) {
44 Archive* archive = new Archive;
45 handle = Kernel::g_object_pool.Create(archive);
46 archive->name = name;
47 return archive;
48}
49
50/**
51 * Creates an Archive
52 * @param name Optional name of Archive
53 * @return Handle to newly created Archive object
54 */
55Handle CreateArchive(const std::string& name) {
56 Handle handle;
57 Archive* archive = CreateArchive(handle, name);
58 return handle;
59}
60
61} // namespace Kernel