locationmapnavfw/library/inc/mnproviderimpl.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  CMnProviderImpl class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MN_PROVIDER_IMPL_H
       
    20 #define MN_PROVIDER_IMPL_H
       
    21 
       
    22 #include <swi/sisregistrysession.h>
       
    23 #include "mnprovider.h"
       
    24 
       
    25 class RMnServiceClientBase;
       
    26 class RApaLsSession;
       
    27    
       
    28 /*  @brief Implementation of CMnProvider.
       
    29  *  @internal
       
    30  */
       
    31 NONSHARABLE_CLASS( CMnProviderImpl ) : public CMnProvider
       
    32     {
       
    33     public :
       
    34         ~CMnProviderImpl();
       
    35         
       
    36         static CMnProviderImpl* NewL( TUid aProvider );
       
    37         static CMnProviderImpl* NewL( 
       
    38             TUid aAppUid, 
       
    39             RApaLsSession& aApaSession, 
       
    40             Swi::RSisRegistrySession& aSisSession );
       
    41         
       
    42         /** This constructor reads all provider's info from 
       
    43          *  AppArc and Swi */
       
    44         void ConstructL( TUid aAppUid );
       
    45         
       
    46         /** Performance-aware constructor. Uses ready connections to 
       
    47          *  AppArc and Swi */
       
    48         void ConstructL(
       
    49             TUid aAppUid, 
       
    50             RApaLsSession& aApaSession, 
       
    51             Swi::RSisRegistrySession& aSisSession );
       
    52             
       
    53         /** Returns trust info of provider's sis package */            
       
    54         TBool IsTrusted();    
       
    55 
       
    56     public : // From CMnProvider        
       
    57 
       
    58         TUint32 SupportedFeatures( TService aService ) const;
       
    59 
       
    60     protected :
       
    61         CMnProviderImpl();
       
    62         
       
    63         /** Resembles MN_SERVICE_INFO resource structure */
       
    64         struct TMnAppServiceInfo
       
    65             {
       
    66             /* Supported features of this service */
       
    67             TInt32 iServiceFeatures;
       
    68             };
       
    69 
       
    70         /** Reads application info from AppArc */
       
    71         void ReadAppArcInfoL( RApaLsSession& aApaSession );
       
    72 
       
    73         /** Looks for MN_SERVICE_INFO struct in application's SERVICE_INFO opaque data. */
       
    74         TBool ReadMnServiceInfoL(
       
    75             RApaLsSession& aApaSession, 
       
    76             TUid aServiceUid, 
       
    77             TMnAppServiceInfo& aServiceInfo );
       
    78 
       
    79         /** Checks service features */
       
    80         void CheckServiceFeaturesL( 
       
    81             RApaLsSession& aApaSession,
       
    82             CMnProvider::TService aService, 
       
    83             TUint32& aServiceFeatures );
       
    84 
       
    85         /** Reads extended service info from SERVICE_INFO struct */
       
    86         void ReadServiceFeaturesL( RApaLsSession& aApaSession );
       
    87 
       
    88         /** Reads package info from Installation Registry 
       
    89          *  and verifies trust level */
       
    90         void ReadPackageInfoL( Swi::RSisRegistrySession& aSisSession );
       
    91         
       
    92         /** Verifies if converter plug-in exists for provider of MapImage service */
       
    93         TBool IsConverterPluginFoundL();
       
    94 
       
    95         /** \brief Sets Provider Application's name */
       
    96         void SetNameL( const TDesC& aName );
       
    97 
       
    98         /** \brief Sets Provider Application's short name */
       
    99         void SetShortNameL( const TDesC& aShortName );
       
   100 
       
   101         /** \brief Sets Provider Application's vendor name */
       
   102         void SetVendorNameL( const TDesC& aVendorName );
       
   103 
       
   104         /** \brief Sets Provider Application's version */
       
   105         void SetVersion( TVersion aVersion );
       
   106 
       
   107         /** \brief Sets Provider Application's supported services */
       
   108         void SetSupportedServices( TServices aServices );
       
   109         
       
   110     protected :
       
   111         TBool   iIsTrusted;
       
   112         TUint32 iMapViewFeatures;
       
   113         TUint32 iNavigationFeatures;
       
   114         TUint32 iGeocodingFeatures;
       
   115         TUint32 iMapImageFeatures;
       
   116     };
       
   117 
       
   118 #endif // MN_PROVIDER_IMPL_H
       
   119