aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/wii/wii-fs-factory.h
diff options
context:
space:
mode:
authorAndre Heider2009-09-05 17:53:55 +0000
committerAndre Heider2009-09-05 17:53:55 +0000
commit0b002beccd31fa2796a319427624af1b2ad580b6 (patch)
treee625a36d21708cb2105e2979bbb9a29934ef03c0 /backends/fs/wii/wii-fs-factory.h
parent549e2b054092d3ba2ef1c53245227107d406b4c8 (diff)
downloadscummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.tar.gz
scummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.tar.bz2
scummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.zip
Support for SMB shares, cleaned up async FS functions.
svn-id: r43965
Diffstat (limited to 'backends/fs/wii/wii-fs-factory.h')
-rw-r--r--backends/fs/wii/wii-fs-factory.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/backends/fs/wii/wii-fs-factory.h b/backends/fs/wii/wii-fs-factory.h
index f58371d194..0e7f87a783 100644
--- a/backends/fs/wii/wii-fs-factory.h
+++ b/backends/fs/wii/wii-fs-factory.h
@@ -23,9 +23,12 @@
#ifndef _WII_FILESYSTEM_FACTORY_H_
#define _WII_FILESYSTEM_FACTORY_H_
+#include "common/str.h"
#include "common/singleton.h"
#include "backends/fs/fs-factory.h"
+#include <gctypes.h>
+
/**
* Creates WiiFilesystemNode objects.
*
@@ -33,17 +36,49 @@
*/
class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton<WiiFilesystemFactory> {
public:
+ typedef Common::String String;
+
+ enum FileSystemType {
+ kDVD,
+ kSMB
+ };
+
virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
- static void asyncHandler(bool mount, const Common::String *path);
+ void asyncInit();
+ void asyncDeinit();
+
+#ifdef USE_WII_SMB
+ void asyncInitNetwork();
+ void setSMBLoginData(const String &server, const String &share,
+ const String &username, const String &password);
+#endif
+
+ bool isMounted(FileSystemType type);
+
+ void mount(FileSystemType type);
+ void umount(FileSystemType type);
+
+ void mountByPath(const String &path);
+ void umountUnused(const String &path);
protected:
- WiiFilesystemFactory() {};
+ WiiFilesystemFactory();
private:
friend class Common::Singleton<SingletonBaseType>;
+
+ bool _dvdMounted;
+ bool _smbMounted;
+
+#ifdef USE_WII_SMB
+ String _smbServer;
+ String _smbShare;
+ String _smbUsername;
+ String _smbPassword;
+#endif
};
#endif /*Wii_FILESYSTEM_FACTORY_H*/