dependencies/uncategorized/aiwdialdata.h
author Kashif.sayed
Thu, 25 Mar 2010 23:48:15 +0530
branchv5backport
changeset 25 1161e0025932
permissions -rw-r--r--
.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
Kashif.sayed
parents:
diff changeset
     1
/*
Kashif.sayed
parents:
diff changeset
     2
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
Kashif.sayed
parents:
diff changeset
     3
* All rights reserved.
Kashif.sayed
parents:
diff changeset
     4
* This component and the accompanying materials are made available
Kashif.sayed
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
Kashif.sayed
parents:
diff changeset
     6
* which accompanies this distribution, and is available
Kashif.sayed
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
Kashif.sayed
parents:
diff changeset
     8
*
Kashif.sayed
parents:
diff changeset
     9
* Initial Contributors:
Kashif.sayed
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
Kashif.sayed
parents:
diff changeset
    11
*
Kashif.sayed
parents:
diff changeset
    12
* Contributors:
Kashif.sayed
parents:
diff changeset
    13
*
Kashif.sayed
parents:
diff changeset
    14
* Description:  Dial data used with AIW for making calls.
Kashif.sayed
parents:
diff changeset
    15
*
Kashif.sayed
parents:
diff changeset
    16
*/
Kashif.sayed
parents:
diff changeset
    17
Kashif.sayed
parents:
diff changeset
    18
Kashif.sayed
parents:
diff changeset
    19
#ifndef CAIWDIALDATA_H
Kashif.sayed
parents:
diff changeset
    20
#define CAIWDIALDATA_H
Kashif.sayed
parents:
diff changeset
    21
Kashif.sayed
parents:
diff changeset
    22
//  INCLUDES
Kashif.sayed
parents:
diff changeset
    23
#include <e32base.h>
Kashif.sayed
parents:
diff changeset
    24
                        
Kashif.sayed
parents:
diff changeset
    25
// FORWARD DECLARATIONS
Kashif.sayed
parents:
diff changeset
    26
class CAiwGenericParamList;
Kashif.sayed
parents:
diff changeset
    27
class CAiwInternalDialData;
Kashif.sayed
parents:
diff changeset
    28
Kashif.sayed
parents:
diff changeset
    29
/** Constant used by aiwdialdata interface. */ 
Kashif.sayed
parents:
diff changeset
    30
namespace AIWDialData
Kashif.sayed
parents:
diff changeset
    31
    {
Kashif.sayed
parents:
diff changeset
    32
    /** Maximum phone number length same as used by phone. */ 
Kashif.sayed
parents:
diff changeset
    33
    const TInt KMaximumPhoneNumberLength = 100;
Kashif.sayed
parents:
diff changeset
    34
    
Kashif.sayed
parents:
diff changeset
    35
    /** Default windowgroup value */ 
Kashif.sayed
parents:
diff changeset
    36
    const TInt KAiwGoToIdle(0);
Kashif.sayed
parents:
diff changeset
    37
    }
Kashif.sayed
parents:
diff changeset
    38
Kashif.sayed
parents:
diff changeset
    39
// CLASS DECLARATION
Kashif.sayed
parents:
diff changeset
    40
Kashif.sayed
parents:
diff changeset
    41
