homesync/contentmanager/mediaservant/inc/msruleserverssetting.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 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:  CMSRuleServersSetting class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MSRULESERVERSSETTING_H
       
    20 #define C_MSRULESERVERSSETTING_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "mssettingitems.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CSelectionItemList;
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  * CMSRuleServersSetting class. This class is used when
       
    33  * server list is modified
       
    34  *
       
    35  *
       
    36  * @Since S60 5.1
       
    37 */
       
    38 NONSHARABLE_CLASS( CMSRuleServersSetting ): public CMSTextSettingItem
       
    39     {
       
    40     public:
       
    41 
       
    42         /**
       
    43          * Two-phased constructor.
       
    44          *
       
    45          * @Since S60 5.1
       
    46          * @param aIdentifier, setting resource id
       
    47          * @param aText, dummy text - needed on creation
       
    48          * @param aDefaultItemTextResource
       
    49          * @param aSecondaryTextResource, resource id for
       
    50          *                                text 'no items' case
       
    51          */
       
    52         static CMSRuleServersSetting* NewL( TInt aIdentifier,
       
    53                                       CSelectionItemList& aServerList,
       
    54                                       TDes& aText,
       
    55                                       TInt aSecondaryTextResource );
       
    56 
       
    57         /**
       
    58          * Two-phased constructor.
       
    59          *
       
    60          * @Since S60 5.1
       
    61          * @param aIdentifier, setting resource id
       
    62          * @param aText, dummy text - needed on creation
       
    63          * @param aDefaultItemTextResource
       
    64          * @param aSecondaryTextResource, resource id for
       
    65          *                                text 'no items' case
       
    66          */
       
    67         static CMSRuleServersSetting* NewLC( TInt aIdentifier,
       
    68                                       CSelectionItemList& aServerList,
       
    69                                       TDes& aText,
       
    70                                       TInt aSecondaryTextResource );
       
    71                                       
       
    72         /**
       
    73         * Destructor.
       
    74         */
       
    75         virtual ~CMSRuleServersSetting();
       
    76 
       
    77         /**
       
    78          * ConstructL
       
    79          * Second phase constructor.
       
    80          */
       
    81         void ConstructL();
       
    82 
       
    83     protected: // From CAknSettingItem
       
    84 
       
    85         /**
       
    86         * This method activates the transfer "setting page"
       
    87         */
       
    88         void EditItemL( TBool aCalledFromMenu );
       
    89 
       
    90     protected: // New functions
       
    91 
       
    92         /**
       
    93          * Counts selected items
       
    94          * @since S60 3.1
       
    95          * @return TInt, item count
       
    96          */
       
    97         TInt CountSelectedItems();
       
    98 
       
    99         /**
       
   100          * Sets setting item secondary text according to selected devices
       
   101          * @since S60 3.1
       
   102          */
       
   103         void SetSettingItemTextL();
       
   104 
       
   105     protected:
       
   106 
       
   107         /**
       
   108          * Constructor.
       
   109          */
       
   110         CMSRuleServersSetting(
       
   111             TInt aIdentifier,
       
   112             CSelectionItemList& aServerList,
       
   113             TDes& aText,
       
   114             TInt aSecondaryTextResource
       
   115             );
       
   116 
       
   117     protected:
       
   118         /**
       
   119          * Server name string
       
   120          */
       
   121         TDesC&                              iText;
       
   122         /**
       
   123          * setting page item array (servers)
       
   124          */
       
   125         CSelectionItemList&                 iItemArray;
       
   126         /**
       
   127          * Server name string (external set)
       
   128          */
       
   129         HBufC16*                            iSettingText;           // owned
       
   130         /**
       
   131          * Selected item count
       
   132          */
       
   133         TInt                                iSelectedItemCount;
       
   134         /**
       
   135          * Default item secondary text resource
       
   136          */
       
   137         TInt                                iSecondaryTextResource;
       
   138     };
       
   139 
       
   140 #endif // C_MSRULESERVERSSETTING_H
       
   141 
       
   142 // End of File