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

📄 calendarapiexampleengine.h

📁 该源码实现个人日程管理以及备忘功能
💻 H
字号:
/*
* ============================================================================
*  Name     : CCalendarAPIexampleEngine from CalendarAPIexampleEngine.h
*  Part of  : CalendarAPIexample
*  Created  : 02/22/2005 by Forum Nokia
*  Description:
*     Declares engine class for application.
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

#ifndef __CALENDAR_API_EXAMPLE_ENGINE_H
#define __CALENDAR_API_EXAMPLE_ENGINE_H

// INCLUDES
#include <e32base.h>	//CBase
#include <agmcallb.h>	//TAgnWhichInstances


// CLASS DECLARATION

/*!
*  CCalendarAPIexampleEngine engine class.
* Provides support for the following features:
* - Add anniversaries
* - Update anniversaries
* - Delete anniversaries
* - Finds anniversaries
* 
*/
class CCalendarAPIexampleEngine :	public CBase,
									public MAgnModelStateCallBack
{
public: // Constructors and destructor

   /*!
	* Two-phased constructor.
	*/
	static CCalendarAPIexampleEngine* NewL();

   /*!
	* Destructor.
	*/
	virtual ~CCalendarAPIexampleEngine();

public: // Other functions
	
   /*!
    * AddAnniversaryL()
    * 
	* Adds an anniversary to the agenda file.
	* param aAnniv - CAgnAnniv object that is added to the agenda file
    */    
	void AddAnniversaryL(	CAgnAnniv& aAnniv) const;

   /*!
    * UpdateAnniversaryL()
    * 
	* Updates an anniversarys data to the agenda file.
	* param aAnniv - CAgnAnniv object that is updated
	* param aNewAnniv - if anniversarys date has changed, a new CAgnAnniv object with
	*					the new date must be supplied.
	* param aWhichInstances - defines which instances of the entry, the update applies to.
    */    
	void UpdateAnniversaryL(CAgnAnniv* aAnniv, 
							CAgnAnniv* aNewAnniv = NULL,
							const TAgnWhichInstances& aWhichInstances = EAllInstances) const;

   /*!
    * DeleteAnniversaryL()
    * 
	* Deletes an anniversary from the agenda file.
	* param aAnniv - CAgnAnniv object that is deleted from the agenda file
	* param aWhichInstances - defines which instances of the entry are deleted.
    */    
	void DeleteAnniversaryL(CAgnAnniv* aAnniv, 
							const TAgnWhichInstances& aWhichInstances = EAllInstances) const;

   /*!
    * GetAnniversariesL()
    * 
	* Finds all anniversaries within given time interval.
	* param aFrom - date where the searching begins
	* param aTo - date where the search ends
	* param aAnniversaries - found anniversaries are put to this array.
	* param aProgressCallBack - pointer to a class that observes agenda progress.
    */    
	void GetAnniversariesL(	const TDateTime& aFrom, 
							const TDateTime& aTo, 
							RPointerArray<CAgnAnniv>& aAnniversaries,
							MAgnProgressCallBack* aProgressCallBack = NULL);
								
private:
   /*!
	* Symbian OS default constructor.
	*/
	CCalendarAPIexampleEngine();
	void ConstructL();	
	
	// From MAgnModelStateCallBack
	void StateCallBack(CAgnEntryModel::TState aState);	
	
private: // Data members

	CActiveSchedulerWait iWait;
	RAgendaServ* iAgnServer;
	};

#endif

⌨️ 快捷键说明

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