callcontinuity/vcchotrigger/src/vcchopolicy.cpp
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2007-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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <e32const.h>
       
    21 
       
    22 #include "vcchopolicy.h"
       
    23 
       
    24 // ======== MEMBER FUNCTIONS ========
       
    25 // ---------------------------------------------------------------------------
       
    26 // C++ constructor
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 TVccHoPolicy::TVccHoPolicy()
       
    30     : iPreferredDomain( ECsPreferred ), iAllowedDirection( 0 ),
       
    31       iImmediate( EFalse ), iHeldWaitingCalls( ETrue )
       
    32     {
       
    33     
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // Returns preferred mode
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 TVccHoPolicyPreferredDomain TVccHoPolicy::PreferredDomain() const
       
    41     {
       
    42     return iPreferredDomain;   
       
    43     }
       
    44     
       
    45 // ---------------------------------------------------------------------------
       
    46 // Sets preferred mode
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 void TVccHoPolicy::SetPreferredDomain( 
       
    50     const TVccHoPolicyPreferredDomain& aPreferredDomain ) 
       
    51     {
       
    52     iPreferredDomain = aPreferredDomain;   
       
    53     }
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // Returns allowed direction
       
    57 // ---------------------------------------------------------------------------
       
    58 //    
       
    59 TInt TVccHoPolicy::AllowedDirection() const
       
    60     {
       
    61     return iAllowedDirection;
       
    62     }
       
    63     
       
    64 // ---------------------------------------------------------------------------
       
    65 // Sets allowed direction
       
    66 // ---------------------------------------------------------------------------
       
    67 //    
       
    68 void TVccHoPolicy::SetAllowedDirection( const TInt aAllowedDirection )
       
    69     {
       
    70     iAllowedDirection = aAllowedDirection;
       
    71     }
       
    72     
       
    73 // ---------------------------------------------------------------------------
       
    74 // Returns preferred mode
       
    75 // ---------------------------------------------------------------------------
       
    76 //        
       
    77 TBool TVccHoPolicy::DoImmediateHo() const
       
    78     {
       
    79     return iImmediate;    
       
    80     }
       
    81     
       
    82 // ---------------------------------------------------------------------------
       
    83 // Sets preferred mode
       
    84 // ---------------------------------------------------------------------------
       
    85 //   
       
    86 void TVccHoPolicy::SetDoImmediateHo( const TBool& aImmediate )
       
    87     {
       
    88     iImmediate = aImmediate;
       
    89     }
       
    90     
       
    91 // ---------------------------------------------------------------------------
       
    92 // Returns domain transfer while held waiting calls active in transferring-out
       
    93 // domain.
       
    94 // ---------------------------------------------------------------------------
       
    95 //       
       
    96 TBool TVccHoPolicy::DoHoInHeldWaitingCalls() const
       
    97     {
       
    98     return iHeldWaitingCalls; 
       
    99     }
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // Sets flag for domain transfer while held waiting calls ongoing
       
   103 // ---------------------------------------------------------------------------
       
   104 //   
       
   105 void TVccHoPolicy::SetDoHoInHeldWaitingCalls( const TBool& aHeldWaitingCalls )
       
   106     {
       
   107     iHeldWaitingCalls = aHeldWaitingCalls;
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // Sets flag for domain transfer when cs originated call
       
   112 // ---------------------------------------------------------------------------
       
   113 //   
       
   114 void TVccHoPolicy::SetDtAllowedWhenCsOriginated( 
       
   115         const TBool& aDtAllowedWhenCsOriginated )
       
   116     {
       
   117     iDtAllowedWhenCsOriginated = aDtAllowedWhenCsOriginated;
       
   118     }
       
   119 
       
   120 // ---------------------------------------------------------------------------
       
   121 // Returns is HO allowed when CS originated call
       
   122 // ---------------------------------------------------------------------------
       
   123 //   
       
   124 TBool TVccHoPolicy::DtAllowedWhenCsOriginated() const
       
   125     {
       
   126     return iDtAllowedWhenCsOriginated;
       
   127     }