phoneapp/phoneuiutils/inc/cphonemainresourceresolver.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002 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 __CPHONEMAINRESOURCERESOLVER_H
       
    21 #define __CPHONEMAINRESOURCERESOLVER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <coemain.h>
       
    26 #include "mphoneresourceresolver.h"
       
    27 #include "mphoneresourceresolverregister.h"
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CPhoneMainResourceResolver realizes the MPARegisterResourceResolver interface, which
       
    34 *  allows for any resource resolver to offer their services for the Main Resource
       
    35 *  Resolver. Basically, the Main Resource Resolver does not have any hard coded resolving
       
    36 *  functionality. It only serves as access point for all the individual resource resolvers
       
    37 *  scattered around the application ( via MPARegisterResourceResolver interface ).
       
    38 */
       
    39 class CPhoneMainResourceResolver : 
       
    40     public CCoeStatic,
       
    41     public MPhoneResourceResolver,
       
    42     public MPhoneResourceResolverRegister
       
    43     {
       
    44     public: // Constructors and destructor
       
    45         /**
       
    46         * Virtual Destructor
       
    47         * @param None
       
    48         * @return None
       
    49         */
       
    50         virtual ~CPhoneMainResourceResolver();
       
    51     
       
    52     public: // From MPAResourceResolver
       
    53         /**
       
    54         * Resolve resource id of given resource.
       
    55         * @param aEnumUid: Uid of enumeration which contains needed resource 
       
    56         *                  definition.
       
    57         * @param aResource: ID of needed resource ( from enumeration ).
       
    58         * @return Resource id.
       
    59         */
       
    60         TInt ResolveResourceID( const TInt& aResource ) const;
       
    61 
       
    62     public: // From MPARegisterResourceResolver
       
    63         /**
       
    64         * Register given resolver for resolving resources from given 
       
    65         * enumeration.
       
    66         * @param aResolver: Pointer to the resolver to be registered.
       
    67         * @param aEnumUid: Uid of enumeration which resources given resolver 
       
    68         *                  resolves.        
       
    69         * @return None.
       
    70         */
       
    71         void RegisterResolver( MPhoneResourceResolver* aResolver );
       
    72 
       
    73     public: // New methods
       
    74      
       
    75         /**
       
    76         * First call initializes the singleton object. Subsequent calls return
       
    77         * instance.
       
    78         * @param None.
       
    79         * @return Pointer to the one and only instance of main resouce 
       
    80         *         resolver -object.
       
    81         */
       
    82         IMPORT_C static  CPhoneMainResourceResolver* Instance();
       
    83         
       
    84     protected:  // Constructors and destructor
       
    85         /**
       
    86         * Protected constructor.
       
    87         * @param None
       
    88         * @return None
       
    89         */
       
    90         CPhoneMainResourceResolver();
       
    91 
       
    92     private:    // Constructors and destructor
       
    93         /**
       
    94         * NewL function for creating the main resolver.
       
    95         * @param None
       
    96         * @return CPhoneMainResourceResolver*
       
    97         */
       
    98         static CPhoneMainResourceResolver* NewL();
       
    99         
       
   100     private:    // Data      
       
   101         
       
   102         MPhoneResourceResolver* iResolver;
       
   103 
       
   104     };
       
   105 #endif      // __CPHONERESOURCERESOLVER_H
       
   106             
       
   107 // End of File