messagingfw/wappushfw/pushmtm/inc/pushservermtm.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __PUSHSERVERMTM_H__
       
    17 #define __PUSHSERVERMTM_H__
       
    18 
       
    19 
       
    20 #include <mtsr.h>
       
    21 #include <msventry.h>
       
    22 #include <pushentry.h>
       
    23 
       
    24 /**
       
    25  * Server MTM for the WAP Push Service.  This is required by the MTM architecture, so that 
       
    26  * Push Messages can be saved under a single WAP Push Service Entry. Only basic functionality
       
    27  * has been implemented, create, change, delete and progress functions. Other functionality such
       
    28  * as copy from local to a service, etc., is not applicable to WAP Push so returns KErrNotSupported.
       
    29  * 
       
    30  * The Progress class for this MTM is defined in the header file for the Push Entry class to 
       
    31  * minimise the number of exported files for the WAP Push projects.
       
    32  */
       
    33 
       
    34 //##ModelId=3B659E4001F8
       
    35 class CWapPushServerMtm : public CBaseServerMtm
       
    36 /**
       
    37 @internalTechnology
       
    38 @released
       
    39 */
       
    40 	{
       
    41 
       
    42 public:
       
    43 /**
       
    44 @internalComponent
       
    45 @released
       
    46 */
       
    47 	enum TWapPushServerState	{ 
       
    48 								EPushWaiting, 
       
    49 								EPushCreatingEntries,
       
    50 								EPushChangingEntries,
       
    51 								EPushDeletingEntries,
       
    52 								EPushComplete 
       
    53 								};
       
    54 
       
    55 
       
    56 
       
    57 	//##ModelId=3B659E40034D
       
    58 	IMPORT_C static CWapPushServerMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aInitialEntry);
       
    59 	//##ModelId=3B659E40034C
       
    60 	~CWapPushServerMtm();
       
    61 
       
    62 	//##ModelId=3B659E400338
       
    63 	void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    64 	//##ModelId=3B659E400324
       
    65 	void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    66 	//##ModelId=3B659E400310
       
    67 	void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    68 	//##ModelId=3B659E4002FC
       
    69 	void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    70 	//##ModelId=3B659E4002E8
       
    71 	void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    72 	//##ModelId=3B659E4002D5
       
    73 	void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
       
    74 	//##ModelId=3B659E4002C0
       
    75 	void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    76 	//##ModelId=3B659E4002AC
       
    77 	void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    78 	//##ModelId=3B659E400298
       
    79 	void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    80 
       
    81 	//##ModelId=3B659E40027A
       
    82 	void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
       
    83 	//
       
    84 	//##ModelId=3B659E400273
       
    85 	TBool CommandExpected();
       
    86 	//
       
    87 	//##ModelId=3B659E400272
       
    88 	const TDesC8& Progress();
       
    89 
       
    90 protected:
       
    91 	//RunL stuff
       
    92 	//##ModelId=3B659E400271
       
    93 	void DoCancel();
       
    94 	//##ModelId=3B659E400270
       
    95 	void DoRunL();
       
    96 	//##ModelId=3B659E400267
       
    97 	void Complete();
       
    98 
       
    99 	//##ModelId=3B659E40025E
       
   100 	void DoComplete(TInt aError);
       
   101 	//##ModelId=3B659E40025C
       
   102 	TInt RunError(TInt aError);
       
   103 
       
   104 
       
   105 private:
       
   106 	//##ModelId=3B659E400249
       
   107 	CWapPushServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aInitialEntry);
       
   108 	//##ModelId=3B659E400248
       
   109 	void Construct();
       
   110 	//##ModelId=3B659E400241
       
   111 	void ResetProgress();
       
   112 
       
   113 	//##ModelId=3B659E40023E
       
   114 	const CMsvEntrySelection*	iSelection;
       
   115 	//##ModelId=3B659E400234
       
   116 	TPushMTMProgressBuf			iProgressBuf;
       
   117 	//##ModelId=3B659E400222
       
   118 	TPushMTMProgress			iProgress;
       
   119 
       
   120 
       
   121 	//##ModelId=3B659E400218
       
   122 	TInt						iError;
       
   123 	//##ModelId=3B659E40020E
       
   124 	TRequestStatus*				iReportStatus;
       
   125 
       
   126 	//##ModelId=3B659E400205
       
   127 	TPushServerMTMState			iState;
       
   128 	};
       
   129 
       
   130 #endif