⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eb_storesystem.h

📁 这是法国Kaleido公司提供了一个手机mmi设计平台
💻 H
字号:
/***************************************************************************
EB_StoreSystem.h  - 
-------------------
begin                : Tue Mar 3 2004
copyright            : (C) 2004 by DigitalAirways
email                : info@digitalairways.com
***************************************************************************/

/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information").  You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/

/*
**************************************************************
* TODO
**************************************************************

- The implementation of 
pchar fileList(unsigned int *sizeOnly=0)
is using material that is platform dependant (in pf_depen.h/cpp): 
a Windows version may need pf_depen.cpp to be linkable. May be 
this should be restructured in order to be running fine even when
pf-depen.cpp is not used.


**************************************************************
* HISTORY
**************************************************************

- 
*/

#ifndef __EB_STORESYSTEM__
#define __EB_STORESYSTEM__


#include "EB_Utils.h"

class GContext ;


class StoreSystem
{

	friend class RsrcMgr;

private:
	GContext* gContext;
	pchar currentBufferData ;
	unsigned int currentBufferLen ;
	unsigned int currentBufferUsed ;
public:
	DEFINE_NEW(StoreSystem);
	DEFINE_DELETE(StoreSystem);
	StoreSystem(GContext* newGContext=NULL);
	~StoreSystem();
	/*
	* If the current system does not support a hierarchical 
	* file system, this function return 0.
	*/
	static char* getCurrentDirectory();
	/*
	* If the current system does not support a hierarchical 
	* file system, this function does nothing.
	* Otherwise it returns the full path of the current directory.
	*/
	char* setCurrentDirectory(char* newDirectory);
	/*
	* This method returns the local buffer containing all the file names
	* separated by a TB character.
	* If sizeOnly!=null, the buffer is not actually filed up and sizeOnly
	* is updated with the number of characters that should be returned by
	* a non sizeOnly call.
	*/
	pchar fileList(unsigned int *sizeOnly=0);

	/*
	* When successful, this function returns a pointer to a buffer
	* containing the requested file. Note that the returned buffer may
	* be recycled by this object. If its content must be kept by the caller
	* the method detachBuffer() must be called.
	*/
	pchar readFile(char* fullPath);
	/*
	* This method must be used when the caller wants to get the ownership of 
	* the local buffer on whitch it previously acquired a pointer.
	*/
	void detachBuffer();
	/*
	*
	*/
	int getBufferUsed();

	/*
	*
	*/
	static void writeFile(char* fullPath, char* data, int len);
} ;

#endif // ndef __EB_STORESYSTEM__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -