adaptationlayer/tsy/nokiatsy_dll/internal/test/nokiatsy_test_tool/sms/inc/cmmsmstsy_export_to_roots.h
changeset 4 510c70acdbf6
parent 3 1972d8c2e329
child 5 8ccc39f9d787
equal deleted inserted replaced
3:1972d8c2e329 4:510c70acdbf6
     1 /*
       
     2 * Copyright (c) 2007 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 "ctsy/serviceapi/mctsysatservice.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 CMmTsyReqHandleStore;
       
    38 struct TSmsMsg;
       
    39 struct TSmsParameters;
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 /**
       
    44 *  CMmSmsTsy contains extended sms functionality that is mode-independent
       
    45 *  Extension request handles and parameters are stored as attributes
       
    46 *
       
    47 *  @lib CommonTSY.lib
       
    48 *  @since S60 v2.6
       
    49 */
       
    50 NONSHARABLE_CLASS( CMmSmsTsy ) : public CSubSessionExtBase,
       
    51     public MCtsySatService
       
    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          * From MCtsySatService
       
   264          * Send SAT SMS message to the network
       
   265          *
       
   266          * @since S60 v2.6
       
   267          * @param aStkTsySatService Pointer to SAT service interface
       
   268          * @param aSmsTpdu Pointer to Sms TPDU
       
   269          * @param aScAddress Pointer to service address
       
   270          * @param aMobileTON Pointer to type of number
       
   271          * @param aMobileNPI Pointer to number plan
       
   272          * @param aMoreToSend True if there is more to send
       
   273          * @param aTsyReqHandle Request handle
       
   274          * @return KErrNone
       
   275          */
       
   276         virtual TInt SendSatMessage(
       
   277             MStkTsySatService& aStkTsySatService,
       
   278             TDes8* aSmsTpdu,
       
   279             TDes16* aScAddress,
       
   280             RMobilePhone::TMobileTON* aMobileTON,
       
   281             RMobilePhone::TMobileNPI* aMobileNPI,
       
   282             TBool aMoreToSend,
       
   283             TTsyReqHandle aTsyReqHandle );
       
   284 
       
   285         /**
       
   286          * Complete SendSatMessage request
       
   287          *
       
   288          * @since S60 v2.6
       
   289          * @param aError Error code
       
   290          */
       
   291         virtual void CompleteSendSatMessage( TInt aError );
       
   292 
       
   293         /**
       
   294          * Complete ResumeSmsReception request
       
   295          *
       
   296          * @since S60 v2.6
       
   297          * @param aError Error code
       
   298          */
       
   299         virtual void CompleteResumeSmsReception( TInt aError );
       
   300 
       
   301         /**
       
   302          * Complete get sms message store info
       
   303          *
       
   304          * @since S60 v2.6
       
   305          * @param aError Error code
       
   306          * @param aDataPackage
       
   307          */
       
   308         virtual void CompleteGetMessageStoreInfo( TInt aError,
       
   309             CMmDataPackage* aDataPackage );
       
   310 
       
   311         /**
       
   312          * Complete first phase of read all SMSP sets
       
   313          *
       
   314          * @since S60 v2.6
       
   315          * @param aError Error code
       
   316          * @param aDataPackage
       
   317          */
       
   318         virtual void CompleteReadAllSmspPhase1( TInt aError,
       
   319             CMmDataPackage* aDataPackage );
       
   320 
       
   321         /**
       
   322          * Handle internally SMS servers response to SMS Parameter update
       
   323          * request (Store SMSP list)
       
   324          *
       
   325          * @since S60 v2.6
       
   326          * @param aError Error code
       
   327          */
       
   328         virtual void InternalStoreSmspList( TInt aError );
       
   329 
       
   330         /**
       
   331          * Set SMS Storage TSY
       
   332          *
       
   333          * @since S60 v2.6
       
   334          * @param aNewPointer Pointer to Storage Tsy
       
   335          */
       
   336         virtual void SetSmsStorageTsy( CMmSmsStorageTsy* aNewPointer );
       
   337 
       
   338         /**
       
   339          * Return number of SMS location on SIM card
       
   340          *
       
   341          * @since S60 v2.6
       
   342          * @return Number of SMS location on SIM card
       
   343          */
       
   344         virtual TInt16 GetSmsNumOfLoc();
       
   345 
       
   346         /**
       
   347          * Set Sms Number of Location on SIM Card
       
   348          *
       
   349          * @since S60 v2.6
       
   350          * @param aSmsNumOfUsedEntries Number of SMS location
       
   351          */
       
   352         virtual void SetSmsNumOfLoc( TInt aSmsNumOfUsedEntries );
       
   353 
       
   354         /**
       
   355          * This method set Sms Send Attributes values for sending MMSAT
       
   356          * message
       
   357          *
       
   358          * @since S60 v2.6
       
   359          * @param aMmPhone
       
   360          * @param aSmsTpdu Pointer to Sms TPDU
       
   361          * @param aScAddress Pointer to service address
       
   362          * @param aMobileTON Pointer to type of number
       
   363          * @param aMobileNPI Pointer to number plan
       
   364          * @param aMoreToSend True if there is more to send
       
   365          * @return Error code
       
   366          */
       
   367         virtual TInt SendSatMessageL(
       
   368             CMmPhoneTsy* aMmPhone,
       
   369             TDes8* aSmsTpdu,
       
   370             TDes16* aScAddress,
       
   371             RMobilePhone::TMobileTON* aMobileTON,
       
   372             RMobilePhone::TMobileNPI* aMobileNPI,
       
   373             TBool aMoreToSend );
       
   374 
       
   375         /**
       
   376          * Set the information about the CS hardware status: True if off-line,
       
   377          * false if on-line
       
   378          *
       
   379          * @since S60 v2.6
       
   380          * @param aIsOffline
       
   381          */
       
   382         void SetOffline( TBool aIsOffline );
       
   383 
       
   384         /**
       
   385          * Complete set bearer type for sending SMS messages
       
   386          *
       
   387          * @since S60 v3.0
       
   388          * @param aResult Error value
       
   389          */
       
   390         void CMmSmsTsy::CompleteSetMoSmsBearer( TInt aResult );
       
   391 
       
   392 #ifdef REQHANDLE_TIMER
       
   393         /**
       
   394          * Chooses the type of response, automatic or common
       
   395          *
       
   396          * @since S60 v2.6
       
   397          * @param aReqHandleType Req handle type
       
   398          * @param aTsyReqHandle Req handle to be stored
       
   399          */
       
   400         void SetTypeOfResponse( const TInt aReqHandleType,
       
   401             const TTsyReqHandle aTsyReqHandle );
       
   402 
       
   403         /**
       
   404          * Complete request because of timer expiration
       
   405          *
       
   406          * @since S60 v2.6
       
   407          * @param aReqHandleType Request handle type
       
   408          * @param aError Error value
       
   409          */
       
   410         virtual void Complete( TInt aReqHandleType,
       
   411             TInt aError );
       
   412 #endif // REQHANDLE_TIMER
       
   413 
       
   414     private:
       
   415 
       
   416         /**
       
   417          * C++ default constructor.
       
   418          */
       
   419         CMmSmsTsy();
       
   420 
       
   421         /**
       
   422          * By default Symbian 2nd phase constructor is private.
       
   423          */
       
   424         void ConstructL();
       
   425 
       
   426         /**
       
   427          * Resend an unsent message
       
   428          *
       
   429          * @since S60 v2.6
       
   430          */
       
   431         void ResendSms();
       
   432 
       
   433         /**
       
   434          * Handles extended client requests
       
   435          *
       
   436          * @since S60 v2.6
       
   437          * @param aTsyReqHandle Request handle
       
   438          * @param aIpc IPC number of request
       
   439          * @param aPackage Data Package
       
   440          * @return Error value
       
   441          */
       
   442         TInt DoExtFuncL( const TTsyReqHandle aTsyReqHandle,
       
   443             const TInt aIpc,
       
   444             const TDataPackage& aPackage );
       
   445 
       
   446         /**
       
   447          * Get SMS messaging capabilities
       
   448          *
       
   449          * @since S60 v2.6
       
   450          * @param aTsyReqHandle Request handle
       
   451          * @param aCaps Pointer to the messaging capabilities
       
   452          * @return KErrNone
       
   453          */
       
   454         TInt GetCaps( const TTsyReqHandle aTsyReqHandle,
       
   455             TDes8* aCaps );
       
   456 
       
   457         /**
       
   458          * Get receive mode
       
   459          *
       
   460          * @since S60 v2.6
       
   461          * @param aTsyReqHandle Request handle
       
   462          * @param aReceiveMode Pointer to receive mode
       
   463          * @return KErrNone
       
   464          */
       
   465         TInt GetReceiveMode( const TTsyReqHandle aTsyReqHandle,
       
   466             RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
       
   467 
       
   468         /**
       
   469          * Set receive mode
       
   470          *
       
   471          * @since S60 v2.6
       
   472          * @param aTsyReqHandle Request handle
       
   473          * @param aReceiveMode Pointer to receive mode
       
   474          * @return KErrNone
       
   475          */
       
   476         TInt SetReceiveMode( const TTsyReqHandle aTsyReqHandle,
       
   477             RMobileSmsMessaging::TMobileSmsReceiveMode const* aReceiveMode );
       
   478 
       
   479         /**
       
   480          * Set receive mode cancel
       
   481          *
       
   482          * @since S60 v2.6
       
   483          * @param aTsyReqHandle Request handle
       
   484          * @return KErrNone
       
   485          */
       
   486         TInt SetReceiveModeCancel( const TTsyReqHandle aTsyReqHandle );
       
   487 
       
   488         /**
       
   489          * Notify from receive mode changes
       
   490          *
       
   491          * @since S60 v2.6
       
   492          * @param aReceiveMode Pointer to receive mode
       
   493          * @return KErrNone
       
   494          */
       
   495         TInt NotifyReceiveModeChange(
       
   496             RMobileSmsMessaging::TMobileSmsReceiveMode* aReceiveMode );
       
   497 
       
   498         /**
       
   499          * Cancel notify reveice mode change request
       
   500          *
       
   501          * @since S60 v2.6
       
   502          * @param aTsyReqHandle Request handle
       
   503          * @return KErrNone
       
   504          */
       
   505         TInt NotifyReceiveModeChangeCancel(
       
   506             const TTsyReqHandle aTsyReqHandle );
       
   507 
       
   508         /**
       
   509          * Complete notify reveice mode change request
       
   510          *
       
   511          * @since S60 v2.6
       
   512          */
       
   513         void CompleteNotifyReceiveModeChange();
       
   514 
       
   515         /**
       
   516          * This method starts the reception of incoming unstored SMS
       
   517          *
       
   518          * @since S60 v2.6
       
   519          * @param aTsyReqHandle Request handle
       
   520          * @param aMsgData Message data
       
   521          * @param aMsgAttributes Message attributes
       
   522          * @return Error value
       
   523          */
       
   524         TInt ReceiveMessageL( const TTsyReqHandle aTsyReqHandle,
       
   525             TDes8* aMsgData,
       
   526             TDes8* aMsgAttributes );
       
   527 
       
   528         /**
       
   529          * Wait for next incoming unstored message cancel
       
   530          *
       
   531          * @since S60 v2.6
       
   532          * @param aTsyReqHandle Request handle
       
   533          * @return Error value
       
   534          */
       
   535         TInt ReceiveMessageCancel( const TTsyReqHandle aTsyReqHandle );
       
   536 
       
   537         /**
       
   538          * Store Class 2 message in TSY's internal memory
       
   539          *
       
   540          * @since S60 v2.6
       
   541          * @param aSmsMsg Pointer to TSmsMsg struct
       
   542          */
       
   543         void StoreClass2MessageL( TSmsMsg const* aSmsMsg );
       
   544 
       
   545         /**
       
   546          * Deliver Stored Class 2 message to the SMS stack
       
   547          * @since S60 v2.6
       
   548          */
       
   549         void DeliverClass2ToSmsStack();
       
   550 
       
   551         /**
       
   552          * Ack message
       
   553          *
       
   554          * @since S60 v2.6
       
   555          * @param aTsyReqHandle Request handle
       
   556          * @param aMsgData SMS PDU
       
   557          * @param aMemoryFull Is SMS stack's memory now full
       
   558          * @return Error value
       
   559          */
       
   560         TInt AckSmsStoredL( const TTsyReqHandle aTsyReqHandle,
       
   561             const TDesC8* aMsgData,
       
   562             TBool const* aMemoryFull );
       
   563 
       
   564         /**
       
   565          * Route RP-Error request to messagehandler
       
   566          *
       
   567          * @since S60 v2.6
       
   568          * @param aTsyReqHandle Request handle
       
   569          * @param aMsgData Pointer to message data
       
   570          * @param aRpCause Pointer to RP cause value
       
   571          * @return Error value
       
   572          */
       
   573         TInt NackSmsStoredL( const TTsyReqHandle aTsyReqHandle,
       
   574             const TDesC8* aMsgData,
       
   575             TInt* aRpCause );
       
   576 
       
   577         /**
       
   578          * Resume sms message reception
       
   579          *
       
   580          * @since S60 v2.6
       
   581          * @param aTsyReqHandle Request handle
       
   582          * @return Error value
       
   583          */
       
   584         TInt ResumeSmsReceptionL( const TTsyReqHandle aTsyReqHandle );
       
   585 
       
   586         /**
       
   587          * Retrieve the current setting for the bearer type used
       
   588          * for sending SMS messages
       
   589          *
       
   590          * @since S60 v2.6
       
   591          * @param aTsyReqHandle Request handle
       
   592          * @param aBearer Pointer to bearer
       
   593          * @return KErrNone
       
   594          */
       
   595         TInt GetMoSmsBearer( const TTsyReqHandle aTsyReqHandle,
       
   596             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   597 
       
   598         /**
       
   599          * Set the bearer type for sending SMS messages
       
   600          *
       
   601          * @since S60 v2.6
       
   602          * @param aTsyReqHandle Request handle
       
   603          * @param aBearer Pointer to bearer
       
   604          * @return KErrNone
       
   605          */
       
   606         TInt SetMoSmsBearer( const TTsyReqHandle aTsyReqHandle,
       
   607             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   608 
       
   609         /**
       
   610          * Set the bearer type cancel
       
   611          *
       
   612          * @since S60 v2.6
       
   613          * @param aTsyReqHandle Request handle
       
   614          * @return KErrNone
       
   615          */
       
   616         TInt SetMoSmsBearerCancel( const TTsyReqHandle aTsyReqHandle );
       
   617 
       
   618         /**
       
   619          * Notify from SMS bearer change
       
   620          *
       
   621          * @since S60 v2.6
       
   622          * @param aBearer Pointer to bearer
       
   623          * @return KErrNone
       
   624          */
       
   625         TInt NotifyMoSmsBearerChange(
       
   626             RMobileSmsMessaging::TMobileSmsBearer* aBearer );
       
   627 
       
   628         /**
       
   629          * Notify from SMS bearer change cancel
       
   630          *
       
   631          * @since S60 v2.6
       
   632          * @param aTsyReqHandle Request handle
       
   633          * @return KErrNone
       
   634          */
       
   635         TInt NotifyMoSmsBearerChangeCancel(
       
   636             const TTsyReqHandle aTsyReqHandle );
       
   637 
       
   638         /**
       
   639          * Send message
       
   640          *
       
   641          * @since S60 v2.6
       
   642          * @param aTsyReqHandle Request handle
       
   643          * @param aMsgData Pointer to Message Data
       
   644          * @param aMsgAttributes Pointer to Message Attributes
       
   645          * @return Error value
       
   646          */
       
   647         TInt SendMessageL( const TTsyReqHandle aTsyReqHandle,
       
   648             TDes8* aMsgData,
       
   649             TDes8* aMsgAttributes );
       
   650 
       
   651         /**
       
   652          * Send sat message
       
   653          *
       
   654          * @since S60 v2.6
       
   655          * @param aSmsTpdu Pointer to SMS PDU
       
   656          * @param aScAddress Pointer to SC address
       
   657          * @param aMobileTON Type of number
       
   658          * @param aMobileNPI Numberin plan identific
       
   659          * @param aTsyReqHandle Request handle
       
   660          */
       
   661         void DoSendSatMessageL( TDes8* aSmsTpdu,
       
   662             TDes16* aScAddress,
       
   663             RMobilePhone::TMobileTON* aMobileTON,
       
   664             RMobilePhone::TMobileNPI* aMobileNPI,
       
   665             TBool aMoreToSend,
       
   666             TTsyReqHandle aTsyReqHandle );
       
   667 
       
   668         /**
       
   669          * Enumerate sms message stores
       
   670          *
       
   671          * @since S60 v2.6
       
   672          * @param aTsyReqHandle Request handle
       
   673          * @param aCount Pointer to message count
       
   674          * @return KErrNone
       
   675          */
       
   676         TInt EnumerateMessageStores( const TTsyReqHandle aTsyReqHandle,
       
   677             TInt* aCount );
       
   678 
       
   679         /**
       
   680          * Get sms message store info
       
   681          *
       
   682          * @since S60 v2.6
       
   683          * @param aTsyReqHandle Request handle
       
   684          * @param aIndex Index
       
   685          * @param aInfo Information
       
   686          * @return Error value
       
   687          */
       
   688         TInt GetMessageStoreInfoL( const TTsyReqHandle aTsyReqHandle,
       
   689             TInt const* aIndex,
       
   690             TDes8* aInfo );
       
   691 
       
   692         /**
       
   693          * Get sms message store info cancel
       
   694          *
       
   695          * @since S60 v2.6
       
   696          * @param aTsyReqHandle Request handle
       
   697          * @return KErrNone
       
   698          */
       
   699         TInt GetMessageStoreInfoCancel( const TTsyReqHandle aTsyReqHandle );
       
   700 
       
   701         /**
       
   702          * Read SMSP list phase 1
       
   703          *
       
   704          * @since S60 v2.6
       
   705          * @param aTsyReqHandle Request handle
       
   706          * @param aId Pointer to client id
       
   707          * @param aBufSize Pointer to buffer size
       
   708          * @return Error value
       
   709          */
       
   710         TInt ReadSmspListPhase1L( const TTsyReqHandle aTsyReqHandle,
       
   711             RMobilePhone::TClientId const* aId,
       
   712             TInt* aBufSize );
       
   713 
       
   714         /**
       
   715          * Read SMSP list phase 2
       
   716          *
       
   717          * @since S60 v2.6
       
   718          * @param aTsyReqHandle Request handle
       
   719          * @param aId Pointer to client id
       
   720          * @param aBuffer Pointer to buffer
       
   721          * @return KErrNone
       
   722          */
       
   723         TInt ReadSmspListPhase2( TTsyReqHandle aTsyReqHandle,
       
   724             RMobilePhone::TClientId const* aId,
       
   725             TDes8* aBuffer );
       
   726 
       
   727         /**
       
   728          * Cancel read SMSP list
       
   729          *
       
   730          * @since S60 v2.6
       
   731          * @param aTsyReqHandle Request handle
       
   732          * @return KErrNone
       
   733          */
       
   734         TInt ReadAllSmspCancel( const TTsyReqHandle aTsyReqHandle );
       
   735 
       
   736         /**
       
   737          * Create SMSP list from read entries
       
   738          *
       
   739          * @since S60 v2.6
       
   740          * @param aSmspList List of SMSP entries
       
   741          */
       
   742         void CreateSmspListL( CArrayPtrFlat<TSmsParameters>& aSmspList );
       
   743 
       
   744         /**
       
   745          * Store SMSP list
       
   746          *
       
   747          * @since S60 v2.6
       
   748          * @param aTsyReqHandle Request handle
       
   749          * @param aBuffer Pointer to buffer
       
   750          * @return KErrNone
       
   751          */
       
   752         TInt StoreSmspList( const TTsyReqHandle aTsyReqHandle,
       
   753             TDes8* aBuffer );
       
   754 
       
   755         /**
       
   756          * This method trap and calls ProcessStoreSmspListL-method
       
   757          *
       
   758          * @since S60 v2.6
       
   759          */
       
   760         void CallProcessStoreSmspList();
       
   761 
       
   762         /**
       
   763          * Call CompleteStoreSmspList-method or make new SMS parameter update
       
   764          * request to DOS
       
   765          *
       
   766          * @since S60 v2.6
       
   767          */
       
   768         void ProcessStoreSmspListL();
       
   769 
       
   770         /**
       
   771          * Complete StoreAllSmsp request to the client
       
   772          *
       
   773          * @since S60 v2.6
       
   774          * @param aError Cause value that is used while completing request
       
   775          */
       
   776         void CompleteStoreSmspList( TInt aError );
       
   777 
       
   778         /**
       
   779          * Notify SMSP list change
       
   780          *
       
   781          * @since S60 v2.6
       
   782          * @return KErrNone
       
   783          */
       
   784         TInt NotifySmspListChange();
       
   785 
       
   786         /**
       
   787          * Notify SMSP list change cancel
       
   788          *
       
   789          * @since S60 v2.6
       
   790          * @param aTsyReqHandle Request handle
       
   791          * @return KErrNone
       
   792          */
       
   793         TInt NotifySmspListChangeCancel( const TTsyReqHandle aTsyReqHandle );
       
   794 
       
   795         /**
       
   796          * Complete notify SMSP list
       
   797          *
       
   798          * @since S60 v2.6
       
   799          */
       
   800         void CompleteNotifySmspListChange();
       
   801 
       
   802         /**
       
   803          * Reset all class attributes
       
   804          *
       
   805          * @since S60 v2.6
       
   806          */
       
   807         void ResetVariables();
       
   808 
       
   809         /**
       
   810          * Checks wether or not a ETel request can be performed while
       
   811          * offline mode is enabled
       
   812          *
       
   813          * @since S60 v2.6
       
   814          * @param aIpc Ipc number of the request
       
   815          * @return TBool
       
   816          */
       
   817         TBool IsRequestPossibleInOffline( TInt aIpc ) const;
       
   818 
       
   819     private:
       
   820 
       
   821         /**
       
   822          * A pointer to the Phone TSY
       
   823          * Not own.
       
   824          */
       
   825         CMmPhoneTsy* iMmPhone;
       
   826 
       
   827         /**
       
   828          * A pointer to the SMS extension
       
   829          * Own.
       
   830          */
       
   831         CMmSmsExtInterface* iMmSmsExtInterface;
       
   832 
       
   833         /**
       
   834          * A pointer to the SMS storage sub-session
       
   835          * Not own.
       
   836          */
       
   837         CMmSmsStorageTsy* iMmSmsStorageTsy;
       
   838 
       
   839         /**
       
   840          * A pointer to the SAT service interface provided by the SAT
       
   841          * TSY.
       
   842          * Not own.
       
   843          */
       
   844         MStkTsySatService* iTsySatMessaging;
       
   845 
       
   846         /**
       
   847          * Routing activity
       
   848          */
       
   849         TSmsRoutingActivity iServerRoutingActivity;
       
   850 
       
   851         /**
       
   852          * Receive mode
       
   853          */
       
   854         RMobileSmsMessaging::TMobileSmsReceiveMode iMobileSmsReceiveMode;
       
   855 
       
   856         /**
       
   857          * Notify receive mode pointer
       
   858          * Not own.
       
   859          */
       
   860         RMobileSmsMessaging::TMobileSmsReceiveMode* iNotifyReceiveModeChangePtr;
       
   861 
       
   862         /**
       
   863          * Wait for unstored message pointer
       
   864          * Not own.
       
   865          */
       
   866         TAny* iReceiveMessageParamsPtr;
       
   867 
       
   868         /**
       
   869          * Wait for unstored message pointer
       
   870          * Not own.
       
   871          */
       
   872         TDes8* iReceiveMessagePduPtr;
       
   873 
       
   874         /**
       
   875          * Notify SMS bearer pointer
       
   876          * Not own.
       
   877          */
       
   878         RMobileSmsMessaging::TMobileSmsBearer* iNotifySmsBearerPtr;
       
   879 
       
   880         /**
       
   881          * A pointer to send message attributes
       
   882          * Not own.
       
   883          */
       
   884         TDes8* iSendMessageMsgAttrPckgPtr;
       
   885 
       
   886         /**
       
   887          * A pointer to get message store info
       
   888          * Not own.
       
   889          */
       
   890         TDes8* iGetMessageStoreInfoPtr;
       
   891 
       
   892         /**
       
   893          * Store all parameter sets buffer
       
   894          * Not own.
       
   895          */
       
   896         TDes8* iStoreSmspBufferPtr;
       
   897 
       
   898         /**
       
   899          * Store all parameter sets index
       
   900          */
       
   901         TInt iStoreSmspIndex;
       
   902 
       
   903         /**
       
   904          * Request handle type
       
   905          */
       
   906         TSmsRequestTypes iReqHandleType;
       
   907 
       
   908         /**
       
   909          * Pointer to TSY request handle store
       
   910          * Own.
       
   911          */
       
   912         CMmTsyReqHandleStore* iTsyReqHandleStore;
       
   913 
       
   914         /**
       
   915          * A table for Sms request handles
       
   916          */
       
   917         TTsyReqHandle iSmsReqHandles[EMultimodeSmsMaxNumOfRequests];
       
   918 
       
   919         /**
       
   920          * SMSP list, in streamed format, for two phased list retrieval
       
   921          * Not own.
       
   922          */
       
   923         CBufBase* iSMSPList;
       
   924 
       
   925         /**
       
   926          * SMSP size buffer, for two phased list retrieval
       
   927          */
       
   928         TInt* iRetSMSPSize;
       
   929 
       
   930         /**
       
   931          * SMSP client id for two phased list retrieval
       
   932          */
       
   933         RMobilePhone::TClientId* iSMSPClientId;
       
   934 
       
   935         /**
       
   936          * SMS message array for incoming messages that are waiting
       
   937          * acknowledging from SMS stack
       
   938          * Own.
       
   939          */
       
   940         CArrayPtrFlat<TSmsMsg>* iSmsMsgArray;
       
   941 
       
   942         /**
       
   943          * Flag that indicates if client storage is full
       
   944          */
       
   945         TBool iClientStorageFull;
       
   946 
       
   947         /**
       
   948          * Number of SMS Locations on Sim Card
       
   949          */
       
   950         TUint8 iSmsNumOfLoc;
       
   951 
       
   952         /**
       
   953          * SMS send request
       
   954          * stores the last sent message for possible re-send attempts
       
   955          * Own.
       
   956          */
       
   957         CSmsSendRequest* iSmsSendReq;
       
   958 
       
   959         /**
       
   960          * On-line/off-line status of CS hardware.
       
   961          * At this moment, only needed for method ResumeSmsReception
       
   962          */
       
   963         TBool iIsOffline;
       
   964 
       
   965         /**
       
   966          * true if a ResumeSmsReception request has come during off-line
       
   967          * mode. See method ResumeSmsReception
       
   968          */
       
   969         TBool iResumeSmsReceptionPending;
       
   970 
       
   971 };
       
   972 #endif // CMMSMSTSY_H
       
   973 
       
   974 //  End of File