epoc32/include/schedulebaseservermtm.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
williamr@2
    17
#ifndef SCHEDULE_BASE_SERVER_MTM_H_
williamr@2
    18
#define SCHEDULE_BASE_SERVER_MTM_H_
williamr@2
    19
williamr@2
    20
/////////////////////////////////////////////////////////////////////////////
williamr@2
    21
//
williamr@2
    22
//	CScheduleBaseServerMtm Declaration
williamr@2
    23
//
williamr@2
    24
/////////////////////////////////////////////////////////////////////////////
williamr@2
    25
williamr@2
    26
 
williamr@2
    27
williamr@2
    28
#include <mtsr.h>
williamr@2
    29
#include <barsc.h>
williamr@2
    30
williamr@2
    31
williamr@2
    32
class CMsvScheduleSend;
williamr@2
    33
class CMsvSysAgentActions;
williamr@2
    34
class TMsvSendErrorAction;
williamr@2
    35
class TMsvSchedulePackage;
williamr@2
    36
class CRepository;
williamr@2
    37
williamr@2
    38
class CScheduleBaseServerMtm : public CBaseServerMtm
williamr@2
    39
/**
williamr@2
    40
Base class for Server MTMs that support scheduling.
williamr@2
    41
williamr@2
    42
It contains pure virtual functions which must be implemented by the Server 
williamr@2
    43
MTM. These functions are not required for interoperability with any other 
williamr@2
    44
classes, however they are essential functionality that must be implemented 
williamr@2
    45
by a Server MTM that support scheduling.
williamr@2
    46
williamr@2
    47
CScheduleBaseServerMtm uses a class derived from CMsvScheduleSend to
williamr@2
    48
interface with the task scheduler.
williamr@2
    49
williamr@2
    50
@see CMsvScheduleSend
williamr@2
    51
@publishedAll
williamr@2
    52
@released
williamr@2
    53
*/
williamr@2
    54
	{
williamr@2
    55
protected:
williamr@2
    56
williamr@2
    57
//	--- Construction ---
williamr@2
    58
williamr@2
    59
	IMPORT_C CScheduleBaseServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry);
williamr@2
    60
williamr@2
    61
//	--- Send the Scheduled Messages ---
williamr@2
    62
williamr@2
    63
	IMPORT_C virtual void SendScheduledL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus);
williamr@2
    64
	IMPORT_C virtual void ScheduleL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus);
williamr@2
    65
	IMPORT_C virtual void ConstructL();
williamr@2
    66
	IMPORT_C void LoadResourceFileL(const TDesC& aResFileName);
williamr@2
    67
williamr@2
    68
// Other Schedule Commands
williamr@2
    69
williamr@2
    70
	IMPORT_C virtual void CheckScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus);
williamr@2
    71
	IMPORT_C virtual void DeleteScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus);
williamr@2
    72
williamr@2
    73
//	--- Pure virtual functions that must be implemented in a derived class ---
williamr@2
    74
williamr@2
    75
	/**
williamr@2
    76
	Populates a TMsvSchedulePackage object with scheduling information.
williamr@2
    77
	
williamr@2
    78
	@param aParameter Parameter information for the package
williamr@2
    79
	@param aMove Flag that signals whether a move or copy is required
williamr@2
    80
	@param aPackage On return, a populated object
williamr@2
    81
	*/
williamr@2
    82
	virtual void PopulateSchedulePackage(const TDesC8& aParameter, const TBool aMove, TMsvSchedulePackage& aPackage) const = 0;
williamr@2
    83
	
williamr@2
    84
	/**
williamr@2
    85
	Loads the resource file (if any) for the MTM.
williamr@2
    86
	*/
williamr@2
    87
	virtual void LoadResourceFileL() = 0;
williamr@2
    88
williamr@2
    89
williamr@2
    90
	IMPORT_C void Queue(TRequestStatus& aStatus);
williamr@2
    91
williamr@2
    92
	IMPORT_C void LoadScheduleSettingsL(CRepository& aRepository, TBool aRestoreErrorsFromResource = EFalse, TInt aErrorsResourceId = 0);
williamr@2
    93
williamr@2
    94
protected:
williamr@2
    95
williamr@2
    96
	IMPORT_C ~CScheduleBaseServerMtm();
williamr@2
    97
williamr@2
    98
private:
williamr@2
    99
williamr@2
   100
	void RequestComplete(TRequestStatus* aStatus, TInt aError);
williamr@2
   101
williamr@2
   102
protected:
williamr@2
   103
williamr@2
   104
//	--- Data Member ---
williamr@2
   105
williamr@2
   106
	/** Message scheduler. */
williamr@2
   107
	CMsvScheduleSend* iScheduleSend; //Should be constructed and deleted by the derived class
williamr@2
   108
williamr@2
   109
	/** MTM resource file. */
williamr@2
   110
	RResourceFile iResourceFile;
williamr@2
   111
	/** File server handle. */
williamr@2
   112
	RFs iFs;
williamr@2
   113
	/** Asynchronous status word. */
williamr@2
   114
	TRequestStatus* iReport;
williamr@2
   115
	};
williamr@2
   116
williamr@2
   117
#endif