summaryrefslogblamecommitdiffstats
path: root/src/core/file_sys/sdmc_factory.h
blob: abe6cc41c2660f8c6788095502ff8735e59cefcf (plain) (tree)
1
2
3
4
5
6
7
8





                                            
                 
                              



                            
                      
                       
 
                                               
                   
       
                                         
                   
 
                                 


                                               
                                             
                                                 
 

                                         
        
                   
 
                                              
                                                  


                      
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <memory>
#include "core/file_sys/vfs.h"
#include "core/hle/result.h"

namespace FileSys {

class RegisteredCache;
class PlaceholderCache;

/// File system interface to the SDCard archive
class SDMCFactory {
public:
    explicit SDMCFactory(VirtualDir dir);
    ~SDMCFactory();

    ResultVal<VirtualDir> Open();

    VirtualDir GetSDMCContentDirectory() const;

    RegisteredCache* GetSDMCContents() const;
    PlaceholderCache* GetSDMCPlaceholder() const;

    VirtualDir GetImageDirectory() const;

private:
    VirtualDir dir;

    std::unique_ptr<RegisteredCache> contents;
    std::unique_ptr<PlaceholderCache> placeholder;
};

} // namespace FileSys