common/tools/ats/smoketest/lbs/common/inc/ctlbsrequester.h
changeset 748 e13acd883fbe
child 872 17498133d9ad
equal deleted inserted replaced
747:76f9aaeefbab 748:e13acd883fbe
       
     1 /*
       
     2 * Copyright (c) 2000-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 the License "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CT_LBS_REQUESTER_H__
       
    21 #define __CT_LBS_REQUESTER_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <Lbs.h>
       
    26 #include <testexecutelogger.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MCT_LbsRequestObserver;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  ?one_line_short_description.
       
    37 *  ?other_description_lines
       
    38 */
       
    39 class CT_LbsRequester : public CActive
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         * @return A new instance of this class.
       
    46         */
       
    47         static CT_LbsRequester* NewL(
       
    48             /* IN  */   TUid                	aPsyUid,
       
    49             /* IN  */   MCT_LbsRequestObserver*	aObserver,
       
    50             CTestExecuteLogger&					aLogger
       
    51             );
       
    52         
       
    53         /**
       
    54 		* Two-phased constructor.
       
    55 		* @return A new instance of this class.
       
    56 		*/
       
    57 		static CT_LbsRequester* NewL(
       
    58 		    /* IN  */   MCT_LbsRequestObserver*		aObserver,
       
    59 		    /* IN  */   TTimeIntervalMicroSeconds	aInterval,
       
    60 		    CTestExecuteLogger&						aLogger
       
    61 		    );
       
    62         
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         virtual ~CT_LbsRequester();
       
    67 
       
    68     protected:
       
    69 
       
    70         /**
       
    71         * C++ default constructor.
       
    72         */
       
    73         CT_LbsRequester(
       
    74             /* IN  */   MCT_LbsRequestObserver*   aObserver
       
    75             );
       
    76 
       
    77         /**
       
    78         * By default EPOC constructor is private.
       
    79         */
       
    80         void ConstructL(TUid aPsyUid, CTestExecuteLogger& aLogger);
       
    81 
       
    82         /**
       
    83         * By default EPOC constructor is private.
       
    84         */
       
    85         void ConstructL(TTimeIntervalMicroSeconds aInterval, CTestExecuteLogger& aLogger);
       
    86 
       
    87     public: // New functions
       
    88         
       
    89         const TTime& CompletionTimeUTC() const;
       
    90         TInt CompletionCode() const;
       
    91         void GetPositionInfo(
       
    92             TPositionInfo& aModuleInfo
       
    93                         );
       
    94 
       
    95 		/**
       
    96         * Set Requestorstack
       
    97         */
       
    98         TInt SetRequestorStackL(const TDesC& aService, const TDesC& aContact);
       
    99 
       
   100         /**
       
   101         * Performs a request to iPsy. Notifies iObserver when request is complete
       
   102         */
       
   103         void StartRequest();
       
   104 
       
   105 
       
   106         /**
       
   107         * Performs a request to iPsy. Notifies iObserver when request is complete
       
   108         */
       
   109         void SetUpdateIntervalL(TTimeIntervalMicroSeconds aInterval);
       
   110 
       
   111         void SetUpdateType(const TInt& aUpdateType);
       
   112 
       
   113     public: // Functions from base classes
       
   114 
       
   115         void RunL();
       
   116 
       
   117         void DoCancel();
       
   118 
       
   119     protected: // New functions
       
   120 
       
   121         void RequestComplete();
       
   122 
       
   123     private:
       
   124 
       
   125         // By default, prohibit copy constructor
       
   126         CT_LbsRequester( const CT_LbsRequester& );
       
   127         // Prohibit assigment operator
       
   128         CT_LbsRequester& operator= ( const CT_LbsRequester& );
       
   129         
       
   130     	// Logger interface used for constructing result strings to be fed for the logger instance
       
   131     	inline CTestExecuteLogger& Logger() {return iLogger;};
       
   132 
       
   133     private:    // Data
       
   134 
       
   135         RPositionServer     iPosServer;
       
   136         RPositioner         iPositioner;
       
   137 
       
   138         MCT_LbsRequestObserver*   iObserver;
       
   139         TTime               iCompletionTimeUTC;
       
   140         TInt                iCompletionCode;
       
   141         TRequestStatus      iRequestStatus;
       
   142         TPositionInfo       iModuleInfo;
       
   143         
       
   144         CTestExecuteLogger	iLogger;
       
   145     };
       
   146 
       
   147 #endif      // __CT_LBS_REQUESTER_H__  
       
   148             
       
   149 // End of File