omadrm/drmhelper/inc/DRMHelperInfoNoteWrapper.h
changeset 0 95b198f216e5
child 18 8a03a285ab14
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     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 "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:  Synchronous wrapper for showing global notes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __DRMHELPERINFONOTEWRAPPER_H__
       
    21 #define __DRMHELPERINFONOTEWRAPPER_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <aknglobalnote.h>
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Wrapper class for displaying global notes.
       
    40 *
       
    41 *  @lib drmhelper.lib
       
    42 *  @since Series 60 2.6
       
    43 */
       
    44 NONSHARABLE_CLASS ( CDRMHelperInfoNoteWrapper ) : public CActive
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47         
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         */
       
    51         static CDRMHelperInfoNoteWrapper* NewL();
       
    52         
       
    53         static CDRMHelperInfoNoteWrapper* NewLC();
       
    54         
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58         virtual ~CDRMHelperInfoNoteWrapper();
       
    59 
       
    60     public: // New functions
       
    61 
       
    62 
       
    63         /**
       
    64         * Synchronous wrapper for showing global note.
       
    65         * @param aType type of Info note to be displayed
       
    66         * @param aNoteText string containing note text       
       
    67         * @param aResource resource identifier
       
    68         * @param aString is transferred for CoverUi string data     
       
    69         * @param aValue is transferred for CoverUi numerical data
       
    70         * @return button code
       
    71         */
       
    72         void ShowNoteL(  TAknGlobalNoteType aType, 
       
    73                          const TDesC& aNoteText,
       
    74                          TInt aResourceId = -1, 
       
    75                          const TDesC& aString = KNullDesC,
       
    76                          TInt aValue = -1 );
       
    77 
       
    78         /**
       
    79         * Synchronous wrapper for showing global note.
       
    80         * @param[inout] aResourceId takes primary display
       
    81         *               resource ID and returns CoverUiId     
       
    82         * @return       boolean if ID was valid CoverUiId
       
    83         */
       
    84         static TBool EvaluateCoverResourceId( TInt& aResourceId );
       
    85     
       
    86     private: // From CActive
       
    87     
       
    88     	void DoCancel();
       
    89     	void RunL();
       
    90         
       
    91     private:
       
    92 
       
    93         /**
       
    94         * C++ default constructor.
       
    95         */
       
    96         CDRMHelperInfoNoteWrapper();
       
    97 
       
    98         /**
       
    99         * By default Symbian 2nd phase constructor is private.
       
   100         */
       
   101         void ConstructL();        
       
   102        
       
   103     private:    // Data
       
   104         CAknGlobalNote* iNote; 
       
   105     };
       
   106 
       
   107 
       
   108 #endif      // __DRMHELPERINFONOTEWRAPPER_H__   
       
   109             
       
   110 // End of File
       
   111