williamr@4: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // Location Based Services SUPL Push API williamr@4: // williamr@4: // williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedPartner williamr@4: @deprecated williamr@4: */ williamr@4: #ifndef SUPL_PUSH_H williamr@4: #define SUPL_PUSH_H williamr@4: williamr@4: williamr@4: //------------------------------------------------------------------------------- williamr@4: #include williamr@4: #include williamr@4: williamr@4: //------------------------------------------------------------------------------- williamr@4: class CLbsSuplPushImpl; williamr@4: williamr@4: williamr@4: //------------------------------------------------------------------------------- williamr@4: /** williamr@4: The MLbsSuplPushObserver class provides a call-back type of interface that must be williamr@4: used together with the CLbsSuplPush class. A class using the CLbsSuplPush interface must williamr@4: derive from MLbsSuplPushObserver and implement appropriate virtual methods in order williamr@4: to receive notifications about request completions. williamr@4: williamr@4: @publishedPartner williamr@4: @deprecated williamr@4: @see CLbsSuplPush williamr@4: */ williamr@4: class MLbsSuplPushObserver williamr@4: { williamr@4: public: williamr@4: IMPORT_C virtual TVersion Version() const; williamr@4: williamr@4: /** williamr@4: Receive notification that the SUPL Init message has been sent to the LBS sub-system. williamr@4: The call-back is invoked immediately after delivery of the SUPL INIT request and williamr@4: does not provide any information about it's outcome, e.g. conflict control results, williamr@4: host validation results, connection results etc. williamr@4: williamr@4: @param aChannel [In] The channel the call-back is related to. williamr@4: @param aReqId [In] An Id of the request the call-back is related to. williamr@4: @param aError [In] KErrNone if successful, KErrTimeout if it was not possible to deliver williamr@4: the request before the timeout period, KErrArgument if the structure williamr@4: or content of the SUPL INIT message was incorrect. williamr@4: Any system wide error code otherwise. williamr@4: @param aReserved [In] Reserved for future use. williamr@4: williamr@4: @see CLbsSuplPush::SuplInit williamr@4: */ williamr@4: virtual void OnSuplInitComplete(TLbsSuplPushChannel aChannel, TLbsSuplPushRequestId aReqId, TInt aError, TInt aReserved) = 0; williamr@4: williamr@4: protected: williamr@4: /** williamr@4: Should not be used. Provides for future expansion of the observer interface. williamr@4: Currently not implemented. williamr@4: */ williamr@4: IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2); williamr@4: }; williamr@4: williamr@4: williamr@4: //------------------------------------------------------------------------------- williamr@4: /** williamr@4: The CLbsSuplPush class provides an interface to send SUPL INIT Push messages into williamr@4: the LBS sub-system. Normally SUPL INIT messages arrive through SMS or WAP push williamr@4: and, if accepted, result in the opening of a a TCP/IP connection to the SLP (SUPL Server). williamr@4: williamr@4: Although it is possible for multiple threads to open a channel of the same type williamr@4: (e.g. SMS or WAP), only one thread can actively use the channel at any time. A system williamr@4: requiring concurrent access to a channel must provide its own access control mechanism. williamr@4: williamr@4: Unless documented explicitly, no assumptions should be made about the order and/or williamr@4: content of notifications generated by the LBS sub-system through this or williamr@4: other interfaces. williamr@4: williamr@4: @publishedPartner williamr@4: @deprecated williamr@4: @see MLbsSuplPushObserver williamr@4: */ williamr@4: NONSHARABLE_CLASS(CLbsSuplPush) : public CBase williamr@4: { williamr@4: public: williamr@4: IMPORT_C static CLbsSuplPush* NewL(TLbsSuplPushChannel aChannel, MLbsSuplPushObserver& aObserver); williamr@4: virtual ~CLbsSuplPush(); williamr@4: williamr@4: public: williamr@4: IMPORT_C TInt SuplInit(TLbsSuplPushRequestId& aReqId, const TDesC8& aMsg, TInt aReserved); williamr@4: williamr@4: private: williamr@4: CLbsSuplPush(); williamr@4: void ConstructL(TLbsSuplPushChannel aChannel, MLbsSuplPushObserver& aObserver); williamr@4: williamr@4: //** Prohibit copy constructor */ williamr@4: CLbsSuplPush(const CLbsSuplPush&); williamr@4: //** Prohibit assigment operator */ williamr@4: CLbsSuplPush& operator= (const CLbsSuplPush&); williamr@4: williamr@4: private: williamr@4: /** CLbsSuplPushImpl* Impl is the internal handle to the Implementation */ williamr@4: CLbsSuplPushImpl* iImpl; williamr@4: }; williamr@4: williamr@4: #endif //SUPL_PUSH_H