?? gnhdrec.h
字號:
/*
============================================================================
Name : GnHDRec.h
Author : cheney.kan
Version : 0.9
Copyright : Your copyright notice
Description : CGnHDRec declaration
============================================================================
*/
#ifndef GNHDREC_H
#define GNHDREC_H
// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <f32file.h>
// CLASS DECLARATION
class RWriteStream;
class RReadStream;
class CDesC8Array;
class CGnHDRecFmt : public CBase
{
public:
TBuf8<255> iUri;
TInt32 iPoint;
public:
void ExternalizeL(RWriteStream& aStream)const;
void InternalizeL(RReadStream& aStream);
//private:
};
/**
* CGnHDRec
*
*/
class CGnHDRec : public CBase
{
public:
// Constructors and destructor
/**
* Two-phased constructor.
*/
static CGnHDRec* NewLC();
/**
* Two-phased constructor.
*/
static CGnHDRec* NewL();
void OpenRecFileL(const TDesC & aRecFileName);
// if open error, create the rec file.
void OpenOrCreateRecFileL(const TDesC & aRecFileName);
const TDesC & GetRecFileName() const;
// return the position(in Bytes) at previous time downloading.
// if not found the aUri in rec file, return -1.
TInt32 GetPositionPreTimeL(const TDesC8 & aUri);
// update the aGnHDRecFmt info to rec file.
void UpdateRecPosL(CGnHDRecFmt & aGnHDRecFmt);
//void DeleteRecL(const TDesC8 & aUri);
// remove current uri resume point info from rec file.
// you should call GetPositionPreTimeL() before this function,
// or this function does nothing.
void DeleteRecAndCloseL();
void RemoveUriInfoFromRecL(const TDesC8 & aUri);
/**
* Destructor.
*/
virtual ~CGnHDRec();
private:
void ResetL();
void ReplaceAllRecFilesL();
TInt FindIndexL(RReadStream & aStream, const TDesC8 & aUri);
TInt32 InternalizeNextTInt32L(RReadStream & aStream, TInt aIndex);
RArray<TInt32> InternalizeAllTInt32L(RReadStream & aStream);
CDesC8Array * InternalizeAllDesL(RReadStream & aStream);
void ExternalizeAllTInt32L(RWriteStream & aStream, RArray<TInt32> & aList);
void ExternalizeAllDesL(RWriteStream & aStream, CDesC8Array & aList);
/**
* Constructor for performing 1st stage construction
*/
CGnHDRec();
/**
* EPOC default constructor for performing 2nd stage construction
*/
void ConstructL();
private:
RFs iRFs;
RFile iRecFile;
TBuf<255> iRecFileName;
TBuf<255> iRecFileName2;
TInt iIndex;
};
#endif // GNHDREC_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -