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

📄 database.h

📁 一个symbian操作系统的
💻 H
字号:
/*
* ============================================================================
*  Name     : CHeatMeter2View from HeatMeter2View.h
*  Part of  : HeatMeter2
*  Created  : 2004.03.27. by 
*  Description:
*     Declares view for application.
*  Version  :
*  Copyright: 
* ============================================================================
*/

#ifndef DATABASE_H
#define DATABASE_H

// INCLUDES
#include <aknview.h>
#include <d32dbms.h>
#include "GprsClient.h"

// FORWARD DECLARATIONS

// CLASS DECLARATION

/**
*  CDataBase class.
* 
*/

class MContainerObserver
{
public:
	virtual void SynchReady() = 0;
	virtual void SynchFailed(TInt aReason) = 0;
};



class CDataBase : public MDbObserver
    {
    public: // Constructors and destructor

        /**
        * EPOC default constructor.
        */
		static CDataBase* NewL(MContainerObserver *aCallBack);
		static CDataBase* NewLC(MContainerObserver *aCallBack);

        /**
        * Destructor.
        */
        virtual ~CDataBase();

    public: // Functions from base classes
		//update the value of a database item
	    void UpdateItemValue(TInt aID, TInt aState);

		//start synchronisation
	    void Synch(TInetAddr& aIpAddress, TDesC& aPath);

		//fill the array with values from the database
	    void FillArrays(CDesCArray* aListBoxArray, CArrayFixFlat<TInt> *aValues, CArrayFixFlat<TInt> *aIDs);

		//called when response from the server has been received
		void ResponseReceived(TDesC8 &aResponse);
        

    private:
        void ConstructL(MContainerObserver *aCallBack);


	public:
		void ResetDataBase();
		TInt iClientID;

    private: // Data
		//save ini file
	    void SaveIniFile();

		//open database if any
	    TInt OpenDb();

		//create database
	    TInt CreateDb();
		RFs	iFs;
		RDbNamedDatabase iHeatMeterDb;
		RDbs iDbSession;
		TFileName fileName;
		TFileName iniFileName;
		CGprsClient *iGprsClient;
		TInt iVersion;
		MContainerObserver *iCallBack;
    };

#endif

// End of File

⌨️ 快捷键说明

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