mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	FileSys: Clean-up includes, de-inline destructors
This commit is contained in:
		
							parent
							
								
									c916bcf7b5
								
							
						
					
					
						commit
						6f89d25f90
					
				
					 7 changed files with 36 additions and 21 deletions
				
			
		| 
						 | 
				
			
			@ -78,6 +78,11 @@ enum class DirectoryCommand : u32 {
 | 
			
		|||
    Close           = 0x08020000,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
File::File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path & path)
 | 
			
		||||
    : path(path), priority(0), backend(std::move(backend)) {}
 | 
			
		||||
 | 
			
		||||
File::~File() {}
 | 
			
		||||
 | 
			
		||||
ResultVal<bool> File::SyncRequest() {
 | 
			
		||||
    u32* cmd_buff = Kernel::GetCommandBuffer();
 | 
			
		||||
    FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]);
 | 
			
		||||
| 
						 | 
				
			
			@ -172,6 +177,11 @@ ResultVal<bool> File::SyncRequest() {
 | 
			
		|||
    return MakeResult<bool>(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path & path)
 | 
			
		||||
    : path(path), backend(std::move(backend)) {}
 | 
			
		||||
 | 
			
		||||
Directory::~Directory() {}
 | 
			
		||||
 | 
			
		||||
ResultVal<bool> Directory::SyncRequest() {
 | 
			
		||||
    u32* cmd_buff = Kernel::GetCommandBuffer();
 | 
			
		||||
    DirectoryCommand cmd = static_cast<DirectoryCommand>(cmd_buff[0]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,31 +45,27 @@ typedef u64 ArchiveHandle;
 | 
			
		|||
 | 
			
		||||
class File : public Kernel::Session {
 | 
			
		||||
public:
 | 
			
		||||
    File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path)
 | 
			
		||||
        : path(path), priority(0), backend(std::move(backend)) {
 | 
			
		||||
    }
 | 
			
		||||
    File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path);
 | 
			
		||||
    ~File();
 | 
			
		||||
 | 
			
		||||
    std::string GetName() const override { return "Path: " + path.DebugStr(); }
 | 
			
		||||
    ResultVal<bool> SyncRequest() override;
 | 
			
		||||
 | 
			
		||||
    FileSys::Path path; ///< Path of the file
 | 
			
		||||
    u32 priority; ///< Priority of the file. TODO(Subv): Find out what this means
 | 
			
		||||
    std::unique_ptr<FileSys::FileBackend> backend; ///< File backend interface
 | 
			
		||||
 | 
			
		||||
    ResultVal<bool> SyncRequest() override;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class Directory : public Kernel::Session {
 | 
			
		||||
public:
 | 
			
		||||
    Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path)
 | 
			
		||||
        : path(path), backend(std::move(backend)) {
 | 
			
		||||
    }
 | 
			
		||||
    Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path);
 | 
			
		||||
    ~Directory();
 | 
			
		||||
 | 
			
		||||
    std::string GetName() const override { return "Directory: " + path.DebugStr(); }
 | 
			
		||||
    ResultVal<bool> SyncRequest() override;
 | 
			
		||||
 | 
			
		||||
    FileSys::Path path; ///< Path of the directory
 | 
			
		||||
    std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface
 | 
			
		||||
 | 
			
		||||
    ResultVal<bool> SyncRequest() override;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue