diff -r 000000000000 -r c8caa15ef882 XDMEngine/XdmProvisioning/inc/xdmprovadapter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/XDMEngine/XdmProvisioning/inc/xdmprovadapter.h Tue Feb 02 01:05:17 2010 +0200 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: XDM OMA Provisioning Adapter class +* +*/ + + + + +#ifndef __XDMPROVADAPTER_H__ +#define __XDMPROVADAPTER_H__ + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CXdmProvItem; +class CWPCharacteristic; + +// CONSTANTS +#ifdef _DEBUG +_LIT( KXdmProvAdapterLogDir, "Xdm" ); +_LIT( KXdmProvAdapterLogFile, "XdmProvAdapter.txt" ); +const TInt KXdmProvAdapterBufferMaxSize = 2000; +#endif + +const TInt KXdmProvIntMaxLength = 10; // max length of 32bit integer + +_LIT8( KXdmProvAppId8, "ap0003" ); +_LIT8( KXdmProvSipIdentifier, "w9010" ); + +// CLASS DECLARATION + +class CXdmProvAdapter : public CWPAdapter + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CXdmProvAdapter* NewL(); + + /** + * Destructor. + */ + ~CXdmProvAdapter(); + +#ifdef _DEBUG + /** + * Writes logs to file. + */ + static void WriteToLog( TRefByValue aFmt,... ); +#endif + + private: // from CWPAdapter + + TInt ItemCount() const; + const TDesC16& SummaryTitle( TInt aIndex ) const; + const TDesC16& SummaryText( TInt aIndex ) const; + void SaveL( TInt aItem ); + TBool CanSetAsDefault( TInt aItem ) const; + void SetAsDefaultL( TInt aItem ); + TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor ); + void VisitL( CWPCharacteristic& aCharacteristic); + void VisitL( CWPParameter& aParameter ); + void VisitLinkL( CWPCharacteristic& aLink ); + void SettingsSavedL ( const TDesC8& aAppIdOfSavingItem, + const TDesC8& aAppRef, + const TDesC8& aStorageIdValue); + void SavingFinalizedL(); + + void GetSavingInfoL( TInt aIndex, + RPointerArray& aSavingInfo ); + + + + private: + + /** + * C++ default constructor. + */ + CXdmProvAdapter(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + + private: + + // Default name for settings + HBufC* iDefaultName; + + // Title for XDM settings + HBufC* iTitle; + + // XdmItems + RPointerArray iProvItems; + + + }; + +#endif // __XDMPROVADAPTER_H__ + +// End of File