phoneclientserver/callui/inc/cauiengine/cauieng.h
author hgs
Tue, 10 Aug 2010 13:19:41 +0300
changeset 38 bc103bfb69cf
parent 33 8d5d7fcf9b59
permissions -rw-r--r--
201031_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  API for CallUiEngine usage.
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
#ifndef CAUIENG_H
hgs
parents:
diff changeset
    20
#define CAUIENG_H
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
//  INCLUDES
hgs
parents:
diff changeset
    24
#include <e32base.h>
hgs
parents:
diff changeset
    25
#include <spdefinitions.h>  //RIdArray
hgs
parents:
diff changeset
    26
#include "caui.hrh" 
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
// FORWARD DECLARATIONS
hgs
parents:
diff changeset
    30
class MCaUiReconnectQueryObserver;
hgs
parents:
diff changeset
    31
class MDesC16Array;
hgs
parents:
diff changeset
    32
class MCaUiDialResultObserver;
hgs
parents:
diff changeset
    33
class CPhCntMatcher;
hgs
parents:
diff changeset
    34
hgs
parents:
diff changeset
    35
hgs
parents:
diff changeset
    36
// CLASS DECLARATION
hgs
parents:
diff changeset
    37
hgs
parents:
diff changeset
    38
/**
hgs
parents:
diff changeset
    39
*  The API for CallUIEngine usage.
hgs
parents:
diff changeset
    40
*
hgs
parents:
diff changeset
    41
*  @lib CaUiEngine.lib
hgs
parents:
diff changeset
    42
*  @since 2.6
hgs
parents:
diff changeset
    43
*/
hgs
parents:
diff changeset
    44
class CCaUiEngApi 
hgs
parents:
diff changeset
    45
