williamr@2: /* williamr@2: * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Supports common base functionality for DMgr user interfaces williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: #ifndef CDOWNLOADMGRUIBASE_H williamr@2: #define CDOWNLOADMGRUIBASE_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class CCoeEnv; williamr@2: class CDownloadMgrUiLibRegistry; williamr@2: class CUiBaseExtension; williamr@2: class MAknServerAppExitObserver; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * Abstaract base class for UI Lib classes with UI controls. williamr@2: * It owns a set of downloads that belong to the derived concrete class. williamr@2: * Derived classes must implement MHttpDownloadMgrObserver. williamr@2: * When constructing one Download Manager must be added. williamr@2: * williamr@2: * @lib Download Manager UI Lib williamr@2: * @since Series 60 2.8 williamr@2: */ williamr@2: NONSHARABLE_CLASS( CDownloadMgrUiBase ) : public CBase williamr@2: { williamr@2: public: // New functions williamr@2: williamr@2: TPtrC ResourceFileName() const; williamr@2: williamr@2: /** williamr@2: * Set an oberver for embedded application exit events. williamr@2: * @param aObserver Exit observer. Can be NULL. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C void SetServerAppExitObserver( MAknServerAppExitObserver* aObserver ); williamr@2: williamr@2: /** williamr@2: * Gets the value for a TInt attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be retrived. williamr@2: * @param aValue On completion, contains the requested TInt attribute. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Gets the value for a TBool attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be retrived. williamr@2: * @param aValue On completion, contains the requested TBool attribute. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Gets the value for a TDes16 attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be retrived. williamr@2: * @param aValue On completion, contains the requested TDes16 attribute. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Gets the value for a TDes8 attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be retrived. williamr@2: * @param aValue On completion, contains the requested TDes8 attribute. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Sets the value for a TInt attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be set. williamr@2: * @param aValue The value to be set. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Sets the value for a TBool attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be set. williamr@2: * @param aValue The value to be set. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Sets the value for a TDesC attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be set. williamr@2: * @param aValue The value to be set. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue ) = 0; williamr@2: williamr@2: /** williamr@2: * Sets the value for a TDesC8 attribute. williamr@2: * Leaves with KErrNotSupported, if the attribute is not supported. williamr@2: * @param aAttribute Identifies the attribute to be set. williamr@2: * @param aValue The value to be set. williamr@2: * @return None. williamr@2: */ williamr@2: IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue ) = 0; williamr@2: williamr@2: protected: // Constructors williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: CDownloadMgrUiBase( CDownloadMgrUiLibRegistry& aRegistryModel ); williamr@2: williamr@2: /** williamr@2: * By default Symbian 2nd phase constructor is private. williamr@2: */ williamr@2: void BaseConstructL(); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: virtual ~CDownloadMgrUiBase(); williamr@2: williamr@2: protected: // Data williamr@2: williamr@2: CCoeEnv& iCoeEnv; ///< Reference to CONE environment. williamr@2: williamr@2: protected: // Data williamr@2: williamr@2: CDownloadMgrUiLibRegistry& iRegistryModel; ///< Reference to the Registry. williamr@2: MAknServerAppExitObserver* iServerAppExitObserver; ///< Reference to the observer. williamr@2: williamr@2: private: // Data williamr@2: williamr@2: TFileName iResourceFileName; ///< Temp storage for the file name. williamr@2: RConeResourceLoader iResourceLoader; ///< Resource loader. williamr@2: TBool iResourceOpened; ///< Indicate if the resource is opened. williamr@2: williamr@2: CUiBaseExtension* iExtension; ///< Reserved pointer for future extension williamr@2: williamr@2: }; williamr@2: williamr@2: #endif /* CDOWNLOADMGRUIBASE_H */