sipvoipprovider/inc/svppositioningprovider.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007 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 position information
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SVPPOSITIONINGPROVIDER_H
       
    20 #define C_SVPPOSITIONINGPROVIDER_H
       
    21 
       
    22 #include <lbs.h>
       
    23 #include "svputdefs.h"
       
    24 
       
    25 class MSVPPositioningProviderObserver;
       
    26 
       
    27 /**
       
    28  *  Provides position information
       
    29  *  Provides position information through Symbian Location FW. Actual 
       
    30  *  information comes via a DHCP query which is implemented in a separate 
       
    31  *  positioning module.
       
    32  *
       
    33  *  @lib svp.dll
       
    34  *  @since S60 3.2
       
    35  */
       
    36 class CSVPPositioningProvider : public CActive
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      * @param aPriority Active object priority
       
    44      * @param aObserver Observer
       
    45      */
       
    46     static CSVPPositioningProvider* NewL( 
       
    47         TPriority aPriority, MSVPPositioningProviderObserver& aObserver );
       
    48     
       
    49     static CSVPPositioningProvider* NewLC( 
       
    50         TPriority aPriority, MSVPPositioningProviderObserver& aObserver );
       
    51     
       
    52     /**
       
    53     * Destructor.
       
    54     */
       
    55     virtual ~CSVPPositioningProvider();
       
    56 
       
    57     /**
       
    58      * Opens positioning module
       
    59      *
       
    60      * @since S60 3.2
       
    61      * @param aModuleId Module to be opened
       
    62      */
       
    63     void OpenModuleL( TInt aModuleId );
       
    64 
       
    65     /**
       
    66      * Closes positioning module
       
    67      *
       
    68      * @since S60 3.2
       
    69      */
       
    70     void CloseModule();
       
    71 
       
    72     /**
       
    73      * Requests position information asynchronically
       
    74      *
       
    75      * @since S60 3.2
       
    76      * @param aIapId IAP ID
       
    77      * @param aApplicationName Identifies requestor
       
    78      * @param aTimeout Timeout for position request in microseconds
       
    79      */
       
    80     void MakePositioningRequestL( 
       
    81         TUint32 aIapId, 
       
    82         const TDesC& aApplicationName, 
       
    83         TUint32 aTimeout );
       
    84 
       
    85 private:
       
    86 
       
    87     CSVPPositioningProvider( 
       
    88         TPriority aPriority, MSVPPositioningProviderObserver& aObserver );
       
    89 
       
    90     void ConstructL();
       
    91     
       
    92 // from base class CActive
       
    93 
       
    94     void DoCancel();
       
    95     
       
    96     void RunL();
       
    97     
       
    98 private: // data
       
    99 
       
   100     /**
       
   101      * Observer
       
   102      */
       
   103     MSVPPositioningProviderObserver& iObserver;
       
   104 
       
   105     /**
       
   106      * Position server
       
   107      */
       
   108     RPositionServer iPositionServer;
       
   109 
       
   110     /**
       
   111      * Positioner
       
   112      */
       
   113     RPositioner iPositioner;
       
   114 
       
   115     /**
       
   116      * Generic position information
       
   117      * Own.  
       
   118      */
       
   119     HPositionGenericInfo* iPositionGenericInfo;
       
   120 
       
   121 private:
       
   122 
       
   123     // For testing
       
   124     SVP_UT_DEFS
       
   125     
       
   126     };
       
   127 
       
   128 #endif // C_SVPPOSITIONINGPROVIDER_H