From df5b75694f5abde94ccf05fa6c7a557b1ba9079b Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 27 Jul 2018 23:55:23 -0400 Subject: Remove files that are not used --- src/core/crypto/encryption_layer.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/core/crypto/encryption_layer.h (limited to 'src/core/crypto/encryption_layer.h') diff --git a/src/core/crypto/encryption_layer.h b/src/core/crypto/encryption_layer.h new file mode 100644 index 000000000..2312870d8 --- /dev/null +++ b/src/core/crypto/encryption_layer.h @@ -0,0 +1,30 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once +#include "core/file_sys/vfs.h" + +namespace Crypto { + +// Basically non-functional class that implements all of the methods that are irrelevant to an +// EncryptionLayer. Reduces duplicate code. +struct EncryptionLayer : public FileSys::VfsFile { + explicit EncryptionLayer(FileSys::VirtualFile base); + + size_t Read(u8* data, size_t length, size_t offset) const override = 0; + + std::string GetName() const override; + size_t GetSize() const override; + bool Resize(size_t new_size) override; + std::shared_ptr GetContainingDirectory() const override; + bool IsWritable() const override; + bool IsReadable() const override; + size_t Write(const u8* data, size_t length, size_t offset) override; + bool Rename(std::string_view name) override; + +protected: + FileSys::VirtualFile base; +}; + +} // namespace Crypto -- cgit v1.2.3 From 239a3113e4c6a53a2c7b12e67a0f21afae24b0aa Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sat, 28 Jul 2018 21:39:42 -0400 Subject: Make XCI comply to review and style guidelines --- src/core/crypto/encryption_layer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/crypto/encryption_layer.h') diff --git a/src/core/crypto/encryption_layer.h b/src/core/crypto/encryption_layer.h index 2312870d8..84f11bf5e 100644 --- a/src/core/crypto/encryption_layer.h +++ b/src/core/crypto/encryption_layer.h @@ -3,9 +3,10 @@ // Refer to the license.txt file included. #pragma once + #include "core/file_sys/vfs.h" -namespace Crypto { +namespace Core::Crypto { // Basically non-functional class that implements all of the methods that are irrelevant to an // EncryptionLayer. Reduces duplicate code. @@ -27,4 +28,4 @@ protected: FileSys::VirtualFile base; }; -} // namespace Crypto +} // namespace Core::Crypto -- cgit v1.2.3 From 03149d3e4a7f8038d9c88cbeb19dee25a39e0042 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sun, 29 Jul 2018 19:00:09 -0400 Subject: Add missing includes and use const where applicable --- src/core/crypto/encryption_layer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/crypto/encryption_layer.h') diff --git a/src/core/crypto/encryption_layer.h b/src/core/crypto/encryption_layer.h index 84f11bf5e..71bca1f23 100644 --- a/src/core/crypto/encryption_layer.h +++ b/src/core/crypto/encryption_layer.h @@ -10,7 +10,8 @@ namespace Core::Crypto { // Basically non-functional class that implements all of the methods that are irrelevant to an // EncryptionLayer. Reduces duplicate code. -struct EncryptionLayer : public FileSys::VfsFile { +class EncryptionLayer : public FileSys::VfsFile { +public: explicit EncryptionLayer(FileSys::VirtualFile base); size_t Read(u8* data, size_t length, size_t offset) const override = 0; -- cgit v1.2.3