/**
Kashif.sayed
parents:
diff changeset
    42
*   Creating call using CAiwDialData API. 
Kashif.sayed
parents:
diff changeset
    43
*
Kashif.sayed
parents:
diff changeset
    44
*   @code
Kashif.sayed
parents:
diff changeset
    45
*
Kashif.sayed
parents:
diff changeset
    46
*   - Client must be Service Handler client. For more information see
Kashif.sayed
parents:
diff changeset
    47
*     service handler desing document.
Kashif.sayed
parents:
diff changeset
    48
*
Kashif.sayed
parents:
diff changeset
    49
*   - Client creates intance of CAiwDialData:
Kashif.sayed
parents:
diff changeset
    50
*
Kashif.sayed
parents:
diff changeset
    51
*   CAiwDialData* dialData = CAiwDialData::NewLC();
Kashif.sayed
parents:
diff changeset
    52
*
Kashif.sayed
parents:
diff changeset
    53
*   - Define call parameters(phone number is compulsory parameter ):
Kashif.sayed
parents:
diff changeset
    54
*   
Kashif.sayed
parents:
diff changeset
    55
*   dialData->SetCallType( CAiwDialData::EAIWVoice );
Kashif.sayed
parents:
diff changeset
    56
*   _LIT(phoneNumber, "050123456");
Kashif.sayed
parents:
diff changeset
    57
*   dialData->SetPhoneNumberL( phoneNumber );
Kashif.sayed
parents:
diff changeset
    58
*   dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle );
Kashif.sayed
parents:
diff changeset
    59
*   
Kashif.sayed
parents:
diff changeset
    60
*   - Client creates reference to CAiwGenericParamList and fills paramlist:
Kashif.sayed
parents:
diff changeset
    61
*
Kashif.sayed
parents:
diff changeset
    62
*   CAiwGenericParamList& paramList = iServiceHandler->InParamListL();
Kashif.sayed
parents:
diff changeset
    63
*   dialData->FillInParamListL( paramList );
Kashif.sayed
parents:
diff changeset
    64
*
Kashif.sayed
parents:
diff changeset
    65
*  - Now client can give execute command to service handler.
Kashif.sayed
parents:
diff changeset
    66
*
Kashif.sayed
parents:
diff changeset
    67
*  iServiceHandler->ExecuteServiceCmdL( KAiwCmdCall, paramList,
Kashif.sayed
parents:
diff changeset
    68
*                                 iServiceHandler->OutParamListL(),
Kashif.sayed
parents:
diff changeset
    69
*                                 0, NULL );
Kashif.sayed
parents:
diff changeset
    70
*  @endcode
Kashif.sayed
parents:
diff changeset
    71
*  
Kashif.sayed
parents:
diff changeset
    72
*  Dial data for SDK applications.
Kashif.sayed
parents:
diff changeset
    73
* 
Kashif.sayed
parents:
diff changeset
    74
*  @lib aiwdialdata.lib
Kashif.sayed
parents:
diff changeset
    75
*  @since S60 3.2
Kashif.sayed
parents:
diff changeset
    76
*/
Kashif.sayed
parents:
diff changeset
    77
