adaptationlayer/tsy/nokiatsy_dll/inc/cmmsupplservmesshandler.h
changeset 0 63b37f68c1ce
child 5 8ccc39f9d787
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 //  INCLUDES
       
    22 #ifndef CMMSUPPLSERVMESSHANDLER_H
       
    23 #define CMMSUPPLSERVMESSHANDLER_H
       
    24 
       
    25 #include <e32base.h> // Symbian base types
       
    26 #include <etelmm.h>  // ETel base types
       
    27 #include <ctsy/rmmcustomapi.h>
       
    28 
       
    29 #include "cmmphonetreceiver.h"
       
    30 #include "mmmmesshandlerbase.h"
       
    31 #include "muiccoperationbase.h"
       
    32 
       
    33 // CONSTANTS
       
    34     //none
       
    35 
       
    36 // MACROS
       
    37     //none
       
    38 
       
    39 // DATA TYPES
       
    40     //none
       
    41 
       
    42 // FUNCTION PROTOTYPES
       
    43     //none
       
    44 
       
    45 // FORWARD DECLARATIONS
       
    46 class CMmDataPackage;
       
    47 class CMmMessageRouter;
       
    48 class CMobilePhoneCFList;
       
    49 class CMobilePhoneCBList;
       
    50 class CMobilePhoneCWList;
       
    51 class CMmPhoNetSender;
       
    52 class TIsiReceiveC;
       
    53 class CMmUiccMessHandler;
       
    54 
       
    55 // CLASS DECLARATION
       
    56 
       
    57 // DESCRIPTION
       
    58 
       
    59 /**
       
    60 * Simple data container to be passed via function parameters
       
    61 */
       
    62 class TPreprocessedSsServiceCompleteResponse
       
    63     {
       
    64     public:
       
    65         TPreprocessedSsServiceCompleteResponse(
       
    66             const TIsiReceiveC& aIsiMessage ) :
       
    67             iIsiMessage( aIsiMessage )
       
    68             {}
       
    69     public:
       
    70         const TIsiReceiveC& iIsiMessage;
       
    71         TUint8 iTraId;
       
    72         TUint8 iNumSubBlocks;
       
    73         TUint8 iOperation;
       
    74         TUint8 iBasicService;
       
    75         TUint16 iSsCode;
       
    76     };
       
    77 
       
    78 // DESCRIPTION
       
    79 
       
    80 /**
       
    81 * Used for creating and sending SS ISI messages to
       
    82 * PhoNet via PhoNetSender. It also receives SS
       
    83 * ISI messages from PhoNetReceiver.
       
    84 *
       
    85 *  @lib (unknown)
       
    86 *  @since 2.6
       
    87 */
       
    88 class CMmSupplServMessHandler
       
    89     : public CBase, public MMmMessHandlerBase, public MMmMessageReceiver,
       
    90     public MUiccOperationBase
       
    91     {
       
    92     public: // types
       
    93         // none
       
    94 
       
    95     public:  // Constructors and destructor
       
    96 
       
    97         /**
       
    98         * Two-phased constructor.
       
    99         * @param aPhoNetSender Pointer to the Phonet sender
       
   100         * @param aPhoNetReceiver Pointer to the phonet receiver
       
   101         * @param aMessageRouter Pointer to the message router
       
   102         * @return created message handler object
       
   103         */
       
   104         static CMmSupplServMessHandler* NewL(
       
   105             CMmPhoNetSender* aPhoNetSender,
       
   106             CMmPhoNetReceiver* aPhoNetReceiver,
       
   107             CMmMessageRouter* aMessageRouter,
       
   108             CMmUiccMessHandler* aUiccMessHandler );
       
   109 
       
   110         /**
       
   111         * Destructor.
       
   112         */
       
   113         ~CMmSupplServMessHandler();
       
   114 
       
   115     public: // Methods from base classes
       
   116 
       
   117         /**
       
   118         * From MMmMessHandlerBase. This method is the single entry point for
       
   119         * requests coming from the Symbian OS layer to this message handler
       
   120         * @param aIpc IPC number of the request
       
   121         * @return TInt KErrNone or error code
       
   122         */
       
   123         TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage );
       
   124 
       
   125         /**
       
   126          * Handle UICC response messages
       
   127          * @param aTraId Transaction ID
       
   128          * @param aFileData File data
       
   129          * @return KErrNone or error code
       
   130          */
       
   131          TInt ProcessUiccMsg(
       
   132              TInt aTraId,
       
   133              TInt aStatus,
       
   134              const TDesC8& aFileData );
       
   135 
       
   136     public: // New functions
       
   137 
       
   138         /**
       
   139         * Handles a received message by calling the specific
       
   140         * message handling method.
       
   141         * @param aIsiMessage, reference to the received message.
       
   142         */
       
   143         void ReceiveMessageL( const TIsiReceiveC &aIsiMessage );
       
   144 
       
   145         /**
       
   146         * Handles errors comes from PhoNetReceiver RunError
       
   147         * @param CIsiMsg* aIsiMsg: The received ISI message
       
   148         * @param TInt aError: Error code
       
   149         */
       
   150         void HandleError( const TIsiReceiveC&, TInt aError );
       
   151 
       
   152         /**
       
   153         * Maps Symbian OS number type to ISI values
       
   154         * @param aMmTypeOfNumber Symbian OS type of number
       
   155         * @param aMmNumberingPlan Symbian OS numbering plan
       
   156         * @return aIsiTypeOfNumber ISI type of number
       
   157         */
       
   158         static void MapTypeOfNumberMmToIsi(
       
   159             RMobilePhone::TMobileTON aMmTypeOfNumber,
       
   160             RMobilePhone::TMobileNPI aMmNumberingPlan,
       
   161             TUint8& aIsiTypeOfNumber );
       
   162 
       
   163         /**
       
   164         * Updates internal variable that keeps track of which ALS line is used
       
   165         * @param RMobilePhone::TMobilePhoneALSLine& aAlsLine : ALS line
       
   166         * @param return void: None
       
   167         */
       
   168         void SetVoiceCallForwardLine(
       
   169             RMobilePhone::TMobilePhoneALSLine& aAlsLine );
       
   170 
       
   171     private: // New functions
       
   172 
       
   173         /**
       
   174         * Completes NotifySendNetworkServiceRequest in error case
       
   175         * @param const TIsiReceiveC &aIsiMessage  Reference to the received
       
   176         *  message.
       
   177         */
       
   178         void SsStatusInd( const TIsiReceiveC &aIsiMessage );
       
   179 
       
   180         /**
       
   181         * Completes NotifySendNetworkServiceRequest in succesful case
       
   182         * @param const TIsiReceiveC &aIsiMessage  Reference to the received
       
   183         *  message.
       
   184         */
       
   185         void SsCompleteInd( const TIsiReceiveC &aIsiMessage );
       
   186 
       
   187     private: // types
       
   188 
       
   189         // The SS operations are grouped into
       
   190         // the following types. Used as ISA transaction IDs.
       
   191         enum TSSOperationType
       
   192             {
       
   193             ESSOperationTypeUnknown = 0,
       
   194             ESSOperationTypeGetCallForwardingStatus,
       
   195             ESSOperationTypeSetCallForwardingStatus,
       
   196             ESSOperationTypeGetCallBarringStatus,
       
   197             ESSOperationTypeSetCallBarringStatus,
       
   198             ESSOperationTypeGetCallWaitingStatus,
       
   199             ESSOperationTypeSetCallWaitingStatus,
       
   200             ESSOperationTypeSetSSPassword,
       
   201             ESSOperationTypeGetIdentityServiceStatus,
       
   202             ESSOperationTypeSendNetworkServiceRequest,
       
   203             ESSOperationTypeSendNetworkServiceRequestNoFdnCheck
       
   204             };
       
   205 
       
   206     private: // Constructors
       
   207 
       
   208         /**
       
   209         * C++ default constructor.
       
   210         */
       
   211         CMmSupplServMessHandler();
       
   212 
       
   213         /**
       
   214         * 2nd phase constructor
       
   215         */
       
   216         void ConstructL();
       
   217 
       
   218     private: // New methods
       
   219 
       
   220         /**
       
   221         * Construct a SS_SERVICE_NO_SIMATK_REQ ISI message and adds
       
   222         * SS_GSM_SIMATK_INFO subblock to message
       
   223         * @param TUint8 aTrId: transaction id
       
   224         * @param TUint8 aOperation: operation type
       
   225         * @param TUint16 aServiceCode: SS code
       
   226         * @param TUint8 aBasicServiceCode: basic service code
       
   227         * @param TDesC& ssInfoA: service info A
       
   228         * @return TInt: KErrNone or error code
       
   229         */
       
   230         TInt CreateServiceReqWithCheckInfo(
       
   231             const TUint8 aTrId,
       
   232             const TUint8 aOperation,
       
   233             const TUint16 aServiceCode,
       
   234             const TUint8 aBasicServiceCode );
       
   235 
       
   236         /**
       
   237         * Calls appropiate function for creating SS_SERVICE_NO_SIMATK_REQ,
       
   238         * based on SS code
       
   239         * @param  TUint8 aTrId: transaction id
       
   240         * @param  TInt aOperation: operation type
       
   241         * @param  TInt aServiceCode: SS code
       
   242         * @param  TDesC& ssInfoA: SS info A
       
   243         * @param  TDesC& ssInfoB: SS info B
       
   244         * @param  TDesC& ssInfoC: SS info C
       
   245         * @return TInt: KErrNone or error code
       
   246         */
       
   247         TInt SsServiceReqSatOriginated(
       
   248             const TUint8 aTrId,
       
   249             const TUint8 aOperation,
       
   250             const TUint16 aServiceCode,
       
   251             const TDesC& ssInfoA,
       
   252             const TDesC& ssInfoB,
       
   253             const TDesC& ssInfoC );
       
   254 
       
   255         /**
       
   256         * Construct a SS_REQUEST ISI message for Call Forwarding request.
       
   257         * @param TUint8 aTransactionId: transaction identifier
       
   258         * @param TUint8 aOperation: operation
       
   259         * @param TUint16 aMmiSsCode: SS code
       
   260         * @param TUint8 aTypeOfNumber: type of number
       
   261         * @param TInt aNoReplyTime: reply timer
       
   262         * @param TDesC16 const * aForwToNumber: number for setting call forwarding
       
   263         * @param TUint8 aBasicServiceCode: SS basic service code
       
   264         * @return TInt : KErrNone or error code
       
   265         */
       
   266         TInt SsCallForwServiceReq(
       
   267             TUint8 aTransactionId,
       
   268             TUint8 aOperation,
       
   269             TUint16 aMmiSsCode,
       
   270             TUint8 aTypeOfNumber,
       
   271             TInt aNoReplyTime,
       
   272             TDesC16 const* aForwToNumber,
       
   273             TUint8 aBasicServiceCode );
       
   274 
       
   275         /**
       
   276         * Breaks a SS_SERVICE_COMPLETED_RESP ISI-message and gets GSM specific
       
   277         * sub blocks.
       
   278         * @param CIsiMsg* aIsiMsg: isi message
       
   279         * @return void : None
       
   280         */
       
   281         void SsServiceCompletedRespL( const TIsiReceiveC &aIsiMessage );
       
   282 
       
   283         /**
       
   284         * Breaks a SS_SERVICE_FAILED_RESP ISI-message and gets data from
       
   285         * GSM specific sub blocks.
       
   286         * @param CIsiMsg* aIsiMsg: isi message
       
   287         * @return void : None
       
   288         */
       
   289         void SsServiceFailedResp( const TIsiReceiveC &aIsiMessage );
       
   290 
       
   291         /**
       
   292         * Breaks a SS_SERVICE_NOT_SUPPORTED_RESP ISI-message and gets data from
       
   293         * GSM specific sub blocks.
       
   294         * @param CIsiMsg* aIsiMsg: isi message
       
   295         * @return void : None
       
   296         */
       
   297         void SsServiceNotSupportedResp( const TIsiReceiveC &aIsiMessage );
       
   298 
       
   299         /**
       
   300         * Breaks a SS_GSM_FORWARDING sub block.
       
   301         * @param CSsSubBlock* aSubBlock: Ss sub block
       
   302         * @param TUint16 aSsCode: SS condition
       
   303         * @return void : None
       
   304         */
       
   305         void HandleSsGsmForwardingSubBlockL(
       
   306             const TIsiReceiveC &aIsiMessage,
       
   307             TUint aSbStartOffset,
       
   308             TUint16 aSsCode );
       
   309 
       
   310         /**
       
   311         * Breaks a SS_BSC_INFO sub block which is coming with a
       
   312         * Call Barring status response
       
   313         * @param const TIsiReceiveC &aIsiMessage
       
   314         * @param TUint aSbStartOffset
       
   315         * @param TUint16 aSsCode: service code (barring condition)
       
   316         * @return void : None
       
   317         */
       
   318         void HandleBarringSsGsmBscInfoSubBlockL(
       
   319             const TIsiReceiveC &aIsiMessage,
       
   320             TUint aSbStartOffset,
       
   321             TUint16 aSsCode );
       
   322 
       
   323         /**
       
   324         * Breaks a SS_BSC_INFO sub block which is coming with a
       
   325         * Call Waiting status response
       
   326         * @param const TIsiReceiveC &aIsiMessage
       
   327         * @param TUint aSbStartOffset: sub block offset
       
   328         * @return void : None
       
   329         */
       
   330         void HandleWaitingSsGsmBscInfoSubBlockL(
       
   331             const TIsiReceiveC &aIsiMessage,
       
   332             TUint aSbStartOffset );
       
   333 
       
   334         /**
       
   335         * Description: construct a SS_SERVICE_REQ ISI message with
       
   336         * SS_GSM_PASSWORD sub block for Call Barring request.
       
   337         * @param TUint8 aTransactionId: transaction identifier
       
   338         * @param TUint8 aOperation: operation
       
   339         * @param TDesC16 const * aOldPassword: Old password
       
   340         * @param TDesC16 const & aNewPassword: New password
       
   341         * @param TDesC16 const & aVerifyPassword: New password for verification
       
   342         * @param TUint8 aBasicServiceCode: Mmi basic service code
       
   343         * @return TInt : KErrNone or error code
       
   344         */
       
   345         TInt SsGsmBarringReq(
       
   346             TUint8 aTransactionId,
       
   347             TUint8 aOperation,
       
   348             TUint16 aMmiSsCode,
       
   349             TDesC16 const * aOldPassword,
       
   350             TDesC16 const & aNewPassword,
       
   351             TDesC16 const & aVerifyPassword,
       
   352             TUint8 aBasicServiceCode );
       
   353 
       
   354         /**
       
   355         * Construct a SS_SERVICE_REQ ISI-message for Call Waiting
       
   356         * request.
       
   357         * @param TUint8 aTransactionId: transaction identifier
       
   358         * @param TUint8 aOperation: operation
       
   359         * @param TUint16 aMmiSsCode: Mmi Ss code
       
   360         * @param TUint8 aBasicServiceCode: Mmi basic service code
       
   361         * @return TInt : KErrNone or error code
       
   362         */
       
   363         TInt SsGsmWaitingReq(
       
   364             TUint8 aTransactionId,
       
   365             TUint8 aOperation,
       
   366             TUint16 aMmiSsCode,
       
   367             TUint8 aBasicServiceCode );
       
   368 
       
   369         /**
       
   370         * Construct a  SS_SERVICE_REQ ISI-message for Caller Identify
       
   371         * (CLIP and CLIR), Connected Line Identify (COLP and COLR)
       
   372         * and Caller Name Presentation (CNAP).
       
   373         * @param TUint8 aTransactionId: transaction identifier
       
   374         * @param TUint16 aMmiSsCode: Mmi Ss code
       
   375         * @return TInt : KErrNone or error code
       
   376         */
       
   377         TInt SsIdentityServiceReq( TUint8 aTransactionId, TUint16 aMmiSsCode );
       
   378 
       
   379         /**
       
   380         * Completes a failed request to SOS layer.
       
   381         * @param TUint8 aTransactionId: the response's transaction ID
       
   382         * @param  TInt aError: Symbian error code
       
   383         */
       
   384         void CompleteFailedSSRequest( TUint8 aTransactionId, TInt aError );
       
   385 
       
   386         /**
       
   387         * Creates a SS GSM USSD request
       
   388         * @param TUint8 aTransactionId: transaction identifier
       
   389         * @param TDesC8* aString: Service string
       
   390         * @return TInt : KErrNone or error code
       
   391         */
       
   392         TInt SsGsmUssdSendReq( TUint8 aTransactionId, TDesC8* aString );
       
   393 
       
   394         /**
       
   395         * Breaks a SS_GSM_USSD_SEND_RESP ISI-message.
       
   396         * @param CIsiMsg* aIsiMsg: isi message
       
   397         * @return void : None
       
   398         */
       
   399         void SsGsmUssdSendResp( const TIsiReceiveC &aIsiMessage );
       
   400 
       
   401         /**
       
   402          * Read call forwarding flags REL4
       
   403          * @return KErrNone or error code
       
   404          */
       
   405         TInt UiccReadCallFwdFlagsRel4Req();
       
   406 
       
   407         /**
       
   408          * Read call forwarding flags CPHS
       
   409          * @return KErrNone or error code
       
   410          */
       
   411         TInt UiccReadCallFwdFlagsCphsReq();
       
   412 
       
   413          /**
       
   414          * Read call forwarding flags response
       
   415          * @param aStatus Status
       
   416          * @param aTraId Transaction ID
       
   417          * @param aFileData File data
       
   418          * @return None
       
   419          */
       
   420         void UiccHandleCallFwdFlagsResp(
       
   421             TInt aStatus,
       
   422             TInt aTrId, 
       
   423             const TDesC8& aFileData );
       
   424 
       
   425         /**
       
   426          * Write call forwarding flags REL4
       
   427          * @return KErrNone or error code
       
   428          */
       
   429         TInt UiccWriteCallFwdFlagsRel4Req();
       
   430 
       
   431         /**
       
   432          * Write call forwarding flags CPHS
       
   433          * @return KErrNone or error code
       
   434          */
       
   435         TInt UiccWriteCallFwdFlagsCPHSReq();
       
   436 
       
   437         /**
       
   438          * Read voice message flags REL4
       
   439          * @return KErrNone or error code
       
   440          */
       
   441         TInt UiccReadVoiceMsgFlagsRel4Req();
       
   442 
       
   443         /**
       
   444          * Read voice message flags CPHS
       
   445          * @return KErrNone or error code
       
   446          */
       
   447         TInt UiccReadVoiceMsgFlagsCphsReq();
       
   448 
       
   449         /**
       
   450          * Read voice message flags response
       
   451          * @param aTraId Transaction ID
       
   452          * @param aFileData Descriptor for file data
       
   453          * @return None
       
   454          */
       
   455         void UiccReadVoiceMsgFlagsResp(
       
   456             TInt aTrId,
       
   457             const TDesC8& aFileData );
       
   458 
       
   459         /**
       
   460          * Write voice message flags REL4
       
   461          * @param msgWaiting Voice message flags
       
   462          * @return KErrNone or error code
       
   463          */
       
   464         TInt UiccWriteVoiceMsgFlagsRel4Req(
       
   465             const RMobilePhone::TMobilePhoneMessageWaitingV1& msgWaiting );
       
   466 
       
   467         /**
       
   468          * Write voice message flags CPHS
       
   469          * @param msgWaiting Voice message flags
       
   470          * @return KErrNone or error code
       
   471          */
       
   472         TInt UiccWriteVoiceMsgFlagsCPHSReq(
       
   473             const RMobilePhone::TMobilePhoneMessageWaitingV1& msgWaiting );
       
   474 
       
   475         /**
       
   476         * Breaks received SS_SERVICE_COMPLETED_IND ISI message
       
   477         * @param CIsiMsg* aIsiMsg: isi message
       
   478         * return void : None
       
   479         */
       
   480         void SsServiceCompletedInd ( const TIsiReceiveC &aIsiMessage );
       
   481 
       
   482         // static utility methods
       
   483 
       
   484         /**
       
   485         * Map mobile service to isi basic service codes
       
   486         * @param RMobilePhone::TMobileService aMobileService: multimode api
       
   487         * mobile service
       
   488         * @param TUint8 *aIsiBasicServiceCode: isi basic service code
       
   489         * @return TInt: error value
       
   490         */
       
   491         TInt MapMobileServiceToBasicServiceCodeIsi(
       
   492             RMobilePhone::TMobileService aMobileService,
       
   493             TUint8* aIsiBasicServiceCode );
       
   494 
       
   495         /**
       
   496         * Map multimode api call forwarding conditon to isi call forwarding conditon
       
   497         * @param RMobilePhone::TMobilePhoneCFCondition aMmCFCondition: multimode
       
   498         * api call forw. condition
       
   499         * @param TUint16* aCFConditon: isi call forw. condition
       
   500         * @return TInt: error value
       
   501         */
       
   502         static TInt MapCFConditionMmToIsi(
       
   503             RMobilePhone::TMobilePhoneCFCondition aMmCFCondition,
       
   504             TUint16* aCFCondition );
       
   505 
       
   506         /**
       
   507         * Map type of number from isi type to multimode api type
       
   508         * @param TUint8 aIsiTypeOfNumber: isi number type
       
   509         * @param RMobilePhone::TMobileTON* aMmTypeOfNumber: number type
       
   510         * @param RMobilePhone::TMobileNPI* aMmNumberingPlan: numbering plan
       
   511         * @return TInt: error value
       
   512         */
       
   513         static TInt MapTypeOfNumberIsiToMm(
       
   514             TUint8 aIsiTypeOfNumber,
       
   515             RMobilePhone::TMobileTON* aMmTypeOfNumber,
       
   516             RMobilePhone::TMobileNPI* aMmNumberingPlan );
       
   517 
       
   518         /**
       
   519         * Map call forwarding isi status to multimode api status
       
   520         * @param TUint8 aIsiSsStatus: SS Status
       
   521         * @param RMobilePhone::TMobilePhoneCFStatus* aMmCFStatus: call forw. status
       
   522         * @return None
       
   523         */
       
   524         static void MapCFStatusIsiToMm(
       
   525             TUint8 aIsiSsStatus,
       
   526             RMobilePhone::TMobilePhoneCFStatus* aMmCFStatus );
       
   527 
       
   528         /**
       
   529         * Map call waiting isi status to multimode api status
       
   530         * @param TUint8 aIsiSsStatus: SS Status
       
   531         * @param RMobilePhone::TMobilePhoneCWStatus* aMmCWStatus: call waiting status
       
   532         * @return None
       
   533         */
       
   534         static void MapCWStatusIsiToMm(
       
   535             TUint8 aIsiSsStatus,
       
   536             RMobilePhone::TMobilePhoneCWStatus* aMmCWStatus );
       
   537 
       
   538         /**
       
   539         * Map isi basic service code to multimode api basic service code
       
   540         * @param TUint8 aIsiBasicServiceCode: isi basic service code
       
   541         * @param RMobilePhone::TMobileService* aMmBasicServiceCode: multimode api
       
   542         * basic service code
       
   543         * @return TInt: error value
       
   544         */
       
   545         TInt MapBasicServiceCodeIsiToMm(
       
   546             TUint8 aIsiBasicServiceCode,
       
   547             RMobilePhone::TMobileService* aMmBasicServiceCode );
       
   548 
       
   549         /**
       
   550         * Map isi call forwarding conditon to multimode api call forwarding conditon
       
   551         * @param TUint16 aCFConditon: isi call forw. condition
       
   552         * @param RMobilePhone::TMobilePhoneCFCondition* aMmCFCondition: multimode
       
   553         * api call forw. condition
       
   554         * @return None
       
   555         */
       
   556         static void MapCFConditionIsiToMm(
       
   557             TUint16 aCFConditon,
       
   558             RMobilePhone::TMobilePhoneCFCondition* aMmCFCondition );
       
   559 
       
   560         /**
       
   561         * Map isi call forwarding timeout to multimode api call forwarding timeout
       
   562         * @param TUint8 aISITimeout: isi timeout
       
   563         * @param TInt* aMmTimeout: multimode api timeout
       
   564         * @return None
       
   565         */
       
   566         static void MapTimeoutIsiToMm( TUint8 aISITimeout, TInt* aMmTimeout);
       
   567 
       
   568         /**
       
   569         * Map multimode api operation to isi operation
       
   570         * @param RMobilePhone::TMobilePhoneServiceAction aMmOperation: multimode
       
   571         * api service action
       
   572         * @param TUint8* aIsiOperation: isi operation
       
   573         * @return TInt: error value
       
   574         */
       
   575         static TInt MapOperationMmToIsi(
       
   576             RMobilePhone::TMobilePhoneServiceAction aMmOperation,
       
   577             TUint8* aIsiOperation );
       
   578 
       
   579         /**
       
   580         * Map isi call barring conditon to multimode api call barring conditon
       
   581         * @param TUint16 aCBConditon: isi call barring condition
       
   582         * @param RMobilePhone::TMobilePhoneCBCondition* aMmCBCondition: multimode
       
   583         * api call barring condition
       
   584         * @return None
       
   585         */
       
   586         static void MapCBConditionIsiToMm(
       
   587             TUint16 aCBConditon,
       
   588             RMobilePhone::TMobilePhoneCBCondition* aMmCBCondition );
       
   589 
       
   590         /**
       
   591         * Map multimode api call barring conditon to isi call barring conditon
       
   592         * @param RMobilePhone::TMobilePhoneCBCondition aMmCBCondition: multimode
       
   593         * api call barring condition
       
   594         * @param TUint16* aCBConditon: isi call barring condition
       
   595         * @return TInt: error value
       
   596         */
       
   597         static TInt MapCBConditionMmToIsi(
       
   598             RMobilePhone::TMobilePhoneCBCondition aMmCBCondition,
       
   599             TUint16* aCBConditon );
       
   600 
       
   601         /**
       
   602         * Map isi status to multimode api call barring status
       
   603         * @param TUint8 aIsiSsStatus: isi status
       
   604         * @param RMobilePhone::TMobilePhoneCBStatus* aMmCFStatus: multimode api
       
   605         * status
       
   606         * @return None
       
   607         */
       
   608         static void MapCBStatusIsiToMm(
       
   609             TUint8 aIsiSsStatus,
       
   610             RMobilePhone::TMobilePhoneCBStatus* aMmCFStatus );
       
   611 
       
   612         /**
       
   613         * Map multimode api identity service to isi identity service
       
   614         * @param RMobilePhone::TMobilePhoneIdService aService: multimode api
       
   615         * identity service
       
   616         * @param TUint16* aIdentityService: isi identity service
       
   617         * @return TInt: error value
       
   618         */
       
   619         static TInt MapIdentityServiceMmToIsi(
       
   620             RMobilePhone::TMobilePhoneIdService aService,
       
   621             TUint16* aIdentityService );
       
   622 
       
   623         /**
       
   624         * Map identity service isi status to multimode status.
       
   625         * @param SSsGsmGenericServiceInfo* aIsiIdentityServiceStatus:
       
   626         * isi identity service status
       
   627         * @param TUint8 aIsiClirOption: isi clir option
       
   628         * @param RMobilePhone::TMobilePhoneIdServiceStatus*
       
   629         * aMmIdentityServiceStatus: multimode api identity service status
       
   630         * @return TInt: error value
       
   631         */
       
   632         static void MapIdentityServiceStatusIsiToMm(
       
   633             TUint8 aIsiIdentityServiceStatus,
       
   634             TUint8 aIsiClirOption,
       
   635             RMobilePhone::TMobilePhoneIdServiceStatus* aMmIdentityServiceStatus );
       
   636 
       
   637         /**
       
   638         * Pack text string bytes
       
   639         * @param TDes8 &dest: packed message
       
   640         * @param TDes8 &src: unpacked message
       
   641         * @param TUint byte_count: the number of bytes in source
       
   642         * @return TUint16: lenght of the coded message
       
   643         */
       
   644         static TUint16 GsmLibSmsPackMessage(
       
   645             TDes8 &dest,
       
   646             TDes8 &src,
       
   647             TUint byte_count );
       
   648 
       
   649         /**
       
   650         * Checks if original SS request is changed or initiated by Call Control
       
   651         * @param aResponse: preprocessed data to simplify response processing
       
   652         * @return TBool: ETrue if response handled,
       
   653         * EFalse if response not handled
       
   654         */
       
   655         TBool ProcessIfSsRequestChanged(
       
   656                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   657 
       
   658         /**
       
   659         * Checks if IPC requested allows simple completion
       
   660         * @param aResponse: preprocessed data to simplify response processing
       
   661         * @return TBool: ETrue if response handled,
       
   662         * EFalse if response not handled
       
   663         */
       
   664         TBool ProcessIfSimpleCompletionPossible(
       
   665                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   666 
       
   667         /**
       
   668         * Processes SS_GSM_PASSWORD_REGISTRATION response
       
   669         * @param aResponse: preprocessed data to simplify response processing
       
   670         * @return TBool: ETrue if response handled,
       
   671         * EFalse if response not handled
       
   672         */
       
   673         TBool ProcessSsGsmPasswordRegistration(
       
   674                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   675 
       
   676         /**
       
   677         * Checks if this is related to call forwarding
       
   678         * @param aResponse: preprocessed data to simplify response processing
       
   679         * @return TBool: ETrue if response handled,
       
   680         * EFalse if response not handled
       
   681         */
       
   682         TBool ProcessIfCallForwardingL(
       
   683                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   684 
       
   685         /**
       
   686         * Checks if this is related to call barring
       
   687         * @param aResponse: preprocessed data to simplify response processing
       
   688         * @return TBool: ETrue if response handled,
       
   689         * EFalse if response not handled
       
   690         */
       
   691         TBool ProcessIfCallBarringL(
       
   692                const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   693 
       
   694         /**
       
   695         * Checks if this is related to call waiting
       
   696         * @param aResponse: preprocessed data to simplify response processing
       
   697         * @return TBool: ETrue if response handled,
       
   698         * EFalse if response not handled
       
   699         */
       
   700         TBool ProcessIfCallWaitingL(
       
   701                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   702 
       
   703         /**
       
   704         * Checks if this is related to identity services
       
   705         * @param aResponse: preprocessed data to simplify response processing
       
   706         * @return TBool: ETrue if response handled,
       
   707         * EFalse if response not handled
       
   708         */
       
   709         TBool ProcessIfIdentityServices(
       
   710                 const TPreprocessedSsServiceCompleteResponse& aResponse);
       
   711 
       
   712     private:    // Data
       
   713 
       
   714         //Pointer to the PhonetSender
       
   715         CMmPhoNetSender* iPhoNetSender;
       
   716 
       
   717         //Pointer to the Message router
       
   718         CMmMessageRouter* iMessageRouter;
       
   719 
       
   720         // List of RMobilePhone::TMobilePhoneCFInfoEntryV1 entries, containing the
       
   721         // results of a GetCallForwardingStatus request
       
   722         CMobilePhoneCFList* iCFResults;
       
   723 
       
   724         // List of RMobilePhone::TMobilePhoneCBInfoEntryV1 entries, containing the
       
   725         // results of a GetCallBarringStatus request
       
   726         CMobilePhoneCBList* iCBResults;
       
   727 
       
   728         // List of RMobilePhone::TMobilePhoneCWInfoEntryV1 entries, containing the
       
   729         // results of a GetCallWaitingStatus request
       
   730         CMobilePhoneCWList* iCWResults;
       
   731 
       
   732         // The following two flags are needed for service group mappings which
       
   733         // are not 1:1 between ETel and ISI. Using these flags is safe:
       
   734         //  - All SS operations strictly are a request/response pair
       
   735         //  - There cannot be any overlapping SS operations (ensured by
       
   736         //    CommonTSY, see CMmSupplServTsy::iSsTransactionOngoing).
       
   737 
       
   738         // ETel MM API values RMobilePhone::EVoiceService and
       
   739         // RMobilePhone::ETelephony both map to the network-side service
       
   740         // "Telephony". If this flag is ETrue, the previous request came with
       
   741         // EVoiceService (see MapMobileServiceToBasicServiceCodeIsi).
       
   742         // Accordingly, the response must be mapped to EVoiceService again
       
   743         // (see MapBasicServiceCodeIsiToMm).
       
   744         TBool iVoiceServiceMappedToTelephony;
       
   745 
       
   746         // ETel MM API values RMobilePhone::ECircuitDataService and
       
   747         // RMobilePhone::EAllBearer both map to the network-side service
       
   748         // "All Bearer". If this flag is ETrue, the previous request came with
       
   749         // ECircuitDataService (see MapMobileServiceToBasicServiceCodeIsi).
       
   750         // Accordingly, the response must be mapped to ECircuitDataService again
       
   751         // (see MapBasicServiceCodeIsiToMm).
       
   752         TBool iCircuitServiceMappedToAllBearer;
       
   753 
       
   754         // Call Forwarding Condition
       
   755         RMobilePhone::TMobilePhoneCFCondition iMmCFCondition;
       
   756 
       
   757         // Mobile Service
       
   758         RMobilePhone::TMobileService iMobileService;
       
   759 
       
   760         // Mobile address
       
   761         RMobilePhone::TMobileAddress iCFAddress;
       
   762 
       
   763         // Stores voice indicator status read from the USIM
       
   764         TUint8 iVoiceStatus;
       
   765 
       
   766         // Stores data indicator status read from the USIM
       
   767         TUint8 iDataStatus;
       
   768 
       
   769         // Stores fax indicator status read from the USIM
       
   770         TUint8 iFaxStatus;
       
   771 
       
   772         // Stores Call Forwarding Number read from the USIM
       
   773         TBuf<RMobilePhone::KMaxMobileTelNumberSize> iCFTelNumberFromSim;
       
   774 
       
   775         // Is EMmTsyGetCallForwardingNumberIPC ongoing
       
   776         TBool iGetCallForwardingNumber;
       
   777 
       
   778         // Is ECustomGetIccCallForwardingStatusIPC ongoing
       
   779         TBool iGetIccCallForwardingStatus;
       
   780 
       
   781         // Is ECustomGetIccCallForwardingStatusIPC ongoing
       
   782         TBool iNotifyIccCallForwardingStatus;
       
   783 
       
   784         // Stores Message waiting indicators read from the USIM
       
   785         RMobilePhone::TMobilePhoneMessageWaitingV1 iVMIndicators;
       
   786 
       
   787         // Stores Call Forwarding indicators read from the USIM
       
   788         RMmCustomAPI::TCFIndicators iTCFIndicators;
       
   789 
       
   790         // Stores voice line1 flag read from the USIM
       
   791         TUint8 iVoiceLine1;
       
   792 
       
   793         // Stores voice line2 flag read from the USIM
       
   794         TUint8 iVoiceLine2;
       
   795 
       
   796         // Stores fax flag read from the USIM
       
   797         TUint8 iFax;
       
   798 
       
   799         // Stores data flag read from the USIM
       
   800         TUint8 iData;
       
   801 
       
   802         // Current ALS line used
       
   803         RMobilePhone::TMobilePhoneALSLine iAlsLine;
       
   804 
       
   805         //Stores IPC number
       
   806         TInt iIpc;
       
   807 
       
   808         //Stores SS code
       
   809         TUint16 iSsCode;
       
   810 
       
   811         // Indicates if SS_GSM_SIMATK_INFO must be inserted
       
   812         TBool iCheckInfoSubblock;
       
   813 
       
   814         // Indicates if FDN check should be done
       
   815         TBool iFdnCheck;
       
   816 
       
   817         //Stores voice message flag type
       
   818         enum
       
   819         {
       
   820             EMsgFlagTypeRel4 = 0,
       
   821             EMsgFlagTypeCphs
       
   822         } iMsgFlagType;
       
   823 
       
   824         TBool iResourceControlSuppress;
       
   825 
       
   826         // Pointer to UICC message handler
       
   827         CMmUiccMessHandler* iMmUiccMessHandler;
       
   828 
       
   829     };
       
   830 
       
   831 #endif // CMMSUPPLSERVMESSHANDLER_H
       
   832 
       
   833 // End of File