:   public CBase
hgs
parents:
diff changeset
    46
    {
hgs
parents:
diff changeset
    47
    public: // Data types
hgs
parents:
diff changeset
    48
hgs
parents:
diff changeset
    49
        /**
hgs
parents:
diff changeset
    50
        * Enumerate all supported resource types.
hgs
parents:
diff changeset
    51
        *
hgs
parents:
diff changeset
    52
        * ECaUiResVoice         - Pure voice call resources.
hgs
parents:
diff changeset
    53
        * ECaUiResVoiceAndVideo - Voice and video call resources.
hgs
parents:
diff changeset
    54
        * ECaUiResVoiceInternetAndVideo - All Internet, voice and video call resources.
hgs
parents:
diff changeset
    55
        * ECaUiResOnlyInternet  - Only Internet call resources.
hgs
parents:
diff changeset
    56
        */
hgs
parents:
diff changeset
    57
        enum TCaUiEngResource 
hgs
parents:
diff changeset
    58
            {
hgs
parents:
diff changeset
    59
            ECaUiResVoice                   = 0,
hgs
parents:
diff changeset
    60
            ECaUiResVoiceAndVideo           = 1,
hgs
parents:
diff changeset
    61
            ECaUiResVoiceInternetAndVideo   = 2,
hgs
parents:
diff changeset
    62
            ECaUiResOnlyInternet            = 3
hgs
parents:
diff changeset
    63
            };
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
hgs
parents:
diff changeset
    66
        /**
hgs
parents:
diff changeset
    67
        * Enumerate all supported localized text.
hgs
parents:
diff changeset
    68
        *
hgs
parents:
diff changeset
    69
        * ECallMenuItemText      - Menu item text for call.
hgs
parents:
diff changeset
    70
        * EVoiceCallMenuItemText - Menu item text for voice call.
hgs
parents:
diff changeset
    71
        * EVideoCallMenuItemText - Menu item text for video call.
hgs
parents:
diff changeset
    72
        * EInternetCallMenuItemText - Menu item text for internet call.
hgs
parents:
diff changeset
    73
        */
hgs
parents:
diff changeset
    74
        enum TCaUiEngText 
hgs
parents:
diff changeset
    75
            {
hgs
parents:
diff changeset
    76
            ECallMenuItemText          = 0,
hgs
parents:
diff changeset
    77
            EVoiceCallMenuItemText     = 1,
hgs
parents:
diff changeset
    78
            EVideoCallMenuItemText     = 2,
hgs
parents:
diff changeset
    79
            EInternetCallMenuItemText  = 3
hgs
parents:
diff changeset
    80
            };
hgs
parents:
diff changeset
    81
hgs
parents:
diff changeset
    82
    public: // New functions
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
        /**
hgs
parents:
diff changeset
    85
        * Make the dial operation.
hgs
parents:
diff changeset
    86
        * 
hgs
parents:
diff changeset
    87
        * @param aObserver The observer to handle dial result.
hgs
parents:
diff changeset
    88
        * @param aDialData The TCallUIDialDataV1 dial data information in
hgs
parents:
diff changeset
    89
        *                  packaged format.
hgs
parents:
diff changeset
    90
        * @param aCallType If not equal to ECaUiCallTypeUnknown, then 
hgs
parents:
diff changeset
    91
        *                  overwrites the call type in aDialData.
hgs
parents:
diff changeset
    92
        */
hgs
parents:
diff changeset
    93
        virtual void DialL(
hgs
parents:
diff changeset
    94
            MCaUiDialResultObserver& aObserver,
hgs
parents:
diff changeset
    95
            const TDesC8& aDialData,
hgs
parents:
diff changeset
    96
            const TCaUiCallType aCallType ) = 0;
hgs
parents:
diff changeset
    97
hgs
parents:
diff changeset
    98
        /**
hgs
parents:
diff changeset
    99
        * Launch the qtn.tel.no.video.network information note.
hgs
parents:
diff changeset
   100
        * 
hgs
parents:
diff changeset
   101
        */
hgs
parents:
diff changeset
   102
        virtual void LaunchNoNetSupNoteL() = 0;
hgs
parents:
diff changeset
   103
hgs
parents:
diff changeset
   104
hgs
parents:
diff changeset
   105
        /**
hgs
parents:
diff changeset
   106
        * Launch the reconnect confirmation query shown to user.
hgs
parents:
diff changeset
   107
        * 
hgs
parents:
diff changeset
   108
        * @param aObserver The observer to handle query result.
hgs
parents:
diff changeset
   109
        * @param aPhCntMatcher The Phone Contact Matcher. 
hgs
parents:
diff changeset
   110
        *        Ownership not transferred. If NULL, then matcher is created 
hgs
parents:
diff changeset
   111
        *        inside CaUIEngine.
hgs
parents:
diff changeset
   112
        * @param aPhoneNumber Pointer to the number where dial was tried.
hgs
parents:
diff changeset
   113
        * @param aIncludeVideoCallOption If set to ETrue, video call option is
hgs
parents:
diff changeset
   114
        *        included to query, otherwise it is left out.
hgs
parents:
diff changeset
   115
        */
hgs
parents:
diff changeset
   116
        virtual void LaunchReconConfQueryL( 
hgs
parents:
diff changeset
   117
            MCaUiReconnectQueryObserver& aObserver,
hgs
parents:
diff changeset
   118
            CPhCntMatcher* aPhCntMatcher,
hgs
parents:
diff changeset
   119
            const TPtrC aPhoneNumber,
hgs
parents:
diff changeset
   120
            const TBool aIncludeVideoCallOption ) = 0;
hgs
parents:
diff changeset
   121
hgs
parents:
diff changeset
   122
hgs
parents:
diff changeset
   123
        /**
hgs
parents:
diff changeset
   124
        * Cancel reconnect query launched with LaunchReconConfQueryL.
hgs
parents:
diff changeset
   125
        * 
hgs
parents:
diff changeset
   126
        */
hgs
parents:
diff changeset
   127
        virtual void CancelReconConfQuery() = 0;
hgs
parents:
diff changeset
   128
hgs
parents:
diff changeset
   129
hgs
parents:
diff changeset
   130
        /**
hgs
parents:
diff changeset
   131
        * Launch note and reconnect confirmation query in sequence.
hgs
parents:
diff changeset
   132
        * 
hgs
parents:
diff changeset
   133
        * @param aObserver The observer to handle query result.
hgs
parents:
diff changeset
   134
        * @param aPhCntMatcher The Phone Contact Matcher. 
hgs
parents:
diff changeset
   135
        *        Ownership not transferred. If NULL, then matcher is created 
hgs
parents:
diff changeset
   136
        *        inside CaUIEngine.
hgs
parents:
diff changeset
   137
        * @param aPhoneNumber Pointer to the number where dial was tried.
hgs
parents:
diff changeset
   138
        * @param aIncludeVideoCallOption If set to ETrue, video call option is
hgs
parents:
diff changeset
   139
        *        included to query, otherwise it is left out.
hgs
parents:
diff changeset
   140
        * @param aNoteText The text shown in information note. If empty, then 
hgs
parents:
diff changeset
   141
        *        qtn.tel.no.video.network text is shown.
hgs
parents:
diff changeset
   142
        */
hgs
parents:
diff changeset
   143
        virtual void LaunchNoteAndReconConfQueryL( 
hgs
parents:
diff changeset
   144
            MCaUiReconnectQueryObserver& aObserver,
hgs
parents:
diff changeset
   145
            CPhCntMatcher* aPhCntMatcher,
hgs
parents:
diff changeset
   146
            const TPtrC aPhoneNumber,
hgs
parents:
diff changeset
   147
            const TBool aIncludeVideoCallOption,
hgs
parents:
diff changeset
   148
            const TPtrC aNoteText ) = 0;
hgs
parents:
diff changeset
   149
hgs
parents:
diff changeset
   150
        /**
hgs
parents:
diff changeset
   151
        * Cancel note and reconnection query launched with 
hgs
parents:
diff changeset
   152
        * LaunchNoteAndReconConfQueryL.
hgs
parents:
diff changeset
   153
        * 
hgs
parents:
diff changeset
   154
        */
hgs
parents:
diff changeset
   155
        virtual void CancelNoteAndReconConfQuery() = 0;
hgs
parents:
diff changeset
   156
hgs
parents:
diff changeset
   157
        /**
hgs
parents:
diff changeset
   158
        * Launch address selection. If contact contains default number or 
hgs
parents:
diff changeset
   159
        * only one number, number will be returned directly. 
hgs
parents:
diff changeset
   160
        * Otherwise address selection list displayed.
hgs
parents:
diff changeset
   161
        * @since 3.0
hgs
parents:
diff changeset
   162
        * 
hgs
parents:
diff changeset
   163
        * @param aTelNum Contains selected number after execution.
hgs
parents:
diff changeset
   164
        * @param aContactId The contact id from PhoneBook.
hgs
parents:
diff changeset
   165
        * @param aVoIPAddressSelect If ETrue VoIP address select is used. 
hgs
parents:
diff changeset
   166
        * @return TBool, ETrue if number selected, 
hgs
parents:
diff changeset
   167
        *     EFalse otherwice (E.g. list canceled).
hgs
parents:
diff changeset
   168
        */
hgs
parents:
diff changeset
   169
        virtual TBool LaunchAddressSelectL( 
hgs
parents:
diff changeset
   170
            TDes& aTelNum, 
hgs
parents:
diff changeset
   171
            const TInt aContactId,
hgs
parents:
diff changeset
   172
            const TBool aVoIPAddressSelect ) = 0;
hgs
parents:
diff changeset
   173
hgs
parents:
diff changeset
   174
        /**
hgs
parents:
diff changeset
   175
        * Cancel address selection launched with LaunchAddressSelectL.
hgs
parents:
diff changeset
   176
        * 
hgs
parents:
diff changeset
   177
        */
hgs
parents:
diff changeset
   178
        virtual void CancelAddressSelect() = 0;
hgs
parents:
diff changeset
   179
        
hgs
parents:
diff changeset
   180
        /**
hgs
parents:
diff changeset
   181
        * Get VoIP services
hgs
parents:
diff changeset
   182
        * @param aVoipServiceIds On return, contains the list of VoIP services
hgs
parents:
diff changeset
   183
        */
hgs
parents:
diff changeset
   184
        virtual void GetVoIPServiceIdsL( RIdArray& aVoipServiceIds  ) const = 0;
hgs
parents:
diff changeset
   185
        
hgs
parents:
diff changeset
   186
        /**
hgs
parents:
diff changeset
   187
        * Get the service provider name
hgs
parents:
diff changeset
   188
        * @param aServiceId The service, whose name is requested
hgs
parents:
diff changeset
   189
        * @param aServiceName On return, contains the service name
hgs
parents:
diff changeset
   190
        */
hgs
parents:
diff changeset
   191
        virtual void GetVoipServiceNameL( TServiceId aServiceId, TDes& aServiceName ) const = 0;
hgs
parents:
diff changeset
   192
    };
