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