epoc32/include/lbs/lbssuplpush.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Location Based Services SUPL Push API
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @deprecated
       
    22 */
       
    23 #ifndef SUPL_PUSH_H
       
    24 #define SUPL_PUSH_H
       
    25 
       
    26 
       
    27 //-------------------------------------------------------------------------------
       
    28 #include <e32base.h>
       
    29 #include <lbs/lbssuplpushcommon.h>
       
    30 
       
    31 //-------------------------------------------------------------------------------
       
    32 class CLbsSuplPushImpl;
       
    33 
       
    34 
       
    35 //-------------------------------------------------------------------------------
       
    36 /**
       
    37 The MLbsSuplPushObserver class provides a call-back type of interface that must be
       
    38 used together with the CLbsSuplPush class. A class using the CLbsSuplPush interface must 
       
    39 derive from MLbsSuplPushObserver and implement appropriate virtual methods in order
       
    40 to receive notifications about request completions.
       
    41 
       
    42 @publishedPartner
       
    43 @deprecated
       
    44 @see CLbsSuplPush
       
    45 */
       
    46 class MLbsSuplPushObserver
       
    47 	{
       
    48 public:
       
    49 	IMPORT_C virtual TVersion Version() const;
       
    50 
       
    51 	/**
       
    52 	Receive notification that the SUPL Init message has been sent to the LBS sub-system.
       
    53 	The call-back is invoked immediately after delivery of the SUPL INIT request and 
       
    54 	does not provide any information about it's outcome, e.g. conflict control results,
       
    55 	host validation results, connection results etc.
       
    56 	
       
    57 	@param aChannel  [In] The channel the call-back is related to.
       
    58 	@param aReqId    [In] An Id of the request the call-back is related to.
       
    59 	@param aError    [In] KErrNone if successful, KErrTimeout if it was not possible to deliver
       
    60 	                      the request before the timeout period, KErrArgument if the structure 
       
    61 	                      or content of the SUPL INIT message was incorrect. 
       
    62 	                      Any system wide error code otherwise.
       
    63 	@param aReserved [In] Reserved for future use.
       
    64 	
       
    65 	@see CLbsSuplPush::SuplInit
       
    66 	*/
       
    67 	virtual void OnSuplInitComplete(TLbsSuplPushChannel aChannel, TLbsSuplPushRequestId aReqId, TInt aError, TInt aReserved) = 0;
       
    68 
       
    69 protected:			
       
    70 	/**
       
    71 	Should not be used. Provides for future expansion of the observer interface. 
       
    72 	Currently not implemented.
       
    73 	*/  
       
    74 	IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
       
    75 	};
       
    76 
       
    77 
       
    78 //-------------------------------------------------------------------------------
       
    79 /**
       
    80 The CLbsSuplPush class provides an interface to send SUPL INIT Push messages into
       
    81 the LBS sub-system. Normally SUPL INIT messages arrive through SMS or WAP push 
       
    82 and, if accepted, result in the opening of a a TCP/IP connection to the SLP (SUPL Server).
       
    83 
       
    84 Although it is possible for multiple threads to open a channel of the same type 
       
    85 (e.g. SMS or WAP), only one thread can actively use the channel at any time. A system 
       
    86 requiring concurrent access to a channel must provide its own access control mechanism.
       
    87 
       
    88 Unless documented explicitly, no assumptions should be made about the order and/or 
       
    89 content of notifications generated by the LBS sub-system through this or 
       
    90 other interfaces.
       
    91 
       
    92 @publishedPartner
       
    93 @deprecated
       
    94 @see MLbsSuplPushObserver
       
    95 */
       
    96 NONSHARABLE_CLASS(CLbsSuplPush) : public CBase
       
    97 	{
       
    98 public:
       
    99 	IMPORT_C static CLbsSuplPush* NewL(TLbsSuplPushChannel aChannel, MLbsSuplPushObserver& aObserver);
       
   100 	virtual ~CLbsSuplPush();
       
   101 	
       
   102 public:
       
   103 	IMPORT_C TInt SuplInit(TLbsSuplPushRequestId& aReqId, const TDesC8& aMsg, TInt aReserved);
       
   104 	
       
   105 private:
       
   106 	CLbsSuplPush();
       
   107 	void ConstructL(TLbsSuplPushChannel aChannel, MLbsSuplPushObserver& aObserver);
       
   108 	
       
   109 	//** Prohibit copy constructor */
       
   110 	CLbsSuplPush(const CLbsSuplPush&);
       
   111 	//** Prohibit assigment operator */
       
   112 	CLbsSuplPush& operator= (const CLbsSuplPush&);
       
   113 
       
   114 private:
       
   115 	/** CLbsSuplPushImpl* Impl is the internal handle to the Implementation */
       
   116 	CLbsSuplPushImpl* iImpl;
       
   117 	};
       
   118 
       
   119 #endif //SUPL_PUSH_H