hgs
parents:
diff changeset
   193
hgs
parents:
diff changeset
   194
hgs
parents:
diff changeset
   195
hgs
parents:
diff changeset
   196
hgs
parents:
diff changeset
   197
/**
hgs
parents:
diff changeset
   198
*  Interface for CaUiEngine creation.
hgs
parents:
diff changeset
   199
*
hgs
parents:
diff changeset
   200
*  @lib 
hgs
parents:
diff changeset
   201
*  @since 2.6
hgs
parents:
diff changeset
   202
*/
hgs
parents:
diff changeset
   203
class CCaUiEngFactory : public CBase
hgs
parents:
diff changeset
   204
    {
hgs
parents:
diff changeset
   205
    public:
hgs
parents:
diff changeset
   206
hgs
parents:
diff changeset
   207
        /**
hgs
parents:
diff changeset
   208
        * Creates CallUIEngine.
hgs
parents:
diff changeset
   209
        * CCaUiEngFactory instance is deleted even in leave case.
hgs
parents:
diff changeset
   210
        * 
hgs
parents:
diff changeset
   211
        * @return CCaUiEngApi implementation. NULL if not supported.
hgs
parents:
diff changeset
   212
        *         Ownership transferred.
hgs
parents:
diff changeset
   213
        */
hgs
parents:
diff changeset
   214
        virtual CCaUiEngApi* CCaUiEngApiLD() = 0;
hgs
parents:
diff changeset
   215
hgs
parents:
diff changeset
   216
    };
hgs
parents:
diff changeset
   217
hgs
parents:
diff changeset
   218
/**
hgs
parents:
diff changeset
   219
* Only exported function. This is in index 1 in the lookup table.
hgs
parents:
diff changeset
   220
* Call this function to create CCaUiEngFactory instance.
hgs
parents:
diff changeset
   221
* 
hgs
parents:
diff changeset
   222
* IMPORT_C CCaUiEngFactory* CreateCaUiEngFactoryL();
hgs
parents:
diff changeset
   223
*/ 
hgs
parents:
diff changeset
   224
hgs
parents:
diff changeset
   225
hgs
parents:
diff changeset
   226
hgs
parents:
diff changeset
   227
hgs
parents:
diff changeset
   228
#endif      // CAUIENG_H 
hgs
parents:
diff changeset
   229
hgs
parents:
diff changeset
   230
// End of File