mobilemessaging/smsmtm/servermtm/inc/SMSSERV.H
changeset 0 72b543305e3a
child 1 d09ac5c1e252
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 1999-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 SMSSERV_H_
       
    17 #define SMSSERV_H_
       
    18 
       
    19 #include <smuthdr.h>
       
    20 #include <schedulebaseservermtm.h>
       
    21 #include <smutset.h>
       
    22 
       
    23 class CSmsOutboxSend;
       
    24 class CSmsSimUtils;
       
    25 
       
    26 class CSmsServerMtm : public CScheduleBaseServerMtm
       
    27 /**
       
    28 @internalTechnology
       
    29 @released
       
    30 */
       
    31 	{
       
    32 public:
       
    33 	IMPORT_C static CSmsServerMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry);
       
    34 	~CSmsServerMtm();
       
    35 
       
    36 	void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    37 	void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    38 	void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    39 	void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    40 	void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    41 	void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus);
       
    42 //	void DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
       
    43 	void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);
       
    44 	void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    45 	void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    46 	//
       
    47 	void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
       
    48 	//
       
    49 	TBool CommandExpected();
       
    50 	//
       
    51 	const TDesC8& Progress();
       
    52 	//
       
    53 
       
    54 protected:
       
    55 	void DoCancel();
       
    56 	void DoRunL();
       
    57 	void CompleteCommand(TInt aError);
       
    58 	void DoComplete(TInt aError);
       
    59 
       
    60 //	--- Functions derived from CScheduleBaseServerMtm ---
       
    61 	TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
       
    62 	void ConstructL();
       
    63 	void RestoreScheduleSettingsL();
       
    64 private:
       
    65 	CSmsServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry);
       
    66 	void RestoreSettingsL();
       
    67 	void LoadResourceFileL();
       
    68 	void FindServiceId();
       
    69 	void PopulateSchedulePackage(const TDesC8& aParameter, const TBool aMove, TMsvSchedulePackage& aPackage) const;
       
    70 	void ScheduleCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
       
    71 	void SimUtilsL(const CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus);
       
    72 
       
    73 private:
       
    74 	TMsvId 					iSmsServiceId;
       
    75 	TSmsProgress 			iProgress;
       
    76 	TSmsProgressBuf 		iProgressBuf;	
       
    77 	CSmsOutboxSend* 		iOutboxSend;
       
    78 	CSmsSimUtils* 			iSimUtils;
       
    79 	enum TSmsServerMtmState
       
    80 		{
       
    81 		ESmsServerMtmWaiting,
       
    82 		ESmsServerMtmSending,
       
    83 		ESmsServerMtmScheduling,
       
    84 		ESmsServerMtmSimUtils
       
    85 		} iState;
       
    86 #if (defined SYMBIAN_USER_PROMPT_SERVICE)		
       
    87 	TThreadId				iClientThreadId;
       
    88 	TBool 					iHasCapability;
       
    89 #endif	
       
    90 	};
       
    91 
       
    92 #endif