locationdataharvester/maptileservice/inc/maptileservice.h
changeset 17 0f22fb80ebba
child 30 96df3ab41000
equal deleted inserted replaced
15:13ae750350c9 17:0f22fb80ebba
       
     1 /*
       
     2 * Copyright (c) 2010 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 *     maptile service interface
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef _MAPTILESERVICE_H_
       
    20 #define _MAPTILESERVICE_H_
       
    21 
       
    22 
       
    23 #include <QString>
       
    24 #include <QtGlobal>
       
    25 
       
    26 
       
    27 #ifdef  MAPTILESERVICEDLL
       
    28 #define MAPTILESERVICE_EXPORT Q_DECL_EXPORT
       
    29 #else
       
    30 #define MAPTILESERVICE_EXPORT Q_DECL_IMPORT
       
    31 #endif
       
    32 
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Maptile service class,  provides interface to get map tile image associated with 
       
    39 *  contact. Also provides interface to check whether location feature is enabled or disabled.
       
    40 *
       
    41 *  Note: Location feature can be enabled or disabled by modifying conf\cntmaptileservice.confml file.
       
    42 */
       
    43 class MAPTILESERVICE_EXPORT MapTileService 
       
    44 {
       
    45 
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Application types      
       
    50      */
       
    51     enum AppType
       
    52     {
       
    53         /** Contacts application */
       
    54         AppTypeContacts,
       
    55         /** Calendar application */
       
    56         AppTypeCalendar
       
    57     };
       
    58     /** 
       
    59      * Address types
       
    60      */
       
    61     enum AddressType      
       
    62     {
       
    63         /** Plain Address Type */
       
    64         AddressPlain,
       
    65         /** Address Type Pref */
       
    66         AddressPreference,
       
    67         /** Address type Work */
       
    68         AddressWork,
       
    69         /** Address type Home */
       
    70         AddressHome
       
    71     };
       
    72       
       
    73    /**
       
    74     * Checks whether location feature enabled or disabled for specific application.
       
    75     * 
       
    76     * @return Returns true or false based on location feature setting.
       
    77     */
       
    78     static bool isLocationFeatureEnabled(AppType appType);
       
    79             
       
    80    /**
       
    81     * Gets a maptile image associated with a id(contact id/calendar id). 
       
    82     * Returns a maptile image path if it is available otherwise returns NULL.
       
    83     * 
       
    84     * @param contactId  Contact id     
       
    85     * @param sourceType Source address type( Preferred, Home , Work address )
       
    86     *      
       
    87     * @return Returns maptile image path if it is available, else NULL.
       
    88     */
       
    89     static QString getMapTileImage( int Id, AddressType sourceType  );  
       
    90      	
       
    91 };
       
    92 
       
    93 #endif //MAPTILESERVICE_H_
       
    94