classicui_plat/extended_aiw_criteria_api/inc/AiwDialDataTypes.h
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2005 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:     Defines types used in AIW call creation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef AIWDIALDATATYPES_H
       
    23 #define AIWDIALDATATYPES_H  
       
    24 
       
    25 #include <cntdef.h>  // For KNullContactId
       
    26 #include <tpbkcontactitemfield.h> // For contact item field
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // Lengths of various strings.
       
    31 const TInt KAiwTelephoneNumberLength = 100; // Telephony number length.
       
    32 const TInt KAiwNameBufferLength      = 50;  // The name length.
       
    33 const TInt KAiwSubAddressLength      = 21;  // The subaddress length, see
       
    34                                             // ITU-T I.330 and 3GPP TS 11.14.
       
    35 const TInt KAiwBearerLength          = 14;  // The bearer length.
       
    36 
       
    37 // No number type.
       
    38 const TInt KAiwDefaultNumberType     = -1;  // No number type.
       
    39 
       
    40 // Constant for no contact
       
    41 const TInt KAiwNoContact             = KNullContactId;
       
    42 
       
    43 // Constant used as window group id to indicate that we wish to go to idle.
       
    44 const TInt KAiwGoToIdle              = 0;
       
    45 
       
    46 // Constants used in Redial parameter
       
    47 const TInt KAiwRedialDefault         = -1;  // Default redial.
       
    48 const TInt KAiwRedialOff             = -2;  // Redial is off.
       
    49 const TInt KAiwRedialWithDefaultTime = -3;  // Redial on, with default time.
       
    50 
       
    51 // Match is allowed by default.
       
    52 const TBool KAiwDefaultAllowMatch    = ETrue;
       
    53 
       
    54 // Type for telephone number.
       
    55 typedef TBuf< KAiwTelephoneNumberLength > TAiwTelephoneNumber;
       
    56 
       
    57 // Type for name.
       
    58 typedef TBuf< KAiwNameBufferLength > TAiwNameBuffer;
       
    59 
       
    60 // Type for contact item id.
       
    61 typedef TContactItemId TAiwContactId;
       
    62 
       
    63 // Type for calling party subaddress.
       
    64 typedef TBuf< KAiwSubAddressLength > TAiwSubAddress;
       
    65 
       
    66 // Type for bearer capability.
       
    67 typedef TBuf8< KAiwBearerLength > TAiwBearerCapability;
       
    68 
       
    69 // Type for contact item field
       
    70 typedef TPbkContactItemField TAiwContactItemField;
       
    71 
       
    72 /**
       
    73 * Call type.
       
    74 */
       
    75 enum TAiwCallType
       
    76     {
       
    77     EAiwVoice       = 0, // Voice call.
       
    78     EAiwVideo       = 1, // Video call.
       
    79     EAiwForcedVideo = 2, // Forced video call.
       
    80     EAiwVoIPCall    = 3  // VOIP call
       
    81     };
       
    82 
       
    83 
       
    84 
       
    85 
       
    86 // CLASS DECLARATION
       
    87 
       
    88 /**
       
    89 * It defines the structure containing dial information.
       
    90 *
       
    91 **************************************************************************
       
    92 * MUST Fields (change at least these before you use TCallUIDialDataV1):
       
    93 **************************************************************************
       
    94 *
       
    95 *  iTelNumber      - String that is to be dialled.
       
    96 *                    Default: Empty.
       
    97 * 
       
    98 **************************************************************************
       
    99 * OPTIONAL fields:
       
   100 **************************************************************************
       
   101 * 
       
   102 *  iCallType       - Type of the call, i.e. voice (default) or video call.
       
   103 *                    Default: Voice call.
       
   104 * 
       
   105 *  iName           - Name corresponding to number. Name must be defined
       
   106 *                    if show number equals to EFalse.
       
   107 *                    Default: Empty.
       
   108 * 
       
   109 *  iNumberType     - Number type override. See PbkFields.hrh. Only phone
       
   110 *                    number fields are supported.
       
   111 *                    Default: KPhCltDefaultNumberType.
       
   112 * 
       
   113 *  iContactId      - Contact id. You should put always when you are dialing
       
   114 *                    from phonebook contact.
       
   115 *                    Default: No contact.
       
   116 * 
       
   117 *  iWindowGroup    - Window group of the application that wants to dial.
       
   118 *                    Default: GoToIdle.
       
   119 * 
       
   120 *  iRedial         - Automatic redial override.
       
   121 *                    Default: KPhCltRedialDefault.
       
   122 * 
       
   123 *  iShowNumber     - Permission to show number. ETrue iff it is allowed.
       
   124 *                    Default: ETrue.
       
   125 * 
       
   126 *  iAllowMatch     - Permission to allow match. ETrue iff match is to be done.
       
   127 *                    If you are dialing from sim pd or fdn, then this should
       
   128 *                    be EFalse.
       
   129 *                    Default: KPhCltDefaultAllowMatch.
       
   130 * 
       
   131 *  iEndOtherCalls  - Information if the existing calls are ended before
       
   132 *                    this new one is made.
       
   133 *                    Default: EFalse.
       
   134 * 
       
   135 *  iEmergencyCall  - Information whether this is an emergency call or not.
       
   136 *                    Not mandatory. Set only if you know that the call is an 
       
   137 *                    emergency call.
       
   138 *                    Default: EFalse.
       
   139 * 
       
   140 *  iSubAddress     - The calling party subaddress. Supports SAT features.
       
   141 *                    Defined in ITU-T I.330 and 3GPP TS 11.14.
       
   142 *                    Default: Empty.
       
   143 * 
       
   144 *  iSATCall        - Set whether this is SAT originated call or not. 
       
   145 *                    Supports SAT features.
       
   146 *                    Default: EFalse.
       
   147 * 
       
   148 *  iBearer         - Bearer capabilities. Supports SAT features.
       
   149 *                    Default: Empty.
       
   150 *
       
   151 *  iRemoveInvalidChars         
       
   152 *                  - Information whether the invalid characters should be 
       
   153 *                    removed from telephone number before dial or not.
       
   154 *                    Default: EFalse.
       
   155 *
       
   156 *  iContactItemField         
       
   157 *                  - Contact item field. Tells focused field for address select.
       
   158 *                    Default: NULL.
       
   159 *
       
   160 *  @since 2.6
       
   161 */
       
   162 class TAiwDialDataV1
       
   163     {          
       
   164     public:  // Constructors and destructor
       
   165 
       
   166         /**
       
   167         * Construct a dial data package
       
   168         */
       
   169         inline TAiwDialDataV1();
       
   170 
       
   171 
       
   172     public:  // Reset
       
   173 
       
   174         /**
       
   175         * Reset, i.e. set the default values as in constructor. 
       
   176         */
       
   177         inline void Reset();
       
   178 
       
   179 
       
   180     public: // Access - Setters
       
   181 
       
   182         /**
       
   183         * Set the number of the person to be called.
       
   184         * This is mandatory.
       
   185         *
       
   186         * @param aNumber The number of the person being called.
       
   187         */
       
   188         inline void SetTelephoneNumber( 
       
   189             const TAiwTelephoneNumber& aNumber );
       
   190 
       
   191         /**
       
   192         * Set the call type. Default: EPhCltVoice.
       
   193         *
       
   194         * @param aCallType The call type.
       
   195         */
       
   196         inline void SetCallType( TAiwCallType aCallType );
       
   197 
       
   198         /**
       
   199         * Set the name of the person who is to be called.
       
   200         *
       
   201         * @param aName The name of the person being called.
       
   202         */
       
   203         inline void SetName( const TAiwNameBuffer& aName );
       
   204 
       
   205         /**
       
   206         * Set the number type. 
       
   207         * 
       
   208         * See PbkFields.hrh. Only phone number fields are supported.
       
   209         *
       
   210         * @param aNumberType The number type.
       
   211         */
       
   212         inline void SetNumberType( TInt aNumberType );
       
   213 
       
   214         /**
       
   215         * Set the contact Id of the person being called.
       
   216         *
       
   217         * @param aContactId The contacts model contact id of the person being
       
   218         *                   called.
       
   219         */
       
   220         inline void SetContactId( TAiwContactId aContactId );
       
   221 
       
   222         /**
       
   223         * Set the window group of requesting application.
       
   224         *
       
   225         * @param aWindowGroupId The window group identifier.
       
   226         */
       
   227         inline void SetWindowGroup( TInt aWindowGroupId );
       
   228 
       
   229         /**
       
   230         * Set the number visibility in the phone app.
       
   231         *
       
   232         * If this is set to EFalse, then number is not shown or written to 
       
   233         * log event.
       
   234         *
       
   235         * @param aShowNumber Whether or not to show the number.
       
   236         */
       
   237         inline void SetShowNumber( TBool aShowNumber );
       
   238 
       
   239         /**
       
   240         * Change the redial mode.
       
   241         *
       
   242         * @param aRedial The new redial status
       
   243         */
       
   244         inline void SetRedial( TInt aRedial );
       
   245 
       
   246         /**
       
   247         * Set whether the name entered in SetName should be matched
       
   248         * against the personal directory (=phonebook).
       
   249         *
       
   250         * This should be set EFalse only if phone number has not been
       
   251         * taken from phonebook.
       
   252         *
       
   253         * @param aAllowMatch Whether to allow matches.
       
   254         */
       
   255         inline void SetAllowMatch( TBool aAllowMatch );
       
   256 
       
   257         /**
       
   258         * Set parameter for end other calls. 
       
   259         * 
       
   260         * If this is set to ETrue, other calls will be terminated before
       
   261         * dial.
       
   262         *
       
   263         * @param aEndCalls Are the other calls ended.
       
   264         */
       
   265         inline void SetEndOtherCalls( TBool aEndCalls );
       
   266 
       
   267         /**
       
   268         * Set whether this is known to be an emergency call or not.
       
   269         * If this function is not called, it is assumed that the call
       
   270         * is not an emergency call. However, in Phone application side it is 
       
   271         * checked whether the call actually is an emergency call or not before 
       
   272         * dialing.
       
   273         *
       
   274         * @param aEmergency 
       
   275         *        ETrue if the call is known to be an emergency call.
       
   276         *        EFalse if the call is not known to be an emergency call
       
   277         *        (default).
       
   278         */
       
   279         inline void SetEmergency( TBool aEmergency );
       
   280 
       
   281         /**
       
   282         * Set the calling party subaddress.
       
   283         * Defined in ITU-T I.330 and 3GPP TS 11.14.
       
   284         *
       
   285         * @param aSubAddress The calling party subaddress.
       
   286         */
       
   287         inline void SetSubAddress( const TAiwSubAddress& aSubAddress );
       
   288 
       
   289         /**
       
   290         * Set whether this is a SAT originated call or not.
       
   291         * If this function is not called, the originator is assumed to 
       
   292         * be other than SAT.
       
   293         *
       
   294         * @param aSATCall ETrue if SAT originated the call, EFalse otherwise.
       
   295         */
       
   296         inline void SetSATCall( TBool aSATCall );
       
   297 
       
   298         /**
       
   299         * Set the bearer capability.
       
   300         *
       
   301         * @param aBearer The bearer capabilities as defined in GSM 04.08.
       
   302         */
       
   303         inline void SetBearer( const TAiwBearerCapability& aBearer );
       
   304 
       
   305         /**
       
   306         * Set whether invalid characters should be removed before dial or not.
       
   307         *
       
   308         * @param aRemoveInvalidChars ETrue if invalid characters must be 
       
   309         *                            removed before dial, EFalse otherwise.
       
   310         */
       
   311         inline void SetRemoveInvalidChars( TBool aRemoveInvalidChars );
       
   312 
       
   313         /**
       
   314         * Set contact item field used in address selectors
       
   315         *
       
   316         * @since 3.0
       
   317         *
       
   318         * @param aContactItemField Contact item field information.
       
   319         */
       
   320         inline void SetContactItemField( const TAiwContactItemField& aContactItemField );
       
   321 /*<branchInfo originator="janneluo" since="07-04-10" category="new_feature" error=”none”>
       
   322 <MCSS_5132_OFF_CYCLE_SW_INT>
       
   323 </branchInfo>*/
       
   324 // BRANCH 07-04-10 :janneluo
       
   325         /**
       
   326         * Sets the service id.
       
   327         *
       
   328         * @since 3.2
       
   329         * 
       
   330         * @param aServiceId the service ID to be used when dialing.
       
   331         */
       
   332         inline void SetServiceId( TUint aServiceId );
       
   333 // BRANCH_END 07-04-10 :janneluo
       
   334 
       
   335     public: // Access - Getters
       
   336 
       
   337         /** 
       
   338         * Telephone number
       
   339         * 
       
   340         * @return Returns the telephone number.
       
   341         */
       
   342         inline const TAiwTelephoneNumber& TelephoneNumber() const;
       
   343 
       
   344         /** 
       
   345         * Call type.
       
   346         *
       
   347         * @return Return the call type.
       
   348         */
       
   349         inline TAiwCallType CallType() const;
       
   350 
       
   351         /** 
       
   352         * Name
       
   353         * 
       
   354         * @return Return the name of the recipient.
       
   355         */
       
   356         inline const TAiwNameBuffer& Name() const;
       
   357 
       
   358         /** 
       
   359         * Number type.
       
   360         *
       
   361         * @return Return the number type.
       
   362         */
       
   363         inline TInt NumberType() const;
       
   364 
       
   365         /** 
       
   366         * Contact ID
       
   367         * 
       
   368         * @return Returns the contact id or KPhCltNoContact if none specified.
       
   369         */
       
   370         inline TAiwContactId ContactId() const;
       
   371 
       
   372         /**
       
   373         * Return the window group id. 
       
   374         *
       
   375         * @return Returns KPhCltGoToIdle if no id has previously been specified.
       
   376         */
       
   377         inline TInt WindowGroupId() const;
       
   378 
       
   379         /** 
       
   380         * Redial information.
       
   381         * 
       
   382         * @return Return the redial status,
       
   383         */
       
   384         inline TInt Redial() const;
       
   385 
       
   386         /** 
       
   387         * Number showing.
       
   388         * 
       
   389         * @return Returns the number visibility.
       
   390         */
       
   391         inline TBool ShowNumber() const;
       
   392 
       
   393         /** 
       
   394         * Is match allowed.
       
   395         * 
       
   396         * @return Returns the allow match setting.
       
   397         */
       
   398         inline TBool AllowMatch() const;
       
   399 
       
   400         /** 
       
   401         * End other calls
       
   402         * 
       
   403         * @return Returns ETrue if other calls should be ended before dial.
       
   404         */
       
   405         inline TBool EndOtherCalls() const;
       
   406 
       
   407         /** 
       
   408         * Emergency status (is emergency call or not).
       
   409         * 
       
   410         * @return Returns ETrue if the call is emergency call.
       
   411         *                 EFalse if the call is not emergency call.
       
   412         */
       
   413         inline TBool Emergency() const;
       
   414 
       
   415         /** 
       
   416         * Calling party subaddress.
       
   417         * 
       
   418         * @return Returns the calling party subaddress.
       
   419         */
       
   420         inline const TAiwSubAddress& SubAddress() const;
       
   421 
       
   422         /** 
       
   423         * SAT call information.
       
   424         * 
       
   425         * @return Returns ETrue if SAT is the originator of the call.
       
   426         *                 EFalse otherwise.
       
   427         */
       
   428         inline TBool SATCall() const;
       
   429 
       
   430         /** 
       
   431         * Bearer capability.
       
   432         * 
       
   433         * @return Returns the bearer capabilities as defined in GSM 04.08.
       
   434         */
       
   435         inline const TAiwBearerCapability& Bearer() const;
       
   436 
       
   437         /** 
       
   438         * Character removal information.
       
   439         * 
       
   440         * @return Returns ETrue if invalid characters will be removed.
       
   441         *                 EFalse otherwise.
       
   442         */
       
   443         inline TBool RemoveInvalidChars() const;
       
   444 
       
   445         /** 
       
   446         * Contact item field
       
   447         * 
       
   448         * @return Returns the contact item field or NULL if not specified.
       
   449         */
       
   450         inline const TAiwContactItemField* ContactItemField() const;
       
   451 
       
   452 /*<branchInfo originator="janneluo" since="07-04-10" category="new_feature" error=”none”>
       
   453 <MCSS_5132_OFF_CYCLE_SW_INT>
       
   454 </branchInfo>*/
       
   455 // BRANCH 07-04-10 :janneluo
       
   456         /**
       
   457         * Service id.
       
   458         *
       
   459         * @return the service ID to be used when dialing.
       
   460         */
       
   461         inline TUint ServiceId( ) const;
       
   462 // BRANCH_END 07-04-10 :janneluo
       
   463 
       
   464 
       
   465     private:    // Data
       
   466 
       
   467         // Telephony number storage. MUST.
       
   468         TAiwTelephoneNumber       iTelNumber;
       
   469         
       
   470         // Call type.
       
   471         TAiwCallType              iCallType;
       
   472 
       
   473         // The name information storage.
       
   474         TAiwNameBuffer            iName;
       
   475 
       
   476         // The number type information storage.
       
   477         TInt                      iNumberType;
       
   478 
       
   479         // The contact ID storage.
       
   480         TAiwContactId             iContactId;
       
   481 
       
   482         // The window group identifier storage.
       
   483         TInt                      iWindowGroup;
       
   484 
       
   485         // The new redial status storage.
       
   486         TInt                      iRedial;
       
   487 
       
   488         // The number visibility information storage.
       
   489         TBool                     iShowNumber;
       
   490 
       
   491         // Allow match information storage.
       
   492         TBool                     iAllowMatch;
       
   493 
       
   494         // Information storage of the other call termination.
       
   495         TBool                     iEndOtherCalls;
       
   496 
       
   497         // The emergency call information.
       
   498         TBool                     iEmergencyCall;
       
   499 
       
   500         // The calling party subaddress.
       
   501         TAiwSubAddress            iSubAddress;
       
   502 
       
   503         // The information whether this is SAT originated call or not.
       
   504         TBool                     iSATCall;
       
   505 
       
   506         // The bearer capability.
       
   507         TAiwBearerCapability      iBearer;
       
   508 
       
   509         // Information if the not allowed characters should be removed 
       
   510         // before call from the telephony number.
       
   511         TBool                     iRemoveInvalidChars;
       
   512 
       
   513         // Contact item field
       
   514         const TAiwContactItemField*     iContactItemField;
       
   515 
       
   516 /*<branchInfo originator="janneluo" since="07-04-10" category="new_feature" error=”none”>
       
   517 <MCSS_5132_OFF_CYCLE_SW_INT>
       
   518 </branchInfo>*/
       
   519 // BRANCH 07-04-10 :janneluo
       
   520         // The service ID for dialing.
       
   521         TUint                      iServiceId;
       
   522 // BRANCH_END 07-04-10 :janneluo
       
   523     };
       
   524 
       
   525 
       
   526 // DATA TYPES
       
   527 
       
   528 // A typedef'd packaged TAiwDialDataV1 for passing through a generic 
       
   529 // API function member. 
       
   530 typedef TPckgC< TAiwDialDataV1 >  TAiwDialDataV1Pckg;
       
   531 
       
   532 
       
   533 // Inline methods
       
   534 #include    <aiwdialdatatypes.inl>
       
   535 
       
   536 
       
   537 #endif // AIWDIALDATATYPES_H
       
   538             
       
   539 // End of File