idlefw/inc/utility/aipluginsettingsitemimpl.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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 #ifndef C_AIPLUGINSETTINGSITEMIMPL_H
       
    20 #define C_AIPLUGINSETTINGSITEMIMPL_H
       
    21 
       
    22 #include "aipluginsettings.h"
       
    23 
       
    24 /**
       
    25  * Implementation of Active Idle framework settings item interface.
       
    26  *
       
    27  * @lib ?library
       
    28  * @since S60 3.2
       
    29  */
       
    30 NONSHARABLE_CLASS(CAiPluginSettingsItem) : public CBase, public MAiPluginSettingsItem,
       
    31     public MAiPluginContentItem, public MAiPluginConfigurationItem 
       
    32     {
       
    33 public:   // Constructors and destructor
       
    34 
       
    35     /**
       
    36      * Constructor.
       
    37      */
       
    38     CAiPluginSettingsItem();
       
    39 
       
    40     /**
       
    41      *
       
    42      */
       
    43     void ConstructL();
       
    44 
       
    45     /**
       
    46      * Destructor.
       
    47      */
       
    48     ~CAiPluginSettingsItem();
       
    49 
       
    50 public:  // From MAiPluginSettingsItem
       
    51 
       
    52     /**
       
    53      * Get a pointer to the descriptor value of the setting.
       
    54      *
       
    55      * @return returns the value of the setting item.
       
    56      *
       
    57      * @since S60 3.2
       
    58      */
       
    59     TPtrC Value();
       
    60 
       
    61     /**
       
    62      * Sets the setting value.
       
    63      *
       
    64      * @param aValue       the descriptor value for the Setting.
       
    65      * @param aSaveToStore (this parameter is ignored)
       
    66      *
       
    67      * @since S60 3.2
       
    68      */
       
    69     void SetValueL(const TDesC& aValue, TBool aSaveToStore = ETrue);
       
    70 
       
    71     /**
       
    72      * Get publisher uid this setting item belongs to.
       
    73      *
       
    74      * @return publisher uid.
       
    75      *
       
    76      * @since S60 3.2
       
    77      */
       
    78     const TUid& PublisherId() const;
       
    79 
       
    80     /**
       
    81      * Set publisher uid this setting item belongs to.
       
    82      *
       
    83      * @param aUid publisher uid.
       
    84      *
       
    85      * @since S60 3.2
       
    86      */
       
    87     void SetPublisherId(const TUid& aUid);
       
    88 
       
    89     /**
       
    90      * Get setting item key.
       
    91      *
       
    92      * @return key value.
       
    93      *
       
    94      * @since S60 3.2
       
    95      */
       
    96     TInt32 Key() const;
       
    97 
       
    98     /**
       
    99      * Set setting item key.
       
   100      *
       
   101      * @param aKey setting item key.
       
   102      *
       
   103      * @since S60 3.2
       
   104      */
       
   105     void SetKey(TInt32 aKey);
       
   106 
       
   107     /**
       
   108      * Set storer for this setting item.
       
   109      *
       
   110      * @param aStorer pointer to instance of storer interface.
       
   111      *
       
   112      * @since S60 3.2
       
   113      */
       
   114     void SetStorer(MAiPluginSettingsStorer* aStorer);
       
   115 
       
   116     /**
       
   117      * Reads this setting item value from settings store.
       
   118      *
       
   119      * @since S60 3.2
       
   120      */
       
   121     virtual void ReadFromStoreL();
       
   122 
       
   123     /**
       
   124      * Saves this setting item value to settings store.
       
   125      *
       
   126      * @since S60 3.2
       
   127      */
       
   128     virtual void SaveToStoreL();
       
   129 
       
   130 public: //From MAiPluginContentItem
       
   131     
       
   132     TPtrC Name();
       
   133 
       
   134     void SetNameL( const TDesC& aName );
       
   135 
       
   136     TPtrC Type();
       
   137 
       
   138     void SetTypeL( const TDesC& aType );
       
   139     
       
   140 public: //From MAiPluginConfigurationItem
       
   141 
       
   142     TPtrC Owner();
       
   143     
       
   144     void SetOwnerL( const TDesC& aOwner );
       
   145     
       
   146     void SetValueL( const TDesC& aValue );
       
   147 
       
   148 private:     // Data
       
   149 
       
   150     // Setting value.
       
   151     HBufC*                      iValue;
       
   152 
       
   153     // Uid of publisher plugin this setting item belongs to.
       
   154     TUid                        iPublisherId;
       
   155 
       
   156     // Setting item key.
       
   157     TInt32                      iKey;
       
   158 
       
   159     // Settings storer.
       
   160     MAiPluginSettingsStorer*    iStorer;
       
   161 
       
   162     HBufC*                      iName;
       
   163     
       
   164     HBufC*                      iType;
       
   165     
       
   166     HBufC*                      iOwner;
       
   167     };
       
   168 
       
   169 #endif // C_AIPLUGINSETTINGSITEMIMPL_H
       
   170