datasourceadaptation/gpsdatasourceadaptation/inc/EPos_CPosPsyExtension.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2005-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 CPOSPSYEXTENSION_H
       
    21 #define CPOSPSYEXTENSION_H
       
    22 
       
    23 #include <lbs/epos_mpositionerstatus.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MPosStatusObserver;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Class used to extend the CPositioner member data list. It holds PSY specific
       
    32 * information and services. Only one instance per module should exist.
       
    33 */
       
    34 class CPosPsyExtension : public CBase, public MPositionerStatus
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * C++ constructor.
       
    40         *
       
    41         * @param aImplementationUid The UID of the PSY implementation.
       
    42         * @param aStatusObserver The server object watching for status updates.
       
    43         */
       
    44         CPosPsyExtension(
       
    45         /* IN  */       TUid aImplementationUid,
       
    46         /* IN  */       MPosStatusObserver* aStatusObserver
       
    47         );
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         ~CPosPsyExtension();
       
    53 
       
    54     public:  // Functions from base classes
       
    55 
       
    56         /**
       
    57         * From MPositionerStatus. 
       
    58         * Reports that the positioner status has changed.
       
    59         *
       
    60         * @param aStatus The new status.
       
    61         */
       
    62         void ReportStatus(
       
    63         /* IN  */       const TPositionModuleStatus& aStatus
       
    64         );
       
    65 
       
    66     public:  // New functions
       
    67 
       
    68         /**
       
    69         * Registers a positioner as user of this PSY.
       
    70         */
       
    71         void RegisterPositioner();
       
    72 
       
    73         /**
       
    74         * De-registers a positioner as user of this PSY.
       
    75         *
       
    76         * @return remaining number of registred positioners.
       
    77         */
       
    78         TInt UnregisterPositioner();
       
    79 
       
    80     private:  // Constructors
       
    81 
       
    82         // By default, prohibit copy constructor
       
    83         CPosPsyExtension( const CPosPsyExtension& );
       
    84         // Prohibit assigment operator
       
    85         CPosPsyExtension& operator= ( const CPosPsyExtension& );
       
    86 
       
    87     public:  // Data
       
    88 
       
    89         TUid                    iImplementationUid;
       
    90         MPosStatusObserver*     iStatusObserver;
       
    91 
       
    92     private:  // Data
       
    93 
       
    94         TUint                   iRefCount;
       
    95 
       
    96     };  
       
    97 
       
    98 #endif  // CPOSPSYEXTENSION_H
       
    99 
       
   100 // End of File