omaprovisioning/provisioning/accesspointadapter/Inc/CWPAPAdapter.h
branchRCL_3
changeset 25 b183ec05bd8c
parent 24 13d7c31c74e0
child 26 19bba8228ff0
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
     1 /*
       
     2 * Copyright (c) 2002 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:    Main class for handling provisioning accesspoint data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CWPAPADAPTER_H
       
    21 #define CWPAPADAPTER_H
       
    22 
       
    23 // INCLUDES
       
    24 
       
    25 #include <CWPAdapter.h>
       
    26 #include <MWPContextExtension.h>
       
    27 #include <cmmanagerext.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class CWPAPAccesspointItem;
       
    32 class CCommsDatabase;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * CWPAPAdapter handles accesspoint settings.
       
    38  */ 
       
    39 class CWPAPAdapter : public CWPAdapter, public MWPContextExtension
       
    40 	{
       
    41 	public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor.
       
    45 		* @return a instance of class.
       
    46         */
       
    47 		static CWPAPAdapter* NewL();
       
    48 
       
    49 		/**
       
    50 		* Destructor
       
    51 		*/
       
    52 		~CWPAPAdapter();
       
    53 
       
    54 	public: // From CWPAdapter
       
    55 
       
    56 		TInt ItemCount() const;
       
    57 		const TDesC16& SummaryTitle(TInt aIndex) const;
       
    58 		const TDesC16& SummaryText(TInt aIndex) const;
       
    59 		TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor );
       
    60 		void SaveL( TInt aItem );
       
    61 		TBool CanSetAsDefault( TInt aItem ) const;
       
    62 		void SetAsDefaultL( TInt aItem );
       
    63 		void VisitL(CWPCharacteristic& aElement);
       
    64 		void VisitL(CWPParameter& aElement);
       
    65 		void VisitLinkL(CWPCharacteristic& aCharacteristic );
       
    66 		TInt ContextExtension( MWPContextExtension*& );
       
    67 
       
    68 	public: // From MWPContextExtension
       
    69 
       
    70 		const TDesC8& SaveDataL( TInt aIndex ) const;
       
    71 		void DeleteL( const TDesC8& aSaveData );
       
    72         TUint32 Uid() const;
       
    73 
       
    74 	private:  // New functions
       
    75 
       
    76         /**
       
    77         * C++ default constructor.
       
    78         */
       
    79 		CWPAPAdapter();
       
    80 
       
    81         /**
       
    82         * By default Symbian 2nd phase constructor is private.
       
    83         */
       
    84 		void ConstructL();
       
    85 
       
    86 		/**
       
    87 		* Check whether this characteristic is already linked.
       
    88 		* @param aCharacteristic characteristic to compare.
       
    89 		* @return ETrue if link to given characteristic was found.
       
    90 		*/
       
    91 		TBool IsAlreadyLinked( CWPCharacteristic& aCharacteristic );
       
    92 
       
    93 	private: // Data
       
    94 
       
    95 		/// Array of linked NAPDEF and PXLOGICAL characteristics. Refs.
       
    96 		RPointerArray<CWPCharacteristic> iLinks;
       
    97 		/// Array of data items for memory management. Owns.
       
    98 		RPointerArray<CBase> iDataItems;
       
    99         /// Array of save items. Owns.
       
   100         RPointerArray<CWPAPAccesspointItem> iSaveItems;
       
   101 		/// Pointer to commsdatabase used in saving. Owns.
       
   102 		CCommsDatabase* iCommsDb;
       
   103 		/// Summary title. Owns.
       
   104 		HBufC* iTitle;
       
   105         /// Default name. Owns.
       
   106         HBufC* iDefaultName;
       
   107 		/// Indicates whether these settings are already saved.
       
   108 		TBool iAlreadySavedOnce;
       
   109 		// CMManager for managing connection methods
       
   110 		RCmManagerExt* iCmManager;
       
   111 	  RArray<TInt> iAPValue;
       
   112 
       
   113 	private: // For testing.
       
   114 		friend class T_CWPAPAdapter;
       
   115 	};
       
   116 
       
   117 #endif	// CWPAPADAPTER_H
       
   118             
       
   119 // End of File