NONSHARABLE_CLASS( CAiwDialData ): public CBase
Kashif.sayed
parents:
diff changeset
    78
    {
Kashif.sayed
parents:
diff changeset
    79
    public:  // Enum.
Kashif.sayed
parents:
diff changeset
    80
    
Kashif.sayed
parents:
diff changeset
    81
        /**  Different type of calls. */ 
Kashif.sayed
parents:
diff changeset
    82
        enum TCallType
Kashif.sayed
parents:
diff changeset
    83
            {
Kashif.sayed
parents:
diff changeset
    84
            /* Voice call. If there is a VoIP service that is registered and set as preferred, the 
Kashif.sayed
parents:
diff changeset
    85
             * call is created as VoIP call, otherwise CS call. */
Kashif.sayed
parents:
diff changeset
    86
            EAIWVoice           = 0,
Kashif.sayed
parents:
diff changeset
    87
            /** Video call.             */
Kashif.sayed
parents:
diff changeset
    88
            EAIWVideo           = 1,
Kashif.sayed
parents:
diff changeset
    89
            /** Forced video call, creates video call directly without
Kashif.sayed
parents:
diff changeset
    90
             *  queries.                */
Kashif.sayed
parents:
diff changeset
    91
            EAIWForcedVideo     = 2, 
Kashif.sayed
parents:
diff changeset
    92
            /** Voip call.              */
Kashif.sayed
parents:
diff changeset
    93
            EAIWVoiP            = 3,
Kashif.sayed
parents:
diff changeset
    94
            /* Forced voice call, creates always CS voice call. Use this value if the call type is
Kashif.sayed
parents:
diff changeset
    95
             * not allowed to be changed */
Kashif.sayed
parents:
diff changeset
    96
            EAIWForcedCS        = 4
Kashif.sayed
parents:
diff changeset
    97
            };
Kashif.sayed
parents:
diff changeset
    98
            
Kashif.sayed
parents:
diff changeset
    99
    public:  // Constructors and destructor
Kashif.sayed
parents:
diff changeset
   100
    
Kashif.sayed
parents:
diff changeset
   101
        /**
Kashif.sayed
parents:
diff changeset
   102
        * Two-phased constructor for implementation class. 
Kashif.sayed
parents:
diff changeset
   103
        * Use this method for creating a instance with null items.
Kashif.sayed
parents:
diff changeset
   104
        *
Kashif.sayed
parents:
diff changeset
   105
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   106
        * @return A pointer to the new object.
Kashif.sayed
parents:
diff changeset
   107
        */
Kashif.sayed
parents:
diff changeset
   108
        IMPORT_C static CAiwDialData* NewL();
Kashif.sayed
parents:
diff changeset
   109
        
Kashif.sayed
parents:
diff changeset
   110
        /**
Kashif.sayed
parents:
diff changeset
   111
        * Two-phased constructor for implementation class. Leaves the 
Kashif.sayed
parents:
diff changeset
   112
        * pointer to the cleanup stack.
Kashif.sayed
parents:
diff changeset
   113
        * Use this method for creating a instance with null items.
Kashif.sayed
parents:
diff changeset
   114
        *
Kashif.sayed
parents:
diff changeset
   115
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   116
        * @return A pointer to the new object.
Kashif.sayed
parents:
diff changeset
   117
        */
Kashif.sayed
parents:
diff changeset
   118
        IMPORT_C static CAiwDialData* NewLC();
Kashif.sayed
parents:
diff changeset
   119
        
Kashif.sayed
parents:
diff changeset
   120
        /**
Kashif.sayed
parents:
diff changeset
   121
        * Destructor.
Kashif.sayed
parents:
diff changeset
   122
        */
Kashif.sayed
parents:
diff changeset
   123
        virtual ~CAiwDialData();
Kashif.sayed
parents:
diff changeset
   124
        
Kashif.sayed
parents:
diff changeset
   125
    public: // New
Kashif.sayed
parents:
diff changeset
   126
    
Kashif.sayed
parents:
diff changeset
   127
        /**
Kashif.sayed
parents:
diff changeset
   128
        * Composes data set package and inserts data to aInParamList.
Kashif.sayed
parents:
diff changeset
   129
        *
Kashif.sayed
parents:
diff changeset
   130
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   131
        * @param aInParamList In parameter used with CAiwService.
Kashif.sayed
parents:
diff changeset
   132
        */
Kashif.sayed
parents:
diff changeset
   133
        IMPORT_C void FillInParamListL( CAiwGenericParamList& aInParamList );
Kashif.sayed
parents:
diff changeset
   134
Kashif.sayed
parents:
diff changeset
   135
    public: // Access - Setters
Kashif.sayed
parents:
diff changeset
   136
        
Kashif.sayed
parents:
diff changeset
   137
        /**
Kashif.sayed
parents:
diff changeset
   138
        * Sets the phone number.
Kashif.sayed
parents:
diff changeset
   139
        * 
Kashif.sayed
parents:
diff changeset
   140
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   141
        * @param aPhoneNumber Phone number, which maximum length is
Kashif.sayed
parents:
diff changeset
   142
        *        KMaximumPhoneNumberLength. 
Kashif.sayed
parents:
diff changeset
   143
        *        Default: empty.
Kashif.sayed
parents:
diff changeset
   144
        * @leaves KErrArgument if aPhoneNumber length is over 
Kashif.sayed
parents:
diff changeset
   145
        *        KMaximumPhoneNumberLength.
Kashif.sayed
parents:
diff changeset
   146
        */
Kashif.sayed
parents:
diff changeset
   147
        IMPORT_C void SetPhoneNumberL( const TDesC& aPhoneNumber );
Kashif.sayed
parents:
diff changeset
   148
        
Kashif.sayed
parents:
diff changeset
   149
        /**
Kashif.sayed
parents:
diff changeset
   150
        * Sets call type.
Kashif.sayed
parents:
diff changeset
   151
        *
Kashif.sayed
parents:
diff changeset
   152
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   153
        * @param aCallType defines the call type.
Kashif.sayed
parents:
diff changeset
   154
        *        Default: EAIWVoice.
Kashif.sayed
parents:
diff changeset
   155
        */
Kashif.sayed
parents:
diff changeset
   156
        IMPORT_C void SetCallType( TCallType aCallType );
Kashif.sayed
parents:
diff changeset
   157
   
Kashif.sayed
parents:
diff changeset
   158
        /**
Kashif.sayed
parents:
diff changeset
   159
        * Sets the window group identifier. When call is ended, 
Kashif.sayed
parents:
diff changeset
   160
        * set window group is actived.
Kashif.sayed
parents:
diff changeset
   161
        *
Kashif.sayed
parents:
diff changeset
   162
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   163
        * @param aWindowGroup Window group id.
Kashif.sayed
parents:
diff changeset
   164
        *        Default: KAiwGoToIdle.
Kashif.sayed
parents:
diff changeset
   165
        */
Kashif.sayed
parents:
diff changeset
   166
        IMPORT_C void SetWindowGroup( TInt aWindowGroup );
Kashif.sayed
parents:
diff changeset
   167
        
Kashif.sayed
parents:
diff changeset
   168
     public: // Access - Getters
Kashif.sayed
parents:
diff changeset
   169
 
Kashif.sayed
parents:
diff changeset
   170
        /**
Kashif.sayed
parents:
diff changeset
   171
        * Phone number.
Kashif.sayed
parents:
diff changeset
   172
        *
Kashif.sayed
parents:
diff changeset
   173
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   174
        * @return Phone number.
Kashif.sayed
parents:
diff changeset
   175
        */
Kashif.sayed
parents:
diff changeset
   176
        IMPORT_C const TDesC& PhoneNumber() const;
Kashif.sayed
parents:
diff changeset
   177
        
Kashif.sayed
parents:
diff changeset
   178
        /**
Kashif.sayed
parents:
diff changeset
   179
        * Call type.
Kashif.sayed
parents:
diff changeset
   180
        *
Kashif.sayed
parents:
diff changeset
   181
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   182
        * @return Current call type.
Kashif.sayed
parents:
diff changeset
   183
        */
Kashif.sayed
parents:
diff changeset
   184
        IMPORT_C TCallType CallType() const;      
Kashif.sayed
parents:
diff changeset
   185
          
Kashif.sayed
parents:
diff changeset
   186
        /**
Kashif.sayed
parents:
diff changeset
   187
        * Window group id.
Kashif.sayed
parents:
diff changeset
   188
        *
Kashif.sayed
parents:
diff changeset
   189
        * @since S60 3.2
Kashif.sayed
parents:
diff changeset
   190
        * @return Window group id. 
Kashif.sayed
parents:
diff changeset
   191
        */     
Kashif.sayed
parents:
diff changeset
   192
        IMPORT_C TInt WindowGroup() const;
Kashif.sayed
parents:
diff changeset
   193
Kashif.sayed
parents:
diff changeset
   194
    private:
Kashif.sayed
parents:
diff changeset
   195
Kashif.sayed
parents:
diff changeset
   196
        /**
Kashif.sayed
parents:
diff changeset
   197
        * C++ default constructor.
Kashif.sayed
parents:
diff changeset
   198
        */
Kashif.sayed
parents:
diff changeset
   199
        CAiwDialData();
Kashif.sayed
parents:
diff changeset
   200
        
Kashif.sayed
parents:
diff changeset
   201
        /**
Kashif.sayed
parents:
diff changeset
   202
        * By default Symbian 2nd phase constructor is private.
Kashif.sayed
parents:
diff changeset
   203
        */
Kashif.sayed
parents:
diff changeset
   204
        void ConstructL();
Kashif.sayed
parents:
diff changeset
   205
    
Kashif.sayed
parents:
diff changeset
   206
    private:
Kashif.sayed
parents:
diff changeset
   207
        
Kashif.sayed
parents:
diff changeset
   208
        CAiwInternalDialData* iInternalDialData;   
Kashif.sayed
parents:
diff changeset
   209
    };
Kashif.sayed
parents:
diff changeset
   210
Kashif.sayed
parents:
diff changeset
   211
#endif      // CAIWDIALDATA_H   
Kashif.sayed
parents:
diff changeset
   212
            
Kashif.sayed
parents:
diff changeset
   213
// End of File