adaptationlayer/tsy/nokiatsy_dll/internal/test/nokiatsy_test_tool/sms/inc/cmmsmstsy.h
changeset 4 510c70acdbf6
parent 3 1972d8c2e329
child 5 8ccc39f9d787
equal deleted inserted replaced
3:1972d8c2e329 4:510c70acdbf6
     1 /*
       
     2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   SMSTSY
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMMSMSTSY_H
       
    21 #define CMMSMSTSY_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <etelmm.h>
       
    25 #include <et_phone.h>          
       
    26 #include "mmtsy_timeoutdefs.h" 
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class CMmSmsStorageTsy;
       
    30 class CMmPhoneTsy;
       
    31 class CMessStore;
       
    32 class CMmSmsExtInterface;
       
    33 class CMmSmsStorageTsy;
       
    34 class CMmDataPackage;
       
    35 class CSmsSendRequest;
       
    36 class CListReadAllAttempt;
       
    37 class CTsySatMessagingBase;
       
    38 class CMmTsyReqHandleStore;
       
    39 struct TSmsMsg;
       
    40 struct TSmsParameters;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *  CMmSmsTsy contains extended sms functionality that is mode-independent 
       
    46 *  Extension request handles and parameters are stored as attributes
       
    47 *
       
    48 *  @lib CommonTSY.lib
       
    49 *  @since S60 v2.6 
       
    50 */
       
    51 NONSHARABLE_CLASS( CMmSmsTsy ) : public CSubSessionExtBase
       
    52     {
       
    53     public:
       
    54 
       
    55         enum TSmsRequestTypes
       
    56             {     
       
    57             EMultimodeSmsReqHandleUnknown,          //0
       
    58             //SMS specific requests
       
    59             EMultimodeSmsReceiveMessage,
       
    60             EMultimodeSmsSetReceiveMode,
       
    61             EMultimodeSmsAckStored,
       
    62             EMultimodeSmsNackStored,
       
    63             EMultimodeSmsResumeReception,
       
    64             EMultimodeSmsSendMessage,
       
    65             EMultimodeSmsSendSatMessage,
       
    66             EMultimodeSmsGetMessageStoreInfo,
       
    67             EMultimodeSmsReadSmspListPhase1,
       
    68             EMultimodeSmsStoreSmspList, 
       
    69             EMultimodeSmsNotifyReceiveModeChange,   
       
    70             EMultimodeSmsNotifyMoSmsBearerChange,
       
    71             EMultimodeSmsSetMoSmsBearer,
       
    72             EMultimodeSmsNotifySmspListChange, 
       
    73             //SMS storage specific requests
       
    74             EMultimodeSmsGetInfo,
       
    75             EMultimodeSimStSmsReadSms, 
       
    76             EMultimodeSimStSmsWriteSms,            
       
    77             EMultimodeSimStSmsEraseSms,
       
    78             EMultimodeSimStSmsEraseAllSms,
       
    79             EMultimodeSimSmsNotifyStoreEvent,
       
    80             EMultimodeSimStSmsReadAllSms, 
       
    81             EMultimodeSimStSmsGetNumOfLoc,
       
    82 
       
    83             EMultimodeSmsMaxNumOfRequests 
       
    84             };
       
    85 
       
    86     private:
       
    87 
       
    88         /** SMS routing activity */
       
    89         enum TSmsRoutingActivity
       
    90             {
       
    91             ERoutingNotActivated,
       
    92             ERoutingActivating,
       
    93             ERoutingActivated
       
    94             };
       
    95 
       
    96     public:
       
    97 
       
    98         /**
       
    99          * Two-phased constructor.
       
   100          * @param aMmPhone Pointer to the MmPhone
       
   101          * @return Pointer to the created CMmSmsTsy object
       
   102          */
       
   103         static CMmSmsTsy* NewL( CMmPhoneTsy* aMmPhone );
       
   104 
       
   105         /**
       
   106          * Destructor
       
   107          */
       
   108         ~CMmSmsTsy();
       
   109 
       
   110         /** 
       
   111          * Initialisation method that is called from ETel Server
       
   112          *          
       
   113          * @since S60 v2.6 
       
   114          */
       
   115         virtual void Init();
       
   116 
       
   117         /**
       
   118          * New instances are created by given name
       
   119          *          
       
   120          * @since S60 v2.6 
       
   121          * @param aName Name of the object to be created
       
   122          * @return Pointer to created object casted to CTelObject*
       
   123          */
       
   124         virtual CTelObject* OpenNewObjectByNameL( const TDesC& aName ); 
       
   125 
       
   126         /**
       
   127          * New instances are created by given name
       
   128          * 
       
   129          * @since S60 v2.6 
       
   130          * @param aNewName Name of the object to be created
       
   131          * @return Pointer to created object casted to CTelObject*
       
   132          */
       
   133         virtual CTelObject* OpenNewObjectL( TDes& aNewName ); 
       
   134         
       
   135         /** 
       
   136          * Handles extended client requests by calling ExtFunc method
       
   137          *           
       
   138          * @since S60 v2.6 
       
   139          * @param aTsyReqHandle Request handle
       
   140          * @param aIpc IPC number of request
       
   141          * @param aPackage Parameters for request
       
   142          * @return Error value
       
   143          */
       
   144         virtual TInt ExtFunc( const TTsyReqHandle aTsyReqHandle, 
       
   145             const TInt aIpc, 
       
   146             const TDataPackage& aPackage );
       
   147 
       
   148         /** 
       
   149          * When the ETel server receives an "extension" client request, 
       
   150          * it will pass the IPC request number down to the TSY in order to find
       
   151          * out what type of request it is
       
   152          *          
       
   153          * @since S60 v2.6 
       
   154          * @param aIpc IPC number of request
       
   155          * @return Request mode for given IPC
       
   156          */
       
   157         virtual CTelObject::TReqMode ReqModeL( const TInt aIpc );
       
   158 
       
   159         /**
       
   160          * Returns number of slots to be used for given IPC
       
   161          *          
       
   162          * @since S60 v2.6 
       
   163          * @param aIpc IPC number of request
       
   164          * @return Number of slots
       
   165          */
       
   166         virtual TInt NumberOfSlotsL( const TInt aIpc );
       
   167 
       
   168         /**
       
   169          * Cancels request that's IPC number and request handle are given in 
       
   170          * parameters
       
   171          *          
       
   172          * @since S60 v2.6 
       
   173          * @param aIpc IPC number of request
       
   174          * @param aTsyReqHandle Request handle
       
   175          * @return Error value
       
   176          */
       
   177         virtual TInt CancelService( const TInt aIpc, 
       
   178             const TTsyReqHandle aTsyReqHandle );
       
   179 
       
   180         /** 
       
   181          * Register given notification
       
   182          *          
       
   183          * @since S60 v2.6 
       
   184          * @param aIpc Number of slots
       
   185          * @return Error value
       
   186          */
       
   187         virtual TInt RegisterNotification( const TInt aIpc );
       
   188 
       
   189         /**
       
   190          * Deregister given notification
       
   191          *          
       
   192          * @since S60 v2.6 
       
   193          * @param aIpc IPC number of request
       
   194          * @return Error value
       
   195          */
       
   196         virtual TInt DeregisterNotification( const TInt aIpc );
       
   197 
       
   198         /**
       
   199          * Return pointer to the SMS Storage sub-session
       
   200          *          
       
   201          * @since S60 v2.6 
       
   202          * @return Pointer to SMS Storage sub-session
       
   203          */
       
   204         virtual CMmSmsStorageTsy* GetSmsStorageTsy();
       
   205 
       
   206         /**
       
   207          * Activate SMS routing
       
   208          *          
       
   209          * @since S60 v2.6 
       
   210          */
       
   211         virtual void ActivateSmsRoutingL();
       
   212 
       
   213         /**
       
   214          * This method completes reception of incoming unstored SMS
       
   215          *          
       
   216          * @since S60 v2.6 
       
   217          * @param aError Error code
       
   218          * @param aDataPackage A data package containing TBool (indicates if 
       
   219          * some errors have occured while handling or acknowledging incoming Sms) 
       
   220          * and a TSmsMsg* (pointer to Sms message)
       
   221          */
       
   222         virtual void CompleteReceiveMessage( TInt aError, 
       
   223             CMmDataPackage* aDataPackage );
       
   224 
       
   225         /**
       
   226          * Handle internally response for ActivateSmsRouting
       
   227          *          
       
   228          * @since S60 v2.6 
       
   229          * @param aError Error code
       
   230          * @param aDataPackage Package data containing TUint8, 
       
   231          * status of the routing (active or not)
       
   232          */
       
   233         virtual void CompleteActivateSmsRouting( TInt aError, 
       
   234             CMmDataPackage* aDataPackage );
       
   235 
       
   236         /** 
       
   237          * Complete AckSmsStored request
       
   238          *          
       
   239          * @since S60 v2.6 
       
   240          * @param aError Error code
       
   241          */
       
   242         virtual void CompleteAckSmsStored( TInt aError );
       
   243 
       
   244         /** 
       
   245          * Complete NackSmsStored request
       
   246          *          
       
   247          * @since S60 v2.6 
       
   248          * @param aError Error code
       
   249          */
       
   250         virtual void CompleteNackSmsStored( TInt aError );
       
   251 
       
   252         /** 
       
   253          * Complete CompleteSendMessage request
       
   254          *          
       
   255          * @since S60 v2.6 
       
   256          * @param aError Error code
       
   257          * @param aDataPackage
       
   258          */
       
   259         virtual void CompleteSendMessage( TInt aError, 
       
   260             CMmDataPackage* aDataPackage );
       
   261 
       
   262         /**
       
   263          * Send SAT SMS message to the network
       
   264          *          
       
   265          * @since S60 v2.6 
       
   266          * @param aTsySatMessaging Pointer to Sat messaging
       
   267          * @param aSmsTpdu Pointer to Sms TPDU
       
   268          * @param aScAddress Pointer to service address
       
   269          * @param aMobileTON Pointer to type of number
       
   270          * @param aMobileNPI Pointer to number plan
       
   271          * @param aMoreToSend True if there is more to send
       
   272          * @param aTsyReqHandle Request handle
       
   273          * @return KErrNone 
       
   274          */
       
   275         virtual TInt SendSatMessage( CTsySatMessagingBase* aTsySatMessaging, 
       
   276             TDes8* aSmsTpdu, 
       
   277             TDes16* aScAddress, 
       
   278             RMobilePhone::TMobileTON* aMobileTON, 
       
   279             RMobilePhone::TMobileNPI* aMobileNPI,
       
   280             TBool aMoreToSend,
       
   281             TTsyReqHandle aTsyReqHandle );
       
   282 
       
   283         /**
       
   284          * Complete SendSatMessage request
       
   285          *          
       
   286          * @since S60 v2.6 
       
   287          * @param aError Error code
       
   288          */
       
   289         virtual void CompleteSendSatMessage( TInt aError );
       
   290 
       
   291         /**
       
   292          * Complete ResumeSmsReception request
       
   293          *          
       
   294          * @since S60 v2.6 
       
   295          * @param aError Error code
       
   296          */
       
   297         virtual void CompleteResumeSmsReception( TInt aError );
       
   298 
       
   299         /**
       
   300          * Complete get sms message store info
       
   301          *          
       
   302          * @since S60 v2.6 
       
   303          * @param aError Error code
       
   304          * @param aDataPackage
       
   305          */
       
   306         virtual void CompleteGetMessageStoreInfo( TInt aError, 
       
   307             CMmDataPackage* aDataPackage );
       
   308 
       
   309         /**
       
   310          * Complete first phase of read all SMSP sets
       
   311          *          
       
   312          * @since S60 v2.6 
       
   313          * @param aError Error code
       
   314          * @param aDataPackage
       
   315          */
       
   316         virtual void CompleteReadAllSmspPhase1( TInt aError, 
       
   317             CMmDataPackage* aDataPackage );
       
   318 
       
   319         /**
       
   320          * Handle internally SMS servers response to SMS Parameter update          
       
   321          * request (Store SMSP list)
       
   322          *          
       
   323          * @since S60 v2.6 
       
   324          * @param aError Error code
       
   325          */
       
   326         virtual void InternalStoreSmspList( TInt aError );
       
   327 
       
   328         /**
       
   329          * Set SMS Storage TSY
       
   330          *          
       
   331          * @since S60 v2.6 
       
   332          * @param aNewPointer Pointer to Storage Tsy
       
   333          */
       
   334         virtual void SetSmsStorageTsy( CMmSmsStorageTsy* aNewPointer );
       
   335 
       
   336         /**
       
   337          * Return number of SMS location on SIM card 
       
   338          *          
       
   339          * @since S60 v2.6 
       
   340          * @return Number of SMS location on SIM card
       
   341          */
       
   342         virtual TInt16 GetSmsNumOfLoc();
       
   343 
       
   344         /**
       
   345          * Set Sms Number of Location on SIM Card
       
   346          *          
       
   347          * @since S60 v2.6 
       
   348          * @param aSmsNumOfUsedEntries Number of SMS location
       
   349          */
       
   350         virtual void SetSmsNumOfLoc( TInt aSmsNumOfUsedEntries );
       
   351 
       
   352         /**
       
   353          * This method set Sms Send Attributes values for sending MMSAT 
       
   354          * message
       
   355          *          
       
   356          * @since S60 v2.6 
       
   357          * @param aMmPhone
       
   358          * @param aSmsTpdu Pointer to Sms TPDU
       
   359          * @param aScAddress Pointer to service address
       
   360          * @param aMobileTON Pointer to type of number
       
   361          * @param aMobileNPI Pointer to number plan
       
   362          * @param aMoreToSend True if there is more to send
       
   363          * @return Error code
       
   364          */
       
   365         virtual TInt SendSatMessageL( CMmPhoneTsy* aMmPhone,
       
   366             TDes8* aSmsTpdu,
       
   367             TDes16* aScAddress,
       
   368             RMobilePhone::TMobileTON* aMobileTON,
       
   369             RMobilePhone::TMobileNPI* aMobileNPI,
       
   370             TBool aMoreToSend );
       
   371 
       
   372         /**
       
   373          * Set the information about the CS hardware status: True if off-line, 
       
   374          * false if on-line
       
   375          *          
       
   376          * @since S60 v2.6 
       
   377          * @param aIsOffline
       
   378          */
       
   379         void SetOffline( TBool aIsOffline );
       
   380 
       
   381         /**
       
   382          * Complete set bearer type for sending SMS messages 
       
   383          *          
       
   384          * @since S60 v3.0
       
   385          * @param aResult Error value
       
   386          */
       
   387         void CMmSmsTsy::CompleteSetMoSmsBearer( TInt aResult );
       
   388 
       
   389 #ifdef REQHANDLE_TIMER
       
   390         /**
       
   391          * Chooses the type of response, automatic or common
       
   392          *          
       
   393          * @since S60 v2.6 
       
   394          * @param aReqHandleType Req handle type
       
   395          * @param aTsyReqHandle Req handle to be stored
       
   396          */
       
   397         void SetTypeOfResponse( const TInt aReqHandleType, 
       
   398             const TTsyReqHandle aTsyReqHandle );
       
   399 
       
   400         /**
       
   401          * Complete request because of timer expiration
       
   402          *          
       
   403          * @since S60 v2.6 
       
   404          * @param aReqHandleType Request handle type
       
   405          * @param aError Error value
       
   406          */    
       
   407         virtual void Complete( TInt aReqHandleType, 
       
   408             TInt aError );
       
   409 #endif // REQHANDLE_TIMER
       
   410 
       
   411     private:
       
   412 
       
   413         /**
       
   414          * C++ default constructor.
       
   415          */
       
   416         CMmSmsTsy();
       
   417 
       
   418         /**
       
   419          * By default Symbian 2nd phase constructor is private.
       
   420          */
       
   421         void ConstructL();
       
   422 
       
   423         /**
       
   424          * Resend an unsent message
       
   425          *          
       
   426          * @since S60 v2.6 
       
   427          */
       
   428         void ResendSms();
       
   429 
       
   430         /** 
       
   431          * Handles extended client requests
       
   432          *          
       
   433          * @since S60 v2.6 
       
   434          * @param aTsyReqHandle Request handle
       
   435          * @param aIpc IPC number of request
       
   436          * @param aPackage Data Package
       
   437          * @return Error value
       
   438          */
       
   439         TInt DoExtFuncL( const TTsyReqHandle aTsyReqHandle, 
       
   440             const TInt aIpc, 
       
   441             const TDataPackage& aPackage );
       
   442 
       
   443         /**
       
   444          * Get SMS messaging capabilities
       
   445          *          
       
   446          * @since S60 v2.6 
       
   447          * @param aTsyReqHandle Request handle
       
   448          * @param aCaps Pointer to the messaging capabilities
       
   449          * @return KErrNone 
       
   450          */
       
   451         TInt GetCaps( const TTsyReqHandle aTsyReqHandle, 
       
   452             TDes8* aCaps );
       
   453 
       
   454         /**
       
   455          * Get receive mode
       
   456          *          
       
   457          * @since S60 v2.6 
       
   458          * @param aTsyReqHandle Request handle
       
   459          * @param aReceiveMode Pointer to receive mode
       
   460          * @return KErrNone 
       
   461          */
       
   462         TInt GetReceiveMode( const TTsyReqHandle aTsyReqHandle, 
       
   463             RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
       
   464 
       
   465         /**
       
   466          * Set receive mode
       
   467          *          
       
   468          * @since S60 v2.6 
       
   469          * @param aTsyReqHandle Request handle
       
   470          * @param aReceiveMode Pointer to receive mode
       
   471          * @return KErrNone 
       
   472          */
       
   473         TInt SetReceiveMode( const TTsyReqHandle aTsyReqHandle, 
       
   474             RMobileSmsMessaging::TMobileSmsReceiveMode const* aReceiveMode );
       
   475 
       
   476         /**
       
   477          * Set receive mode cancel
       
   478          *          
       
   479          * @since S60 v2.6 
       
   480          * @param aTsyReqHandle Request handle
       
   481          * @return KErrNone 
       
   482          */
       
   483         TInt SetReceiveModeCancel( const TTsyReqHandle aTsyReqHandle );
       
   484 
       
   485         /**
       
   486          * Notify from receive mode changes
       
   487          *          
       
   488          * @since S60 v2.6 
       
   489          * @param aReceiveMode Pointer to receive mode
       
   490          * @return KErrNone 
       
   491          */
       
   492         TInt NotifyReceiveModeChange( 
       
   493             RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
       
   494 
       
   495         /**
       
   496          * Cancel notify reveice mode change request
       
   497          *          
       
   498          * @since S60 v2.6 
       
   499          * @param aTsyReqHandle Request handle
       
   500          * @return KErrNone 
       
   501          */
       
   502         TInt NotifyReceiveModeChangeCancel( 
       
   503             const TTsyReqHandle aTsyReqHandle );
       
   504 
       
   505         /**
       
   506          * Complete notify reveice mode change request
       
   507          *          
       
   508          * @since S60 v2.6 
       
   509          */
       
   510         void CompleteNotifyReceiveModeChange();
       
   511 
       
   512         /**
       
   513          * This method starts the reception of incoming unstored SMS
       
   514          *          
       
   515          * @since S60 v2.6 
       
   516          * @param aTsyReqHandle Request handle
       
   517          * @param aMsgData Message data
       
   518          * @param aMsgAttributes Message attributes
       
   519          * @return Error value
       
   520          */
       
   521         TInt ReceiveMessageL( const TTsyReqHandle aTsyReqHandle,
       
   522             TDes8* aMsgData, 
       
   523             TDes8* aMsgAttributes );
       
   524 
       
   525         /**
       
   526          * Wait for next incoming unstored message cancel
       
   527          *          
       
   528          * @since S60 v2.6 
       
   529          * @param aTsyReqHandle Request handle
       
   530          * @return Error value
       
   531          */
       
   532         TInt ReceiveMessageCancel( const TTsyReqHandle aTsyReqHandle );
       
   533 
       
   534         /**
       
   535          * Store Class 2 message in TSY's internal memory
       
   536          *          
       
   537          * @since S60 v2.6 
       
   538          * @param aSmsMsg Pointer to TSmsMsg struct
       
   539          */
       
   540         void StoreClass2MessageL( TSmsMsg const* aSmsMsg );
       
   541 
       
   542         /**
       
   543          * Deliver Stored Class 2 message to the SMS stack
       
   544          * @since S60 v2.6 
       
   545          */
       
   546         void DeliverClass2ToSmsStack();
       
   547 
       
   548         /**
       
   549          * Ack message
       
   550          *          
       
   551          * @since S60 v2.6 
       
   552          * @param aTsyReqHandle Request handle
       
   553          * @param aMsgData SMS PDU
       
   554          * @param aMemoryFull Is SMS stack's memory now full
       
   555          * @return Error value
       
   556          */
       
   557         TInt AckSmsStoredL( const TTsyReqHandle aTsyReqHandle, 
       
   558             const TDesC8* aMsgData, 
       
   559             TBool const* aMemoryFull );
       
   560 
       
   561         /**
       
   562          * Route RP-Error request to messagehandler
       
   563          *          
       
   564          * @since S60 v2.6 
       
   565          * @param aTsyReqHandle Request handle
       
   566          * @param aMsgData Pointer to message data
       
   567          * @param aRpCause Pointer to RP cause value
       
   568          * @return Error value
       
   569          */
       
   570         TInt NackSmsStoredL( const TTsyReqHandle aTsyReqHandle, 
       
   571             const TDesC8* aMsgData, 
       
   572             TInt* aRpCause );
       
   573 
       
   574         /**
       
   575          * Resume sms message reception
       
   576          *          
       
   577          * @since S60 v2.6 
       
   578          * @param aTsyReqHandle Request handle
       
   579          * @return Error value
       
   580          */
       
   581         TInt ResumeSmsReceptionL( const TTsyReqHandle aTsyReqHandle );
       
   582 
       
   583         /**
       
   584          * Retrieve the current setting for the bearer type used 
       
   585          * for sending SMS messages 
       
   586          *          
       
   587          * @since S60 v2.6 
       
   588          * @param aTsyReqHandle Request handle
       
   589          * @param aBearer Pointer to bearer
       
   590          * @return KErrNone
       
   591          */
       
   592         TInt GetMoSmsBearer( const TTsyReqHandle aTsyReqHandle, 
       
   593             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   594 
       
   595         /**
       
   596          * Set the bearer type for sending SMS messages 
       
   597          *          
       
   598          * @since S60 v2.6 
       
   599          * @param aTsyReqHandle Request handle
       
   600          * @param aBearer Pointer to bearer
       
   601          * @return KErrNone
       
   602          */
       
   603         TInt SetMoSmsBearer( const TTsyReqHandle aTsyReqHandle, 
       
   604             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   605 
       
   606         /**
       
   607          * Set the bearer type cancel
       
   608          *          
       
   609          * @since S60 v2.6 
       
   610          * @param aTsyReqHandle Request handle
       
   611          * @return KErrNone
       
   612          */
       
   613         TInt SetMoSmsBearerCancel( const TTsyReqHandle aTsyReqHandle );
       
   614 
       
   615         /**
       
   616          * Notify from SMS bearer change
       
   617          *          
       
   618          * @since S60 v2.6 
       
   619          * @param aBearer Pointer to bearer
       
   620          * @return KErrNone
       
   621          */
       
   622         TInt NotifyMoSmsBearerChange( 
       
   623             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   624 
       
   625         /**
       
   626          * Notify from SMS bearer change cancel
       
   627          *          
       
   628          * @since S60 v2.6 
       
   629          * @param aTsyReqHandle Request handle
       
   630          * @return KErrNone
       
   631          */
       
   632         TInt NotifyMoSmsBearerChangeCancel( 
       
   633             const TTsyReqHandle aTsyReqHandle );
       
   634 
       
   635         /**
       
   636          * Send message
       
   637          *          
       
   638          * @since S60 v2.6 
       
   639          * @param aTsyReqHandle Request handle
       
   640          * @param aMsgData Pointer to Message Data
       
   641          * @param aMsgAttributes Pointer to Message Attributes
       
   642          * @return Error value
       
   643          */
       
   644         TInt SendMessageL( const TTsyReqHandle aTsyReqHandle, 
       
   645             TDes8* aMsgData, 
       
   646             TDes8* aMsgAttributes );
       
   647 
       
   648         /** 
       
   649          * Send sat message
       
   650          *          
       
   651          * @since S60 v2.6 
       
   652          * @param aSmsTpdu Pointer to SMS PDU
       
   653          * @param aScAddress Pointer to SC address
       
   654          * @param aMobileTON Type of number
       
   655          * @param aMobileNPI Numberin plan identific
       
   656          * @param aTsyReqHandle Request handle
       
   657          */
       
   658         void DoSendSatMessageL( TDes8* aSmsTpdu, 
       
   659             TDes16* aScAddress,                    
       
   660             RMobilePhone::TMobileTON* aMobileTON, 
       
   661             RMobilePhone::TMobileNPI* aMobileNPI, 
       
   662             TBool aMoreToSend,
       
   663             TTsyReqHandle aTsyReqHandle );
       
   664 
       
   665         /** 
       
   666          * Enumerate sms message stores
       
   667          *          
       
   668          * @since S60 v2.6 
       
   669          * @param aTsyReqHandle Request handle
       
   670          * @param aCount Pointer to message count
       
   671          * @return KErrNone    
       
   672          */
       
   673         TInt EnumerateMessageStores( const TTsyReqHandle aTsyReqHandle, 
       
   674             TInt* aCount );
       
   675 
       
   676         /**
       
   677          * Get sms message store info
       
   678          *          
       
   679          * @since S60 v2.6 
       
   680          * @param aTsyReqHandle Request handle
       
   681          * @param aIndex Index
       
   682          * @param aInfo Information
       
   683          * @return Error value
       
   684          */
       
   685         TInt GetMessageStoreInfoL( const TTsyReqHandle aTsyReqHandle, 
       
   686             TInt const* aIndex, 
       
   687             TDes8* aInfo );
       
   688 
       
   689         /**
       
   690          * Get sms message store info cancel
       
   691          *          
       
   692          * @since S60 v2.6 
       
   693          * @param aTsyReqHandle Request handle
       
   694          * @return KErrNone
       
   695          */
       
   696         TInt GetMessageStoreInfoCancel( const TTsyReqHandle aTsyReqHandle );
       
   697 
       
   698         /**
       
   699          * Read SMSP list phase 1
       
   700          *          
       
   701          * @since S60 v2.6 
       
   702          * @param aTsyReqHandle Request handle
       
   703          * @param aId Pointer to client id
       
   704          * @param aBufSize Pointer to buffer size
       
   705          * @return Error value
       
   706          */
       
   707         TInt ReadSmspListPhase1L( const TTsyReqHandle aTsyReqHandle, 
       
   708             RMobilePhone::TClientId const* aId, 
       
   709             TInt* aBufSize );
       
   710 
       
   711         /**
       
   712          * Read SMSP list phase 2
       
   713          *          
       
   714          * @since S60 v2.6 
       
   715          * @param aTsyReqHandle Request handle
       
   716          * @param aId Pointer to client id
       
   717          * @param aBuffer Pointer to buffer
       
   718          * @return KErrNone
       
   719          */
       
   720         TInt ReadSmspListPhase2( TTsyReqHandle aTsyReqHandle, 
       
   721             RMobilePhone::TClientId const* aId, 
       
   722             TDes8* aBuffer );
       
   723 
       
   724         /**
       
   725          * Cancel read SMSP list
       
   726          *          
       
   727          * @since S60 v2.6 
       
   728          * @param aTsyReqHandle Request handle
       
   729          * @return KErrNone
       
   730          */
       
   731         TInt ReadAllSmspCancel( const TTsyReqHandle aTsyReqHandle );
       
   732 
       
   733         /**
       
   734          * Create SMSP list from read entries
       
   735          *          
       
   736          * @since S60 v2.6 
       
   737          * @param aSmspList List of SMSP entries
       
   738          */
       
   739         void CreateSmspListL( CArrayPtrFlat<TSmsParameters>& aSmspList );
       
   740 
       
   741         /**
       
   742          * Store SMSP list
       
   743          *          
       
   744          * @since S60 v2.6 
       
   745          * @param aTsyReqHandle Request handle
       
   746          * @param aBuffer Pointer to buffer
       
   747          * @return KErrNone
       
   748          */
       
   749         TInt StoreSmspList( const TTsyReqHandle aTsyReqHandle, 
       
   750             TDes8* aBuffer );
       
   751 
       
   752         /**
       
   753          * This method trap and calls ProcessStoreSmspListL-method
       
   754          *          
       
   755          * @since S60 v2.6 
       
   756          */
       
   757         void CallProcessStoreSmspList();
       
   758 
       
   759         /**
       
   760          * Call CompleteStoreSmspList-method or make new SMS parameter update
       
   761          * request to DOS
       
   762          *          
       
   763          * @since S60 v2.6 
       
   764          */
       
   765         void ProcessStoreSmspListL();
       
   766 
       
   767         /**
       
   768          * Complete StoreAllSmsp request to the client
       
   769          *          
       
   770          * @since S60 v2.6 
       
   771          * @param aError Cause value that is used while completing request
       
   772          */
       
   773         void CompleteStoreSmspList( TInt aError );
       
   774 
       
   775         /**
       
   776          * Notify SMSP list change
       
   777          *          
       
   778          * @since S60 v2.6 
       
   779          * @return KErrNone
       
   780          */
       
   781         TInt NotifySmspListChange();
       
   782 
       
   783         /**
       
   784          * Notify SMSP list change cancel
       
   785          *          
       
   786          * @since S60 v2.6 
       
   787          * @param aTsyReqHandle Request handle
       
   788          * @return KErrNone
       
   789          */
       
   790         TInt NotifySmspListChangeCancel( const TTsyReqHandle aTsyReqHandle );
       
   791 
       
   792         /**
       
   793          * Complete notify SMSP list
       
   794          *          
       
   795          * @since S60 v2.6 
       
   796          */
       
   797         void CompleteNotifySmspListChange();
       
   798     
       
   799         /** 
       
   800          * Reset all class attributes
       
   801          *          
       
   802          * @since S60 v2.6 
       
   803          */
       
   804         void ResetVariables();
       
   805 
       
   806         /**
       
   807          * Checks wether or not a ETel request can be performed while 
       
   808          * offline mode is enabled
       
   809          *          
       
   810          * @since S60 v2.6 
       
   811          * @param aIpc Ipc number of the request
       
   812          * @return TBool 
       
   813          */
       
   814         TBool IsRequestPossibleInOffline( TInt aIpc ) const;
       
   815 
       
   816     private:
       
   817 
       
   818         /**
       
   819          * A pointer to the Phone TSY
       
   820          * Not own.         
       
   821          */
       
   822         CMmPhoneTsy* iMmPhone;
       
   823 
       
   824         /**
       
   825          * A pointer to the SMS extension
       
   826          * Own.         
       
   827          */
       
   828         CMmSmsExtInterface* iMmSmsExtInterface;
       
   829 
       
   830         /**
       
   831          * A pointer to the SMS storage sub-session
       
   832          * Not own.         
       
   833          */
       
   834         CMmSmsStorageTsy* iMmSmsStorageTsy;
       
   835 
       
   836         /**
       
   837          * A pointer to the SAT messaging
       
   838          * Not own.         
       
   839          */
       
   840         CTsySatMessagingBase* iTsySatMessaging;
       
   841 
       
   842         /**
       
   843          * Routing activity
       
   844          */
       
   845         TSmsRoutingActivity iServerRoutingActivity;
       
   846 
       
   847         /**
       
   848          * Receive mode
       
   849          */
       
   850         RMobileSmsMessaging::TMobileSmsReceiveMode iMobileSmsReceiveMode;
       
   851 
       
   852         /**
       
   853          * Notify receive mode pointer
       
   854          * Not own.         
       
   855          */
       
   856         RMobileSmsMessaging::TMobileSmsReceiveMode* iNotifyReceiveModeChangePtr;
       
   857 
       
   858         /**
       
   859          * Wait for unstored message pointer
       
   860          * Not own.         
       
   861          */
       
   862         TAny* iReceiveMessageParamsPtr;
       
   863 
       
   864         /**
       
   865          * Wait for unstored message pointer
       
   866          * Not own.         
       
   867          */
       
   868         TDes8* iReceiveMessagePduPtr;
       
   869 
       
   870         /**
       
   871          * Notify SMS bearer pointer
       
   872          * Not own.         
       
   873          */
       
   874         RMobileSmsMessaging::TMobileSmsBearer* iNotifySmsBearerPtr;
       
   875 
       
   876         /**
       
   877          * A pointer to send message attributes
       
   878          * Not own.         
       
   879          */
       
   880         TDes8* iSendMessageMsgAttrPckgPtr;
       
   881 
       
   882         /**
       
   883          * A pointer to get message store info
       
   884          * Not own.         
       
   885          */
       
   886         TDes8* iGetMessageStoreInfoPtr;
       
   887 
       
   888         /**
       
   889          * Store all parameter sets buffer
       
   890          * Not own.         
       
   891          */
       
   892         TDes8* iStoreSmspBufferPtr;
       
   893 
       
   894         /**
       
   895          * Store all parameter sets index         
       
   896          */
       
   897         TInt iStoreSmspIndex;
       
   898          
       
   899         /**
       
   900          * Request handle type         
       
   901          */
       
   902         TSmsRequestTypes iReqHandleType;
       
   903 
       
   904         /**
       
   905          * Pointer to TSY request handle store
       
   906          * Own.                  
       
   907          */
       
   908         CMmTsyReqHandleStore* iTsyReqHandleStore;
       
   909 
       
   910         /**
       
   911          * A table for Sms request handles                  
       
   912          */
       
   913         TTsyReqHandle iSmsReqHandles[EMultimodeSmsMaxNumOfRequests];
       
   914 
       
   915         /**
       
   916          * SMSP list, in streamed format, for two phased list retrieval
       
   917          * Not own.                  
       
   918          */
       
   919         CBufBase* iSMSPList;
       
   920 
       
   921         /**
       
   922          * SMSP size buffer, for two phased list retrieval                
       
   923          */        
       
   924         TInt* iRetSMSPSize;
       
   925         
       
   926         /**
       
   927          * SMSP client id for two phased list retrieval                
       
   928          */             
       
   929         RMobilePhone::TClientId* iSMSPClientId;
       
   930 
       
   931         /**
       
   932          * SMS message array for incoming messages that are waiting
       
   933          * acknowledging from SMS stack     
       
   934          * Own.                               
       
   935          */
       
   936         CArrayPtrFlat<TSmsMsg>* iSmsMsgArray;
       
   937 
       
   938         /**
       
   939          * Flag that indicates if client storage is full                  
       
   940          */        
       
   941         TBool iClientStorageFull;
       
   942 
       
   943         /**
       
   944          * Number of SMS Locations on Sim Card                  
       
   945          */
       
   946         TUint8 iSmsNumOfLoc;
       
   947 
       
   948         /**
       
   949          * SMS send request
       
   950          * stores the last sent message for possible re-send attempts
       
   951          * Own.                                    
       
   952          */
       
   953         CSmsSendRequest* iSmsSendReq;
       
   954 
       
   955         /**
       
   956          * On-line/off-line status of CS hardware.
       
   957          * At this moment, only needed for method ResumeSmsReception                           
       
   958          */
       
   959         TBool iIsOffline;
       
   960 
       
   961         /**
       
   962          * true if a ResumeSmsReception request has come during off-line
       
   963          * mode. See method ResumeSmsReception                           
       
   964          */
       
   965         TBool iResumeSmsReceptionPending;
       
   966 
       
   967 };
       
   968 #endif // CMMSMSTSY_H
       
   969 
       
   970 //  End of File