phonebookui/Phonebook2/NamesListExtension/inc/Pbk2NlxMenuFiltering.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Phonebook 2 menu filtering helper.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PBK2NLXMENUFILTERING_H
       
    20 #define PBK2NLXMENUFILTERING_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 // FORWARD
       
    25 class MPbk2ContactUiControl;
       
    26 
       
    27 // CLASS DECLARATIONS
       
    28 /**
       
    29  * Helper functions to define current context for Options
       
    30  * and stylus popup menus. Takes into account markable contacts as well.
       
    31  * The class uses Pbk2AppUi() to access current store configuration.
       
    32  * 
       
    33  */
       
    34 class Pbk2NlxMenuFiltering
       
    35     {
       
    36 public:
       
    37     /**
       
    38      * @param aControl current ui control
       
    39      * @return ETrue if open (in CCA) command can be executed in the current context
       
    40      */
       
    41     static TBool OpenReady( MPbk2ContactUiControl& aControl );
       
    42     
       
    43     /**
       
    44      * @param aControl current ui control 
       
    45      * @return ETrue if add to favorites command item is selected
       
    46      */
       
    47     static TBool AddToFavoritesCmdSelected( MPbk2ContactUiControl& aControl );
       
    48     
       
    49     /**
       
    50      * @param aControl current ui control 
       
    51      * @return ETrue if open MyCard or Create MyCard command item is selected
       
    52      */
       
    53     static TBool MyCardCmdSelected( MPbk2ContactUiControl& aControl );
       
    54 
       
    55     
       
    56     /** 
       
    57      * @param aControl current ui control 
       
    58      * @return ETrue if Ssearch from remote command item is selected
       
    59      */
       
    60     static TBool RclCmdSelectOptSelected( MPbk2ContactUiControl& aControl );    
       
    61     
       
    62     /**
       
    63      * @param aControl current ui control 
       
    64      * @return ETrue if read only contact is selected
       
    65      */
       
    66     static TBool ReadOnlyContactSelectedL( MPbk2ContactUiControl& aControl );
       
    67 
       
    68     /**
       
    69      * @param aControl current ui control 
       
    70      * @return ETrue if current contact and context allows adding to top contacts
       
    71      */
       
    72     static TBool TopReadyL( MPbk2ContactUiControl& aControl );
       
    73     
       
    74     /**
       
    75      * @param aControl current ui control 
       
    76      * @return ETrue if top contact is selected
       
    77      */
       
    78     static TBool TopContactSelectedL( MPbk2ContactUiControl& aControl );
       
    79 
       
    80     /**
       
    81      * @param aControl current ui control 
       
    82      * @return ETrue if non top contact is selected
       
    83      */
       
    84     static TBool NonTopContactSelectedL( MPbk2ContactUiControl& aControl );
       
    85     
       
    86     /**
       
    87      * @param aControl current ui control 
       
    88      * @return ETrue if command item is selected and no item makred
       
    89      */
       
    90     static TBool TopRearrangingReadyL( MPbk2ContactUiControl& aControl );
       
    91     
       
    92     /**
       
    93      * @param aControl current ui control
       
    94      * @return  ETrue if at least one top contact marked
       
    95      */
       
    96     static TBool TopContactMarkedL( MPbk2ContactUiControl& aControl );
       
    97 
       
    98     /**
       
    99      * @param aControl current ui control 
       
   100      * @return  ETrue if at least one non top contact marked 
       
   101      */
       
   102     static TBool NonTopContactMarkedL( MPbk2ContactUiControl& aControl );
       
   103     
       
   104     /**
       
   105      * @param aControl current ui control 
       
   106      * @return ETrue if marked contacts includes at least one non-readonly contact 
       
   107      */
       
   108     static TBool CheckDeletableInMarkedContactsL( MPbk2ContactUiControl& aControl );
       
   109     };
       
   110 
       
   111 #endif // PBK2NLXMENUFILTERING_H
       
   112 
       
   113 // End of File