convergedcallengine/serviceselector/inc/cconvergedserviceselector.h
changeset 51 12bc758d6a02
parent 48 78df25012fda
child 53 25b8d29b7c59
equal deleted inserted replaced
48:78df25012fda 51:12bc758d6a02
     1 /*
       
     2 * Copyright (c) 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 "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:  This file contains the header file of the
       
    15 *              : CConvergedServiceSelector class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CCONVERGEDSERVICESELECTOR_H
       
    22 #define CCONVERGEDSERVICESELECTOR_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 //None
       
    29 
       
    30 // MACROS
       
    31 //None
       
    32 
       
    33 // DATA TYPES
       
    34 //None.
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 //None
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 class CServiceHandler;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *  Interface class for telephone to fetch calling service.
       
    46 *
       
    47 *  @lib ServiceSelector.lib
       
    48 *  @since Series60_5.0
       
    49 */
       
    50 class CConvergedServiceSelector
       
    51         : public CBase
       
    52     {
       
    53     
       
    54     public:  // Enum and class.
       
    55     
       
    56         /**  Different type of calls. */ 
       
    57         enum TSsCallType
       
    58             {
       
    59             ESsVoiceCall = 0,       // Voice call.
       
    60             ESsVideoCall = 1,       // Video call.
       
    61             ESsVoipCall = 2         // Voip call.
       
    62             };
       
    63      
       
    64         /** Class for the results of the service selection.*/
       
    65         class TSsResult
       
    66             {
       
    67             public:
       
    68                 // Call type
       
    69                 TSsCallType iCallType;
       
    70                 // Service id
       
    71                 TUint iServiceId;
       
    72                 // Current registration status
       
    73                 // of the service
       
    74                 TBool iServiceEnabled;
       
    75                 
       
    76                        
       
    77             };
       
    78             
       
    79     public:  // Constructors and destructor
       
    80       
       
    81         /**
       
    82         * Two-phased constructor.
       
    83         */
       
    84         IMPORT_C static CConvergedServiceSelector* NewL();
       
    85         
       
    86         /**
       
    87         * Destructor.
       
    88         */
       
    89         IMPORT_C virtual ~CConvergedServiceSelector();
       
    90 
       
    91     public: // New functions
       
    92         
       
    93         /**
       
    94         * Makes service selection for the call. 
       
    95         *  -If voice call is made by sendkey the call type may be changed as voip if
       
    96         *   there is preferred voip service available.
       
    97         *  -For voip calls checks the current connection status for the services and
       
    98         *   shows the confirmation queries (if needed) for the service registration.
       
    99         * @param aResult        Selection results are returned by this param.
       
   100         * @param aCallType      Current type of the call.
       
   101         * @param aServiceId     Current service of the call.
       
   102         * @param aSendKey       Optional parameter if call is started by SendKey.
       
   103         * @param aString        Phone number/address for call.
       
   104         * @return Error code indicating the success of the selection.
       
   105         *         KErrCancel if the user cancels a list/confirmation queries.
       
   106         */
       
   107         IMPORT_C TInt GetCallingServiceByCallType(
       
   108             TSsResult& aResult, 
       
   109             TSsCallType aCallType,
       
   110             TUint aServiceId,
       
   111             TBool aSendKey = ETrue,
       
   112             const TDesC& aString = KNullDesC );
       
   113 
       
   114         /**
       
   115         * Cancels selection.
       
   116         *  -Dismiss dialogs if any is currently shown and cancels the selection.
       
   117         *  -Selection can be canceled by deleting the
       
   118         *   CConvergedServiceSelector instance also.
       
   119         */
       
   120         IMPORT_C void CancelSelection();
       
   121         
       
   122     private:  // New functions
       
   123         
       
   124         
       
   125         void DoGetCallingServiceByCallTypeL(
       
   126             TSsResult& aResult, 
       
   127             TSsCallType aCallType,
       
   128             TUint aServiceId,
       
   129             TBool aSendKey,
       
   130             const TDesC& aString );
       
   131 
       
   132     private:
       
   133         
       
   134         /**
       
   135         * C++ default constructor.
       
   136         */
       
   137         CConvergedServiceSelector();
       
   138 
       
   139 
       
   140     private:    // Data
       
   141         
       
   142         CServiceHandler* iHandler;
       
   143 
       
   144     };
       
   145 
       
   146 #endif      // CCONVERGEDSERVICESELECTOR_H
       
   147             
       
   148 // End of File