telephonyserverplugins/multimodetsy/Multimode/sms/mSMSWRIT.H
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-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 // Header file contains the CATSmsMessagingWrite class. This class is responsible for 
       
    15 // implementing the AT+CMGW command. (As per ETSI Standard, GSM 07.05 version 4.5.0)
       
    16 // This command basically writes a pdu message to the preferred memory. 
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalAll 
       
    23 */
       
    24 
       
    25 #ifndef __MSMSWRIT_H__
       
    26 #define __MSMSWRIT_H__
       
    27 
       
    28 #include "smsbase.H"
       
    29 #include "mSMSSTOR.H"
       
    30 
       
    31 
       
    32 class CATSmsMessagingWrite : public CATSmsCommands
       
    33 	{
       
    34 public:
       
    35 	static CATSmsMessagingWrite* NewL(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aMmStatus);
       
    36 	CATSmsMessagingWrite(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aMmStatus);
       
    37 	~CATSmsMessagingWrite();
       
    38 	void Start(TTsyReqHandle aTsyReqHandle,TAny* aParams);
       
    39 	void Stop(TTsyReqHandle aTsyReqHandle);
       
    40 	virtual void EventSignal(TEventSource aSource);
       
    41 	virtual void CompleteWithIOError(TEventSource aSource,TInt aStatus);
       
    42 	void Complete(TInt aError);
       
    43 	virtual void Complete(TInt aError,TEventSource aSource);
       
    44 
       
    45 private:
       
    46 	void ParseResponseL();
       
    47 	TInt SetMsgStatus();
       
    48 	void StartPduWrite();
       
    49 
       
    50 private:
       
    51 	CCommChatString* iExpectString;
       
    52 	enum {
       
    53 		EATNotInProgress,
       
    54 		EATWaitForSendingPduLengthComplete,
       
    55 		EATReadSmsRefNumCompleted,
       
    56 		EATReadPduEnterPduModeResponseCompleted,
       
    57 		EATWaitForSendingPduComplete,
       
    58 		EATCancellingWaitForWriteComplete,
       
    59 		EATCancellingReadCompleted,
       
    60 		EATWaitForSendingPrefMemComplete,
       
    61 		EATWaitForPrefMemResponse
       
    62 		} iState;
       
    63 
       
    64 	TBuf8<KMaxAsciiPduLength> iTxBuffer;
       
    65 
       
    66 	RMobileSmsStore::TMobileGsmSmsEntryV1* iSmsEntry;
       
    67 
       
    68 	TBool iCancelled;
       
    69 	CMobileSmsStore* iSmsStore;
       
    70 	CPhoneGlobals::TPhoneSmsPduStd iNextAttempt;
       
    71 	TBuf8<KMaxAsciiPduLength> iMsgDataAscii;
       
    72 	};
       
    73 
       
    74 #endif