codhandler/codui/inc/CodConfirm.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 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 the License "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:  Declaration of class CCodConfirm.   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef COD_CONFIRM_H
       
    20 #define COD_CONFIRM_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <coecntrl.h>
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Control displaying COD details.
       
    32 */
       
    33 NONSHARABLE_CLASS( CCodConfirm ): public CCoeControl
       
    34     {
       
    35 
       
    36     public:     // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Constructor.
       
    40         * @param aMopParent MOP Parent.
       
    41         */
       
    42         CCodConfirm();
       
    43 
       
    44         
       
    45         /**
       
    46         * Destructor.
       
    47         */
       
    48         virtual ~CCodConfirm();
       
    49 
       
    50     public:     // new methods
       
    51                                         
       
    52         /**
       
    53         * Show confiration 
       
    54         * @param aDownload The actual download
       
    55         * @param aCbaResource Softkeys resource ID (eg. R_AVKON_SOFTKEYS_OK_CANCEL)
       
    56         * @return Confirmation accepted? True/False.
       
    57         */
       
    58         
       
    59          TBool ShowDownloadConfirmationL(TInt aCbaResource, 
       
    60                                          const CCodData& aData, 
       
    61                                          TBool aCode); 
       
    62          								
       
    63         /**
       
    64         * Format list box string for Download confirmation.
       
    65         * @param aFirst First line
       
    66         * @param aSecond Second line of list item
       
    67         * @return The allocated heap buffer.
       
    68         */
       
    69          HBufC* FormatListBoxItemLC( const TDesC& aFirst, 
       
    70                                      const TDesC& aSecond );
       
    71 
       
    72 
       
    73 
       
    74     public:     // from CCoeControl
       
    75 
       
    76 
       
    77     private:    // new methods
       
    78 
       
    79         /**
       
    80         * Allocate and return human-readable name for a MIME type.
       
    81         * @param MIME type.
       
    82         * @return Allocated human-readable name in a buffer. Ownership passed
       
    83         * to the caller.
       
    84         */
       
    85         HBufC* AllocTypeNameL( const TDesC8& aMimeType );
       
    86 
       
    87 
       
    88 
       
    89         /**
       
    90         * Get MIME type to be displayed. (First type which is 'meaningless'
       
    91         * to the user, e.g. leave out wrappers like DRM).
       
    92         * @param aData COD data.
       
    93         * @return MIME type.
       
    94         */
       
    95         TPtrC8 DisplayType( const CCodData& aData );
       
    96 
       
    97     private:    // data
       
    98 
       
    99 
       
   100     };
       
   101 
       
   102 #endif /* def COD_CONFIRM_H */