phoneapp/phoneuiutils/inc/cphonemainerrormessageshandler.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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: 
       
    15 *    Phone resource resolver
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPHONEMAINERRORMESSAGESHANDLER_H
       
    21 #define __CPHONEMAINERRORMESSAGESHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <coemain.h>
       
    26 #include "mphoneerrormessageshandler.h"
       
    27 #include "mphoneerrormessageshandlerregister.h"
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CPhoneErrorMessagesHandlerRegister realizes the MPhoneErrorMessagesHandlerRegister interface, which
       
    34 *  allows for any error messagesd handler to offer their services for the Main Error messages
       
    35 *  Handler. Basically, the Main Error messages handler does not have any hard coded handling
       
    36 *  functionality. It only serves as access point for all the individual error messages handler
       
    37 *  scattered around the application ( via MPhoneErrorMessagesHandlerRegister interface ).
       
    38 */
       
    39 class CPhoneMainErrorMessagesHandler : 
       
    40     public CCoeStatic,
       
    41     public MPhoneErrorMessagesHandler ,
       
    42     public MPhoneErrorMessagesHandlerRegister
       
    43     {
       
    44     public: // Constructors and destructor
       
    45         /**
       
    46         * Virtual Destructor
       
    47         * @param None
       
    48         * @return None
       
    49         */
       
    50         virtual ~CPhoneMainErrorMessagesHandler();
       
    51     
       
    52     public: // From MPhoneErrorMessagesHandler
       
    53         /**
       
    54         * ShowErrorSpecificNoteL of given error.
       
    55         * @param aErrorInfo: error code and callId
       
    56         * @return None.
       
    57         */
       
    58         void ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo );
       
    59 
       
    60     public: // From MPhoneErrorMessagesHandlerRegister
       
    61         /**
       
    62         * Register given handler for handling errors from given 
       
    63         * enumeration.
       
    64         * @param aHandler: Pointer to the handler to be registered.  
       
    65         * @return None.
       
    66         */
       
    67         void RegisterErrorMessagesHandler( MPhoneErrorMessagesHandler* aHandler );
       
    68 
       
    69     public: // New methods
       
    70      
       
    71         /**
       
    72         * First call initializes the singleton object. Subsequent calls return
       
    73         * instance.
       
    74         * @param None.
       
    75         * @return Pointer to the one and only instance of main error 
       
    76         *         handler -object.
       
    77         */
       
    78         IMPORT_C static  CPhoneMainErrorMessagesHandler* Instance();
       
    79         
       
    80     protected:  // Constructors and destructor
       
    81         /**
       
    82         * Protected constructor.
       
    83         * @param None
       
    84         * @return None
       
    85         */
       
    86         CPhoneMainErrorMessagesHandler();
       
    87 
       
    88     private:    // Constructors and destructor
       
    89         /**
       
    90         * NewL function for creating the main resolver.
       
    91         * @param None
       
    92         * @return CPhoneMainResourceResolver*
       
    93         */
       
    94         static CPhoneMainErrorMessagesHandler* NewL();
       
    95         
       
    96     private:    // Data      
       
    97         
       
    98         MPhoneErrorMessagesHandler* iHandler;
       
    99 
       
   100     };
       
   101 #endif      // __CPHONERESOURCERESOLVER_H
       
   102             
       
   103 // End of File