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