epoc32/include/mw/cdownloadmgruibase.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Supports common base functionality for DMgr user interfaces
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
#ifndef CDOWNLOADMGRUIBASE_H
williamr@2
    21
#define CDOWNLOADMGRUIBASE_H
williamr@2
    22
williamr@2
    23
//  INCLUDES
williamr@2
    24
#include <E32BASE.H>
williamr@2
    25
#include <ConeResLoader.h>
williamr@2
    26
williamr@2
    27
// FORWARD DECLARATIONS
williamr@2
    28
class CCoeEnv;
williamr@2
    29
class CDownloadMgrUiLibRegistry;
williamr@2
    30
class CUiBaseExtension;
williamr@2
    31
class MAknServerAppExitObserver;
williamr@2
    32
williamr@2
    33
// CLASS DECLARATION
williamr@2
    34
williamr@2
    35
/**
williamr@2
    36
*  Abstaract base class for UI Lib classes with UI controls.
williamr@2
    37
*  It owns a set of downloads that belong to the derived concrete class.
williamr@2
    38
*  Derived classes must implement MHttpDownloadMgrObserver.
williamr@2
    39
*  When constructing one Download Manager must be added.
williamr@2
    40
*
williamr@2
    41
*  @lib Download Manager UI Lib
williamr@2
    42
*  @since Series 60 2.8
williamr@2
    43
*/
williamr@2
    44
NONSHARABLE_CLASS( CDownloadMgrUiBase ) : public CBase
williamr@2
    45
    {
williamr@2
    46
    public: // New functions
williamr@2
    47
        
williamr@2
    48
        TPtrC ResourceFileName() const;
williamr@2
    49
williamr@2
    50
        /**
williamr@2
    51
        * Set an oberver for embedded application exit events. 
williamr@2
    52
        * @param aObserver Exit observer. Can be NULL.
williamr@2
    53
        * @return None.
williamr@2
    54
        */
williamr@2
    55
        IMPORT_C void SetServerAppExitObserver( MAknServerAppExitObserver* aObserver );
williamr@2
    56
williamr@2
    57
        /**
williamr@2
    58
        * Gets the value for a TInt attribute.
williamr@2
    59
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
    60
        * @param aAttribute Identifies the attribute to be retrived.
williamr@2
    61
        * @param aValue On completion, contains the requested TInt attribute.
williamr@2
    62
        * @return None.
williamr@2
    63
        */
williamr@2
    64
        IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue ) = 0;
williamr@2
    65
williamr@2
    66
        /**
williamr@2
    67
        * Gets the value for a TBool attribute.
williamr@2
    68
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
    69
        * @param aAttribute Identifies the attribute to be retrived.
williamr@2
    70
        * @param aValue On completion, contains the requested TBool attribute.
williamr@2
    71
        * @return None.
williamr@2
    72
        */
williamr@2
    73
        IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue ) = 0;
williamr@2
    74
williamr@2
    75
        /**
williamr@2
    76
        * Gets the value for a TDes16 attribute.
williamr@2
    77
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
    78
        * @param aAttribute Identifies the attribute to be retrived.
williamr@2
    79
        * @param aValue On completion, contains the requested TDes16 attribute.
williamr@2
    80
        * @return None.
williamr@2
    81
        */
williamr@2
    82
        IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue  ) = 0;
williamr@2
    83
williamr@2
    84
        /**
williamr@2
    85
        * Gets the value for a TDes8 attribute.
williamr@2
    86
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
    87
        * @param aAttribute Identifies the attribute to be retrived.
williamr@2
    88
        * @param aValue On completion, contains the requested TDes8 attribute.
williamr@2
    89
        * @return None.
williamr@2
    90
        */
williamr@2
    91
        IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue  ) = 0;
williamr@2
    92
williamr@2
    93
        /**
williamr@2
    94
        * Sets the value for a TInt attribute.
williamr@2
    95
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
    96
        * @param aAttribute Identifies the attribute to be set.
williamr@2
    97
        * @param aValue The value to be set.
williamr@2
    98
        * @return None.
williamr@2
    99
        */
williamr@2
   100
        IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue ) = 0;
williamr@2
   101
williamr@2
   102
        /**
williamr@2
   103
        * Sets the value for a TBool attribute.
williamr@2
   104
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
   105
        * @param aAttribute Identifies the attribute to be set.
williamr@2
   106
        * @param aValue The value to be set.
williamr@2
   107
        * @return None.
williamr@2
   108
        */
williamr@2
   109
        IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue ) = 0;
williamr@2
   110
williamr@2
   111
        /**
williamr@2
   112
        * Sets the value for a TDesC attribute.
williamr@2
   113
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
   114
        * @param aAttribute Identifies the attribute to be set.
williamr@2
   115
        * @param aValue The value to be set.
williamr@2
   116
        * @return None.
williamr@2
   117
        */
williamr@2
   118
        IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue ) = 0;
williamr@2
   119
williamr@2
   120
        /**
williamr@2
   121
        * Sets the value for a TDesC8 attribute.
williamr@2
   122
        * Leaves with KErrNotSupported, if the attribute is not supported.
williamr@2
   123
        * @param aAttribute Identifies the attribute to be set.
williamr@2
   124
        * @param aValue The value to be set.
williamr@2
   125
        * @return None.
williamr@2
   126
        */
williamr@2
   127
        IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue ) = 0;
williamr@2
   128
williamr@2
   129
    protected: // Constructors
williamr@2
   130
williamr@2
   131
        /**
williamr@2
   132
        * C++ default constructor.
williamr@2
   133
        */
williamr@2
   134
        CDownloadMgrUiBase( CDownloadMgrUiLibRegistry& aRegistryModel );
williamr@2
   135
williamr@2
   136
        /**
williamr@2
   137
        * By default Symbian 2nd phase constructor is private.
williamr@2
   138
        */
williamr@2
   139
        void BaseConstructL();
williamr@2
   140
williamr@2
   141
        /**
williamr@2
   142
        * Destructor.
williamr@2
   143
        */
williamr@2
   144
        virtual ~CDownloadMgrUiBase();
williamr@2
   145
williamr@2
   146
    protected:  // Data
williamr@2
   147
williamr@2
   148
        CCoeEnv& iCoeEnv; ///< Reference to CONE environment.
williamr@2
   149
williamr@2
   150
    protected:  // Data
williamr@2
   151
williamr@2
   152
        CDownloadMgrUiLibRegistry&  iRegistryModel; ///< Reference to the Registry.
williamr@2
   153
        MAknServerAppExitObserver*  iServerAppExitObserver; ///< Reference to the observer.
williamr@2
   154
williamr@2
   155
    private:  // Data
williamr@2
   156
williamr@2
   157
        TFileName                   iResourceFileName; ///< Temp storage for the file name.
williamr@2
   158
        RConeResourceLoader         iResourceLoader; ///< Resource loader.
williamr@2
   159
        TBool                       iResourceOpened; ///< Indicate if the resource is opened.
williamr@2
   160
williamr@2
   161
        CUiBaseExtension*           iExtension; ///< Reserved pointer for future extension
williamr@2
   162
williamr@2
   163
    };
williamr@2
   164
williamr@2
   165
#endif /* CDOWNLOADMGRUIBASE_H */