~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to rts/System/FileSystem/VFSHandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
 
2
 
1
3
#ifndef __VFS_HANDLER_H
2
4
#define __VFS_HANDLER_H
3
5
 
4
6
#include <map>
5
7
#include <string>
6
8
#include <vector>
 
9
#include <boost/cstdint.hpp>
7
10
 
8
11
class CArchiveBase;
9
12
 
11
14
{
12
15
public:
13
16
        CVFSHandler();
14
 
        virtual ~CVFSHandler();
 
17
        ~CVFSHandler();
15
18
 
16
 
        int LoadFile(const std::string& name, void* buffer);
17
 
        int GetFileSize(const std::string& name);
 
19
        bool LoadFile(const std::string& name, std::vector<boost::uint8_t>& buffer);
18
20
 
19
21
        std::vector<std::string> GetFilesInDir(const std::string& dir);
20
22
        std::vector<std::string> GetDirsInDir(const std::string& dir);
23
25
         * Override determines whether if conflicts overwrites
24
26
         * an existing entry in the virtual filesystem or not
25
27
         */
26
 
        bool AddArchive(const std::string& arName, bool override,
27
 
                        const std::string& type = "");
28
 
        bool AddMapArchiveWithDeps(const std::string& mapName, bool override, const std::string& type = "");
 
28
        bool AddArchive(const std::string& arName, bool override, const std::string& type = "");
 
29
        bool AddArchiveWithDeps(const std::string& mapName, bool override, const std::string& type = "");
 
30
 
29
31
        /**
30
32
         * Returns true if the archive is not loaded,
31
33
         * so it may was not loaded in the first place or was unloaded