landmarks/locationlandmarks/internalservices/inc/EPos_CPosLmSettingsHandler.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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: Provides functions for reading and changing
       
    15 * settings in the Landmarks settings.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSLMSETTINGSHANDLER_H
       
    21 #define CPOSLMSETTINGSHANDLER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CRepository;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * Provides functions for reading and changing
       
    35 * settings in the Landmarks settings.
       
    36 * A client can also listen to landmark settings events.
       
    37 *
       
    38 *  @version $Revision: 1.7 $, $Date: 2005/03/31 08:14:12 $
       
    39 */
       
    40 class CPosLmSettingsHandler : public CBase
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43 
       
    44         /**
       
    45         * Creates a settings handler.
       
    46         *
       
    47         * @return A settings handler.
       
    48         */
       
    49         IMPORT_C static CPosLmSettingsHandler* NewL();
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CPosLmSettingsHandler();
       
    55 
       
    56     public:  // New functions
       
    57 
       
    58         /**
       
    59         * Gets the default database URI from the Landmarks settings.
       
    60         * The client takes ownership of the descriptor object.
       
    61         *
       
    62         * @return The URI of the default landmark database.
       
    63         */
       
    64         IMPORT_C HBufC* GetDefaultDatabaseUriL();
       
    65 
       
    66         /**
       
    67         * Sets the default database URI in the Landmarks settings.
       
    68         *
       
    69         * @param aDatabaseUri The URI of the database which
       
    70         * should be set as default
       
    71         */
       
    72         IMPORT_C void SetDefaultDatabaseUriL(
       
    73         /* IN  */       const TDesC& aDatabaseUri
       
    74         );
       
    75 
       
    76         /**
       
    77         * Notifies a client when landmark settings have changed.
       
    78         *
       
    79         * @param aStatus The listener's request status.
       
    80         * @return KErrNone if successful, otherwise a system wide
       
    81         * error code.
       
    82         */
       
    83         IMPORT_C TInt NotifySettingsChanged(
       
    84         /* IN  */       TRequestStatus& aStatus
       
    85         );
       
    86 
       
    87         /**
       
    88         * Cancels a call to NotifySettingsChanged.
       
    89         *
       
    90         * @return KErrNone if the request was successfully cancelled,
       
    91         * otherwise a system wide error code.
       
    92         */
       
    93         IMPORT_C TInt CancelNotifySettingsChanged();
       
    94 
       
    95     private:
       
    96 
       
    97         /**
       
    98         * C++ default constructor.
       
    99         */
       
   100         CPosLmSettingsHandler();
       
   101 
       
   102         /**
       
   103         * By default Symbian 2nd phase constructor is private.
       
   104         */
       
   105         void ConstructL();
       
   106 
       
   107         // By default, prohibit copy constructor
       
   108         CPosLmSettingsHandler( const CPosLmSettingsHandler& );
       
   109         // Prohibit assigment operator
       
   110         CPosLmSettingsHandler& operator= ( const CPosLmSettingsHandler& );
       
   111 
       
   112     private:    // Data
       
   113 
       
   114         CRepository* iRepository;
       
   115 
       
   116     };
       
   117 
       
   118 #endif      // CPOSLMSETTINGSHANDLER_H
       
   119 
       
   120 // End of File