diff -r e8c1ea2c6496 -r 8758140453c0 lbs/common/inc/ctlbsclientrequestor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lbs/common/inc/ctlbsclientrequestor.h Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,146 @@ +/* +* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __CT_LBS_CLIENT_REQUESTOR_H__ +#define __CT_LBS_CLIENT_REQUESTOR_H__ + +// INCLUDES +#include +#include +#include +#include +#include +#include + + +// CONSTANTS +const TInt KNoEvent = 42; + +// FORWARD DECLARATIONS +class MCT_LbsRequestObserver; + +// CLASS DECLARATION + +/** +* ?one_line_short_description. +* ?other_description_lines +*/ +class CT_LbsClientRequestor : public CActive + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @return A new instance of this class. + */ + static CT_LbsClientRequestor* NewL( + /* IN */ TUid aPsyUid, + /* IN */ MCT_LbsRequestObserver* aObserver, + /* IN */ const TDesC& aClientName, + CTestExecuteLogger& aLogger + ); + + /** + * Destructor. + */ + virtual ~CT_LbsClientRequestor(); + + protected: + + /** + * C++ default constructor. + */ + CT_LbsClientRequestor( + /* IN */ MCT_LbsRequestObserver* aObserver, + TUid aPsyUid + ); + + /** + * By default EPOC constructor is private. + */ + void ConstructL(const TDesC& aClientName, CTestExecuteLogger& aLogger); + + public: // New functions + + const TTime& CompletionTimeUTC() const; + + TInt CompletionCode() const; + + void ResetCompletionCode(); + + /** + * Performs a request to iPsy. Notifies iObserver when request is complete + */ + void StartRequestL(TBool aDefaultPsy); + + void RequestModuleStatusEvent(); + + TInt ReadModuleStatusEvent(); + + void ContinueRequesting(); + + void ClosePositioner(); + + TBool ReadModuleStatusModulesApi(CPosModules* aDb, TPositionModuleId aModuleId); + + TInt ReadModuleStatusClientApi(TPositionModuleId aModuleId); + + void CancelModuleStatusEvent(); + + public: // Functions from base classes + + void RunL(); + + void DoCancel(); + + protected: // New functions + + void RequestComplete(); + + private: + + // By default, prohibit copy constructor + CT_LbsClientRequestor( const CT_LbsClientRequestor& ); + // Prohibit assigment operator + CT_LbsClientRequestor& operator= ( const CT_LbsClientRequestor& ); + + // Logger interface used for constructing result strings to be fed for the logger instance + inline CTestExecuteLogger& Logger() {return iLogger;}; + + private: // Data + + RPositionServer iPosServer; + RPositioner iPositioner; + TBuf<100> iName; + + MCT_LbsRequestObserver* iObserver; + TTime iCompletionTimeUTC; + TInt iCompletionCode; + TRequestStatus iRequestStatus; + TPositionInfo iModuleInfo; + TUid iPsyUid; + TPositionModuleStatusEvent istatusEvent; + TBool iContinueEventRequesting; + + CTestExecuteLogger iLogger; + }; + +#endif // __CT_LBS_CLIENT_REQUESTOR_H__ + +// End of File