~ubuntu-branches/ubuntu/intrepid/onscripter/intrepid

« back to all changes in this revision

Viewing changes to BaseReader.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2008-02-12 20:22:19 UTC
  • mfrom: (0.1.2 lenny) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212202219-jx4xdi0izczp0pcy
Tags: 20080121-0ubuntu1
* Fake-sync onscripter 0.0.20080121-1 from Debian unstable (LP: #187890).
  Drop the leading zeroes from the version due to different versioning in
  Debian and Ubuntu.
* debian/control:
  + Modify Maintainer value to match DebianMaintainerField spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *
3
3
 *  BaseReader.h - Base class of archive reader
4
4
 *
5
 
 *  Copyright (c) 2001-2004 Ogapee. All rights reserved.
 
5
 *  Copyright (c) 2001-2007 Ogapee. All rights reserved.
6
6
 *
7
7
 *  ogapee@aqua.dti2.ne.jp
8
8
 *
64
64
    };
65
65
 
66
66
    struct FileInfo{
67
 
        char name[256];
 
67
        char *name;
68
68
        int  compression_type;
69
69
        size_t offset;
70
70
        size_t length;
74
74
    struct ArchiveInfo{
75
75
        struct ArchiveInfo *next;
76
76
        FILE *file_handle;
 
77
        int power_resume_number; // currently only for PSP
 
78
        char *file_name;
77
79
        struct FileInfo *fi_list;
78
 
        int num_of_files;
 
80
        unsigned int num_of_files;
79
81
        unsigned long base_offset;
 
82
        char *name_buffer;
80
83
 
81
84
        ArchiveInfo(){
82
85
            next = NULL;
83
86
            file_handle = NULL;
 
87
            power_resume_number = 0;
 
88
            file_name = NULL;
84
89
            fi_list = NULL;
85
90
            num_of_files = 0;
 
91
            name_buffer = NULL;
86
92
        }
87
93
    };
88
94
 
95
101
    virtual int  getNumFiles() = 0;
96
102
    virtual void registerCompressionType( const char *ext, int type ) = 0;
97
103
 
98
 
    virtual struct FileInfo getFileByIndex( int index ) = 0;
 
104
    virtual struct FileInfo getFileByIndex( unsigned int index ) = 0;
99
105
    virtual size_t getFileLength( const char *file_name ) = 0;
100
106
    virtual size_t getFile( const char *file_name, unsigned char *buffer, int *location=NULL ) = 0;
101
107
};