natfw/natfwicecandidatehandler/inc/cicecheckprioritizer.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:    Provides services for check prioritization.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_NATFWCHECKPRIORITIZER_H
       
    22 #define C_NATFWCHECKPRIORITIZER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include "natfwconnectivityapidefs.h"
       
    26 #include "natfwinternaldefs.h"    //UNIT_TEST
       
    27 
       
    28 class CIceConnectivityCheck;
       
    29 class CNATFWCandidatePair;
       
    30 
       
    31 /**
       
    32  *  Provides services for check prioritization.
       
    33  *
       
    34  *  @lib icecandidatehandler.dll
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 class CIceCheckPrioritizer : public CBase
       
    38     {
       
    39 
       
    40     UNIT_TEST( UT_CIceCheckPrioritizer )
       
    41     
       
    42 public:
       
    43 
       
    44     static CIceCheckPrioritizer* NewL();
       
    45 
       
    46     static CIceCheckPrioritizer* NewLC();
       
    47 
       
    48     /**
       
    49      * Destructor.
       
    50      */
       
    51     virtual ~CIceCheckPrioritizer();
       
    52 
       
    53     /**
       
    54      * Calculates priority for a candidate pair.
       
    55      *
       
    56      * @since   S60 v3.2
       
    57      * @param   aPair           The pair to prioritize
       
    58      * @param   aCurrentRole    The role of local agent
       
    59      */
       
    60     void PrioritizePair( CNATFWCandidatePair& aPair,
       
    61         TNATFWIceRole aCurrentRole ) const;
       
    62     
       
    63     /**
       
    64      * Calculates priorities for connectivity checks.
       
    65      *
       
    66      * @since   S60 v3.2
       
    67      * @param   aPairs          Pairs to prioritize
       
    68      * @param   aCurrentRole    The role of local agent
       
    69      */
       
    70     void PrioritizePairs( 
       
    71         RPointerArray<CNATFWCandidatePair>& aPairs,
       
    72         TNATFWIceRole aCurrentRole ) const;
       
    73     
       
    74     /**
       
    75      * Calculates priority for a connectivity check.
       
    76      *
       
    77      * @since   S60 v3.2
       
    78      * @param   aCheck          The check to prioritize
       
    79      * @param   aCurrentRole    The role of local agent
       
    80      */
       
    81     void PrioritizeCheck( CIceConnectivityCheck& aCheck,
       
    82         TNATFWIceRole aCurrentRole ) const;
       
    83     
       
    84     /**
       
    85      * Calculates priorities for connectivity checks.
       
    86      *
       
    87      * @since   S60 v3.2
       
    88      * @param   aChecks         Checks to prioritize
       
    89      * @param   aCurrentRole    The role of local agent
       
    90      */
       
    91     void PrioritizeChecks( 
       
    92         RPointerArray<CIceConnectivityCheck>& aChecks,
       
    93         TNATFWIceRole aCurrentRole ) const;
       
    94 
       
    95 private:
       
    96 
       
    97     CIceCheckPrioritizer();
       
    98 
       
    99     };
       
   100 
       
   101 #endif // C_NATFWCHECKPRIORITIZER_H