satengine/SatServer/Engine/inc/csatmultimodeapi.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2010 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 "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:  Encapsule the access to ETel MM API in sat
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSATMULTIMODEAPI_H
       
    20 #define CSATMULTIMODEAPI_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "msatmultimodeapi.h"
       
    24 
       
    25 class CSatSActiveWrapper;
       
    26 
       
    27 /**
       
    28  *  Encapsule the access to ETel MM API in sat
       
    29  *  
       
    30  *  This class is an active object. It will submit
       
    31  *  Etel asynchronous request and wait for response.
       
    32  *  Clients for this class will implement the interface
       
    33  *  in MSatETelClient which is the callback function
       
    34  *  when CSatMultiModeApi get the ETel request response.
       
    35  *
       
    36  *  @lib satengine.lib
       
    37  *  @since S60 v5.0
       
    38  */
       
    39 class CSatMultiModeApi : public CBase,
       
    40                          public MSatMultiModeApi
       
    41     {
       
    42 
       
    43 public:
       
    44     /**
       
    45     * Two-phased constructor.
       
    46     */
       
    47     static CSatMultiModeApi* NewL();
       
    48 
       
    49     /**
       
    50     * Destructor
       
    51     */
       
    52     virtual ~CSatMultiModeApi();
       
    53 
       
    54 // from base class MSatMultiModeApi
       
    55     
       
    56     /**
       
    57      * Gives pointer to active RMobilePhone session
       
    58      *
       
    59      * @return pointer to active RMobilePhone server session
       
    60      */
       
    61     RMobilePhone* Phone();
       
    62 
       
    63     /**
       
    64      * Gives reference to active Dummy RMobilePhone session
       
    65      *
       
    66      * @return Reference to active Dummy RMobilePhone server session
       
    67      */
       
    68     RMobilePhone* DummyPhone();
       
    69 
       
    70     /**
       
    71      * Gives pointer to active RMmCustomApi session
       
    72      *
       
    73      * @return pointer to active RMmCustomApi server session
       
    74      */
       
    75     RMmCustomAPI* CustomApi();
       
    76 
       
    77     /**
       
    78      * Lowers error granularity to basic errors
       
    79      */
       
    80     void LowerErrorGranularity();
       
    81 
       
    82     /**
       
    83      * Raises error granularity to extended errors
       
    84      */
       
    85     void RaiseErrorGranularity();
       
    86 
       
    87     /**
       
    88      * Access RMobilePhone::GetNetworkRegistrationStatus
       
    89      * for the paramter information please see the etelmm.h
       
    90      */
       
    91     void GetNetworkRegistrationStatus( TRequestStatus& aReqStatus, 
       
    92             RMobilePhone::TMobilePhoneRegistrationStatus& aStatus );
       
    93     
       
    94     /**
       
    95      * Access RMobilePhone::NotifyNetworkRegistrationStatusChange
       
    96      * for the paramter information please see the etelmm.h
       
    97      */ 
       
    98     void NotifyNetworkRegistrationStatusChange( TRequestStatus& aReqStatus,
       
    99             RMobilePhone::TMobilePhoneRegistrationStatus& aStatus );
       
   100 
       
   101     /**
       
   102      * Access RMobilePhone::NotifyNetworkRegistrationStatusChange
       
   103      * for the paramter information please see the etelmm.h
       
   104      */ 
       
   105     void GetSubscriberId( TRequestStatus& aReqStatus, 
       
   106             RMobilePhone::TMobilePhoneSubscriberId& aId );
       
   107 
       
   108     /**
       
   109      * Access RMobilePhone::SendDTMFTones
       
   110      * for the paramter information please see the etelmm.h
       
   111      */ 
       
   112     void SendDTMFTones( TRequestStatus& aReqStatus, const TDesC& aTones);   
       
   113     
       
   114     /**
       
   115      * Access RMobilePhone::ContinueDTMFStringSending
       
   116      * for the paramter information please see the etelmm.h
       
   117      */ 
       
   118     TInt ContinueDTMFStringSending( TBool aContinue );
       
   119     
       
   120     /**
       
   121      * Access RMobilePhone::CancelAsyncRequest
       
   122      * for the paramter information please see the etelmm.h
       
   123      */
       
   124     void CancelAsyncRequest(TInt aReqToCancel);
       
   125 
       
   126     /**
       
   127      * Access RMobilePhone::SendNetworkServiceRequestNoFdnCheck
       
   128      * for the paramter information please see the etelmm.h
       
   129      */
       
   130     void SendNetworkServiceRequestNoFdnCheck( TRequestStatus& aReqStatus, 
       
   131             const TDesC& aServiceString);
       
   132         
       
   133     /**
       
   134      * Access RMobileCall::DialNoFdnCheck
       
   135      * for the paramter information please see the etelmm.h
       
   136      */
       
   137     void DialNoFdnCheck( TRequestStatus& aStatus,
       
   138             const TDesC8& aCallParams,const TDesC& aTelNumber );
       
   139                                                         
       
   140     /**
       
   141      * Access RMobileUssdMessaging::SendMessageNoFdnCheck
       
   142      * for the paramter information please see the etelmm.h
       
   143      */
       
   144     void SendMessageNoFdnCheck( TRequestStatus& aReqStatus,
       
   145             const TDesC8& aMsgData, const TDesC8& aMsgAttributes );
       
   146     /**
       
   147      * Access RMobileCall::DialCancel
       
   148      */
       
   149     void DialCancel();
       
   150 
       
   151     /**
       
   152      * Access RMobilePhone::GetCurrentActiveUSimApplication
       
   153      */
       
   154     void GetCurrentActiveUSimApplication( TRequestStatus& aReqStatus, 
       
   155                     RMobilePhone::TAID& aAID );
       
   156 
       
   157     /**
       
   158      * Check if there is an incoming call 
       
   159      * @return ETrue if there is an incoming call
       
   160      */
       
   161     TBool IsCallIncoming();
       
   162     
       
   163     /**
       
   164      * Access RMobileCall::NotifyMobileCallStatusChange
       
   165      */
       
   166     void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus,
       
   167                     RMobileCall::TMobileCallStatus& aStatus) ; 
       
   168 
       
   169     /**
       
   170      * Access RMobileCall::NotifyStatusChangeCancel
       
   171      */
       
   172     void NotifyCallStatusChangeCancel();
       
   173     /**
       
   174      * Access RMobilePhone::TerminateActiveCalls NotifyMobileCallStatusChange
       
   175      */
       
   176     void TerminateActiveCalls(TRequestStatus& aReqStatus);
       
   177 
       
   178     
       
   179     /**
       
   180      * Access RMboileCall::GetMobileCallInfo
       
   181      */
       
   182     TInt GetMobileCallInfo(TDes8& aCallInfo);
       
   183     
       
   184     /**
       
   185      * Access RMboileCall::DialEmergencyCall
       
   186      */
       
   187     virtual void DialEmergencyCall(TRequestStatus& aReqStatus, 
       
   188                 const TDesC& aNumber);
       
   189             
       
   190 private:
       
   191 
       
   192     /**
       
   193     * Default C++ constructor
       
   194     */
       
   195     CSatMultiModeApi();
       
   196 
       
   197     /**
       
   198     * By default Symbian 2nd phase constructor is private.
       
   199     */
       
   200     void ConstructL();
       
   201     
       
   202 // New functions
       
   203     /**
       
   204      * Makes the connections to ETel Server
       
   205      */
       
   206     void ConnectETelServerL();
       
   207 
       
   208     /**
       
   209      * Loads and opens phone module
       
   210      *
       
   211      * @param aPhone reference to phone that is loaded
       
   212      * @param aModuleName Name of the phone module
       
   213      * @param aPhoneName Name of the phone
       
   214      */
       
   215     void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName,
       
   216             const TDesC& aPhoneName );
       
   217 
       
   218     /**
       
   219      * Open the RMobileUssdMessaging
       
   220      */ 
       
   221     void LoadUssdMessagingL();
       
   222     
       
   223     /**
       
   224      * Open the RMobileCall
       
   225      */
       
   226     TInt LoadMobileCall();
       
   227     
       
   228 
       
   229 private: // data
       
   230 
       
   231     /**
       
   232      * The Etel server.
       
   233      * Own
       
   234      */
       
   235     RTelServer iTelServer;
       
   236 
       
   237     /**
       
   238      * Used to access phone based functionality
       
   239      * Own
       
   240      */
       
   241     RMobilePhone iPhone;
       
   242 
       
   243     /**
       
   244      * Phone module for Dummy TSY
       
   245      * Own
       
   246      */
       
   247     RMobilePhone iDummyPhone;
       
   248 
       
   249     /**
       
   250      * RMmCustomAPI
       
   251      * Own
       
   252      */
       
   253     RMmCustomAPI iCustomPhone;
       
   254     
       
   255     /**
       
   256      * Line needed by iCall
       
   257      * own
       
   258      */
       
   259     RMobileLine iLine;
       
   260     
       
   261     /**
       
   262      * Access call based functionality
       
   263      * own
       
   264      */
       
   265     RMobileCall iCall;
       
   266     
       
   267     /**
       
   268      * Access USSD Messaging
       
   269      * own
       
   270      */
       
   271     RMobileUssdMessaging iUssd;
       
   272 
       
   273     /**
       
   274      * Pointer to Active Wrapper. Used in startup
       
   275      * Own.
       
   276      */
       
   277     CSatSActiveWrapper* iWrapper;
       
   278     
       
   279     /**
       
   280      * Indicate if the iLine has been openned
       
   281      */
       
   282     TBool iLineOpened;
       
   283 
       
   284     /**
       
   285      * Indicate if the iCall has been openned
       
   286      */
       
   287     TBool iCallOpened;
       
   288     
       
   289     /**
       
   290      * Indicate if the iUssd has been openned
       
   291      */
       
   292     TBool iUssdOpened;
       
   293     
       
   294     };
       
   295 
       
   296 #endif // CSATMULTIMODEAPI_H