forked from Devil084/symdroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STFilemanager.h
55 lines (32 loc) · 944 Bytes
/
STFilemanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef STFILEMANAGER_H
#define STFILEMANAGER_H
#include <e32std.h>
#include <e32base.h>
#include <f32file.h>
#include "STDefs.h"
class CSTFileManagerEntry;
class CSTTorrent;
class CSTFile;
class CSTFileManager : public CBase
{
public:
~CSTFileManager();
static CSTFileManager* NewL(CSTTorrent& aTorrent, RFs& aFs);
static CSTFileManager* NewLC(CSTTorrent& aTorrent, RFs& aFs);
TInt WriteL(CSTFile* aFile, TInt aPosition, const TDesC8& aData);
TInt ReadL(CSTFile* aFile, TInt aPosition, TInt aLength, TDes8& aBuffer);
HBufC8* ReadL(CSTFile* aFile, TInt aPos, TInt aLength);
void Close(CSTFile* aFile);
void CloseAll();
private:
CSTFileManager(CSTTorrent& aTorrent, RFs& aFs);
void ConstructL();
private:
CSTFileManagerEntry* AddFileL(CSTFile* aFile);
CSTFileManagerEntry* GetFileManagerEntryL(CSTFile* aFile);
private:
RFs& iFs;
CSTTorrent& iTorrent;
RPointerArray<CSTFileManagerEntry> iFiles;
};
#endif