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