omaprovisioning/provisioning/IMAdapter/Inc/CWPIMAdapter.h
changeset 73 ae69c2e8bc34
parent 71 d2517372cc44
child 77 9f85c58c0592
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
     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: 
       
    15 *     Handles wireless village settings in provisioning.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CWPIMADAPTER_H
       
    21 #define CWPIMADAPTER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <CWPAdapter.h>
       
    25 #include <MWPContextExtension.h>
       
    26 #include <impssapsettings.h>
       
    27 #include "WPIMUtil.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CWPCharacteristic;
       
    31 class CWPIMSAPItem;
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * CWPIMAdapter handles wireless village settings.
       
    38  *
       
    39  * @lib WPIMAdapter
       
    40  * @since 2.0
       
    41  */ 
       
    42 class CWPIMAdapter : public CWPAdapter, private MWPContextExtension
       
    43 	{
       
    44 	public: // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49 		static CWPIMAdapter* NewL();
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54 		virtual ~CWPIMAdapter();
       
    55         
       
    56     public : // from CWPAdapter
       
    57         
       
    58         TInt ItemCount() const;
       
    59         const TDesC16& SummaryTitle(TInt aIndex) const;
       
    60 		const TDesC16& SummaryText(TInt aIndex) const;
       
    61         void SaveL( TInt aItem );
       
    62         TBool CanSetAsDefault( TInt aItem ) const;
       
    63         void SetAsDefaultL( TInt aItem );
       
    64         TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor );
       
    65         void VisitL(CWPCharacteristic& aElement);		
       
    66 		void VisitL(CWPParameter& aElement);		
       
    67 		void VisitLinkL(CWPCharacteristic& aLink );
       
    68         TInt ContextExtension( MWPContextExtension*& aExtension );
       
    69 
       
    70     public: // from MWPContextExtension
       
    71         const TDesC8& SaveDataL( TInt aIndex ) const;
       
    72         void DeleteL( const TDesC8& aSaveData );
       
    73 		TUint32 Uid() const;
       
    74 
       
    75 	private:  // New functions
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         */
       
    80 		CWPIMAdapter();
       
    81 
       
    82         /**
       
    83         * By default Symbian 2nd phase constructor is private.
       
    84         */
       
    85 		void ConstructL();
       
    86         
       
    87 	private:  // Data
       
    88         
       
    89         // The application id of the current characteristic
       
    90         TPtrC iAppID;
       
    91 
       
    92         // Current data, owns.
       
    93 		TData* iCurrentData;
       
    94 
       
    95         // The settings items, owns.
       
    96 		RPointerArray<TData> iDatas;
       
    97 
       
    98         // Default name for service access point, owns.
       
    99 		HBufC* iDefaultName;
       
   100 
       
   101         // Title for wireless village settings, owns.
       
   102         HBufC* iWVTitle;
       
   103 
       
   104         // Id of SAP item to be set as default
       
   105         TUint32 iSAPIdForDefault;
       
   106 
       
   107     private: // for testing purpose
       
   108         friend class T_CWPIMAdapter;
       
   109 	};
       
   110 
       
   111 #endif	// CWPIMADAPTER_H
       
   112             
       
   113 // End of File