locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicesengine.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     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: Class declaration of PosLocationServicesEngine.
       
    15 *
       
    16 */
       
    17 #ifndef POSLOCATIONSERVICESENGINE_H
       
    18 #define POSLOCATIONSERVICESENGINE_H
       
    19 
       
    20 #include "poslocationservicesengineprivate.h"
       
    21 #include <QObject>
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  * PosLocationServicesEngine class provides interface to location services.
       
    27  * Using this interface. This interface provides services like list, delete
       
    28  * etc..
       
    29  */
       
    30 class PosLocationServicesEngine : public QObject,
       
    31                                   public PosLocationServiceUpdateObserver
       
    32     {
       
    33     Q_OBJECT
       
    34 public:
       
    35     /**
       
    36      * Constructor
       
    37      */
       
    38     PosLocationServicesEngine();
       
    39 
       
    40     /**
       
    41      * Destructor
       
    42      */
       
    43     virtual ~PosLocationServicesEngine();
       
    44 
       
    45     /**
       
    46      * Retrieves all location services info.
       
    47      *
       
    48      * @param[out] locationServiceList List of location
       
    49      *            services info.
       
    50      * @return  - KErrNone if location services information retrieved successfully.
       
    51      *          - KErrNotFound if there are no location services.
       
    52      *            otherwise system wide error codes.
       
    53      */
       
    54     int getLocationServices( QList<PosLocationServiceInfo>&
       
    55                              locationServiceList );
       
    56 
       
    57     /**
       
    58      * Removes location service based on the service Id.
       
    59      *
       
    60      * @param [in] serviceId Location service Id.
       
    61      *
       
    62      * @return following error codes
       
    63      *      - KErrNone if successful
       
    64      *      - KErrNotFound if service is not found
       
    65      *      otherwise system wide error codes.
       
    66      */
       
    67     int removeLocationService( int serviceId );
       
    68 
       
    69 public:// From PosLocationServiceUpdateObserver
       
    70     void handleLocationServiceUpdate();
       
    71 
       
    72 signals:
       
    73     /**
       
    74      * This signal is emitted when there is update in the
       
    75      * location services.
       
    76      */
       
    77     void locationServiceUpdate();
       
    78 
       
    79 private:// Data members
       
    80     /**
       
    81      * Pointer to PosLocationServicesEnginePrivate object.
       
    82      * Own
       
    83      */
       
    84     PosLocationServicesEnginePrivate* d_ptr;
       
    85     };
       
    86 
       
    87 #endif /* POSLOCATIONSERVICESENGINE_H */