datasourceadaptation/gpsdatasourceadaptation/inc/epos_mposmodulesettingsmanager.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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 
       
    19 
       
    20 #ifndef EPOS_MPOSMODULESETTINGSMANAGER_H
       
    21 #define EPOS_MPOSMODULESETTINGSMANAGER_H
       
    22 
       
    23 #include <lbs.h>
       
    24 
       
    25 class MPosModuleSettingsListener;
       
    26 class CPosModuleIdList;
       
    27 
       
    28 /**
       
    29 *  This is an interface through which a PSY can get module settings and listen
       
    30 *  to module settings change.
       
    31 * 
       
    32 */
       
    33 class MPosModuleSettingsManager
       
    34     {
       
    35     public:
       
    36         /**
       
    37         * Add a listener to get the module settings change event. 
       
    38         *
       
    39         * The listener must be removed when the client does not want to get
       
    40         * module settings change event any more.
       
    41         *
       
    42         * @param aListener The reference to listener class.
       
    43         */
       
    44         virtual void AddListenerL(
       
    45             MPosModuleSettingsListener& aListener ) = 0;
       
    46 
       
    47         /**
       
    48         * Remove a listener of module settings chagne event.
       
    49         *
       
    50         * If the listener has not been added, this function does nothing.
       
    51         *
       
    52         * @param aListener The reference to the listener class.
       
    53         */
       
    54         virtual void RemoveListener(
       
    55             MPosModuleSettingsListener& aListener) = 0;
       
    56 
       
    57         /**
       
    58         * Retrieves a list of the existing modules in priority order.
       
    59         * Client takes ownership of returned object.
       
    60         *
       
    61         * Modules marked as invisible are not included in this list.
       
    62         *
       
    63         * @return List of visible modules
       
    64         * @see ModuleIdListLC()
       
    65         */
       
    66         virtual CPosModuleIdList* ModuleIdListL() = 0;
       
    67 
       
    68         /**
       
    69         * Retrieves the attributes of a module.
       
    70         *
       
    71         * If the supplied position module info class is not supported, this
       
    72         * method will leave with code KErrNotSupported . Currently only
       
    73         * TPositionModuleInfo is supported.
       
    74         *
       
    75         * @param[in] aModuleId The ID of the module to retrieve information for.
       
    76         * @param[out] aInfo On return contains the module information.
       
    77         *
       
    78         * @leave KErrNotSupported Not supported module info class object is
       
    79         *                         is supplied as parameter.
       
    80         * @leave KErrNotFound No module with given ID is installed.
       
    81         *
       
    82         */
       
    83         virtual void GetModuleInfoL(
       
    84             TPositionModuleId aModuleId,
       
    85             TPositionModuleInfoBase& aInfo
       
    86             ) = 0;
       
    87 
       
    88         /**
       
    89         * Get module visibility status.
       
    90         *
       
    91         * @param[in] aModuleId The ID of the module to retrieve visiblity.
       
    92         * @return ETrue if the module is visible
       
    93         *
       
    94         * @leave KErrNotFound No module with given ID is installed.
       
    95         */
       
    96         virtual TBool IsModuleVisibleL(
       
    97             TPositionModuleId aModuleId
       
    98             ) = 0;
       
    99     };  
       
   100 
       
   101 #endif  // EPOS_MPOSMODULESETTINGSMANAGER_H