calendarui/caldav/inc/caldavsettingitems.h
branchRCL_3
changeset 86 ed599363c2d7
parent 78 356f28cd5ca0
child 87 6d3f83773253
equal deleted inserted replaced
78:356f28cd5ca0 86:ed599363c2d7
     1 /*
       
     2 * Copyright (c) 2010 Sun Microsystems, Inc. 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 Contributor:
       
    10 * Maximilian Odendahl
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description: Caldav setting items
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SETTINGITEMS_H
       
    19 #define SETTINGITEMS_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24  
       
    25 #include <aknsettingitemlist.h>
       
    26 
       
    27 class CCalDavSession;
       
    28 
       
    29 class CCalDavTextSettingItem : public CAknTextSettingItem
       
    30     {
       
    31     public:
       
    32         
       
    33         static CCalDavTextSettingItem* NewL(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
    34         static CCalDavTextSettingItem* NewLC(TInt aId,CCalDavSession* aSession, const TDesC &aCalendar);
       
    35         ~CCalDavTextSettingItem();
       
    36         
       
    37         void SetEnableSettingItem(CAknSettingItem* aItem);
       
    38         
       
    39     private:
       
    40     	CCalDavTextSettingItem(TInt aId, CCalDavSession* aSession);
       
    41         
       
    42         void ConstructL(const TDesC &aCalendar);
       
    43    
       
    44     protected:// From base classes
       
    45         void EditItemL( TBool aCalledFromMenu );
       
    46         virtual void StoreL();
       
    47         virtual void LoadL();
       
    48            
       
    49     private:
       
    50     	TBuf<500> iInternalValue;
       
    51     	CCalDavSession* iSession;
       
    52     	HBufC* 	iCalendar;
       
    53     	CAknSettingItem* iEnableSettingItem;	// not owned
       
    54     };
       
    55 
       
    56 class CCalDavPasswordSettingItem : public CAknPasswordSettingItem
       
    57     {
       
    58     public:
       
    59         
       
    60         static CCalDavPasswordSettingItem* NewL(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
    61         static CCalDavPasswordSettingItem* NewLC(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
    62         ~CCalDavPasswordSettingItem();
       
    63         
       
    64         void SetEnableSettingItem(CAknSettingItem* aItem);
       
    65         
       
    66     private:
       
    67     	CCalDavPasswordSettingItem(TInt aId, CCalDavSession* aSession);
       
    68         
       
    69         void ConstructL(const TDesC &aCalendar);
       
    70    
       
    71     protected:// From base classes
       
    72         void EditItemL( TBool aCalledFromMenu );
       
    73         virtual void StoreL();
       
    74         virtual void LoadL();
       
    75            
       
    76     private:
       
    77     	TBuf<500> iInternalValue;
       
    78     	CCalDavSession* iSession;
       
    79     	HBufC* 	iCalendar;
       
    80     	CAknSettingItem* iEnableSettingItem;	// not owned
       
    81     };
       
    82 
       
    83 class CCalDavBooleanSettingItem : public CAknBinaryPopupSettingItem
       
    84     {
       
    85     public:
       
    86 			
       
    87         static CCalDavBooleanSettingItem* NewL(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
    88         static CCalDavBooleanSettingItem* NewLC(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
    89         ~CCalDavBooleanSettingItem();
       
    90         
       
    91     private:
       
    92     	CCalDavBooleanSettingItem(TInt aId, CCalDavSession* aSession);
       
    93         
       
    94         void ConstructL(const TDesC &aCalendar);
       
    95    
       
    96     protected:// From base classes
       
    97         void EditItemL( TBool aCalledFromMenu );
       
    98         virtual void StoreL();
       
    99         virtual void LoadL();
       
   100            
       
   101     private:
       
   102     	TBool iInternalValue;
       
   103     	CCalDavSession* iSession;
       
   104     	HBufC* 	iCalendar;
       
   105     };
       
   106 
       
   107 class CCalDavEnumeratedTextSettingItem : public CAknEnumeratedTextPopupSettingItem
       
   108     {
       
   109     public:
       
   110 			
       
   111         static CCalDavEnumeratedTextSettingItem* NewL(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
   112         static CCalDavEnumeratedTextSettingItem* NewLC(TInt aId, CCalDavSession* aSession, const TDesC &aCalendar);
       
   113         ~CCalDavEnumeratedTextSettingItem();
       
   114         
       
   115     private:
       
   116     	CCalDavEnumeratedTextSettingItem(TInt aId, CCalDavSession* aSession);
       
   117         
       
   118         void ConstructL(const TDesC &aCalendar);
       
   119    
       
   120     protected:// From base classes
       
   121         void EditItemL( TBool aCalledFromMenu );
       
   122         virtual void StoreL();
       
   123         virtual void LoadL();
       
   124            
       
   125     private:
       
   126     	TInt iInternalValue;
       
   127     	CCalDavSession* iSession;
       
   128     	HBufC* 	iCalendar;
       
   129     };
       
   130 
       
   131 class CCalDavAccessPointSettingItem : public CAknSettingItem
       
   132     	{
       
   133     	public:
       
   134             static CCalDavAccessPointSettingItem*
       
   135              CCalDavAccessPointSettingItem::NewL( TInt aSettingId, CCalDavSession* aSession, const TDesC &aCalendar);
       
   136      	    ~CCalDavAccessPointSettingItem();
       
   137      	private:
       
   138      	    CCalDavAccessPointSettingItem ( TInt aSettingId, CCalDavSession* aSession);
       
   139      	    void ConstructL(const TDesC &aCalendar);
       
   140      
       
   141      
       
   142      	protected:	// from CAknSettingItem
       
   143      		void EditItemL( TBool aCalledFromMenu );
       
   144      		virtual void StoreL();
       
   145             virtual void LoadL();
       
   146             
       
   147      		const TDesC& SettingTextL();
       
   148      
       
   149      	private:
       
   150      	    TBool EditAccessPointItemL();
       
   151      
       
   152          private:
       
   153              HBufC* iSettingText;
       
   154          	CCalDavSession* iSession;
       
   155      	};
       
   156 
       
   157 
       
   158 #endif // SETTINGITEMS_H