locationdataharvester/geocodeupdate/inc/geocodeupdate.h
branchRCL_3
changeset 17 1fc85118c3ae
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
       
     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 *
       
    16 */
       
    17 
       
    18 #ifndef __GEOCODEUPDATE_H__
       
    19 #define __GEOCODEUPDATE_H__
       
    20 
       
    21 #include <e32def.h> 
       
    22 #include <QtCore/qglobal.h>
       
    23 #include <QObject>
       
    24 
       
    25 #ifdef  GEOCODEUPDATEDLL
       
    26 #define GEOCODEUPDATE_EXPORT Q_DECL_EXPORT
       
    27 #else
       
    28 #define GEOCODEUPDATE_EXPORT Q_DECL_IMPORT
       
    29 #endif
       
    30 
       
    31 class AgendaUtil;
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * GeocodeUpdate, a class to update latitude and longtude into contact and calender database
       
    36  */
       
    37 class GEOCODEUPDATE_EXPORT GeocodeUpdate: public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40 public:    
       
    41     
       
    42     GeocodeUpdate();
       
    43        
       
    44     ~GeocodeUpdate();
       
    45        
       
    46     /**
       
    47      Create contact database   
       
    48      */
       
    49      void createContactdb();
       
    50     
       
    51     /**
       
    52      * Request to update latitude and longitude into contact db. 
       
    53      * @param contactId contact unique id.
       
    54      * @param addressType contact address type.
       
    55      * @param latitude Latitude to be updated.
       
    56      * @param longitude longitude to be updated.
       
    57 	 * 
       
    58 	 * @return Returns true if successfule otherwise false.
       
    59      */
       
    60 
       
    61     bool updateGeocodeToContactDB(const quint32 contactId, const int addressType,
       
    62         const double latitude, const double longitude);
       
    63     /**
       
    64      * Request to update latitude and longitude into calender db.    
       
    65      * @param calEntryId calender entry unique id
       
    66      * @param latitude Latitude to be updated.
       
    67      * @param longitude longitude to be updated.
       
    68 	 * 
       
    69 	 * @return Returns true if successfule otherwise false.
       
    70      */
       
    71 
       
    72     bool updateGeocodeToCalenderDB(const ulong& calEntryId, const double& latitude,
       
    73         const double& longitude);
       
    74 
       
    75     /**
       
    76      * Request to check if geo-cordinate available or not.  
       
    77      * @param calEntryId calender entry unique id
       
    78      * @return true, if available otherwise false.
       
    79      */
       
    80     bool isGeocodeNotAvailable(const ulong& calEntryId);
       
    81 
       
    82 private slots:
       
    83     void agendautilInstanceCreated(int);
       
    84 	
       
    85 signals:
       
    86     void eventCompleted();
       
    87 	
       
    88 private:
       
    89 
       
    90     AgendaUtil *mAgendaUtil;
       
    91     bool mUtilInstanceCreated;
       
    92 };
       
    93 
       
    94 #endif // __GEOCODEUPDATE_H__