|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 |
|
20 */ |
|
21 #ifndef LBS_SUPL_INIT_H |
|
22 #define LBS_SUPL_INIT_H |
|
23 |
|
24 #include "suplmessagebase.h" |
|
25 #include <lbs/lbsnetcommon.h> |
|
26 #include <lbs/lbsloccommon.h> |
|
27 |
|
28 /** |
|
29 Encapsulation for received SUPL INIT messages. |
|
30 |
|
31 @internalTechnology |
|
32 */ |
|
33 NONSHARABLE_CLASS(CSuplInit) : public CSuplMessageBase |
|
34 { |
|
35 public: |
|
36 |
|
37 /** SLP Mode define */ |
|
38 typedef TUint32 TSuplSlpMode; |
|
39 |
|
40 /** SLP Mode enumeration */ |
|
41 enum _TSuplSlpMode |
|
42 { |
|
43 ESuplSlpModeProxy = 0, |
|
44 ESuplSlpModeNonProxy = 1 |
|
45 }; |
|
46 |
|
47 public: |
|
48 IMPORT_C static CSuplInit* NewL(); |
|
49 virtual ~CSuplInit(); |
|
50 |
|
51 public: |
|
52 |
|
53 /** Populates aMethod according to SUPL INIT posMethod parameter */ |
|
54 IMPORT_C TInt GetPosMethod(TLbsNetPosRequestMethod& aMethod); |
|
55 |
|
56 /** Returns ETrue if optional notification parameter is present */ |
|
57 IMPORT_C TBool NotificationPresent(); |
|
58 |
|
59 /** Populates aPrivacy according to SUPL INIT notification parameter */ |
|
60 IMPORT_C TInt GetNotificationType (TLbsNetPosRequestPrivacy& aPrivacy); |
|
61 |
|
62 /** Returns true if either optional requestor id or client name parameters are present */ |
|
63 IMPORT_C TBool ExternalRequestInfoPresent(); |
|
64 |
|
65 /** Populates aRequestInfo according to SUPL INIT requestor id parameter */ |
|
66 IMPORT_C TInt GetExternalRequestInfo (TLbsExternalRequestInfo& aRequestInfo); |
|
67 |
|
68 /** Returns true if optional SLP address parameter is present */ |
|
69 IMPORT_C TBool SlpAddressPresent(); |
|
70 |
|
71 /** Populates aAddress according to SUPL INIT SLP address parameter */ |
|
72 IMPORT_C TInt GetSlpAddress(CSuplSlpAddress& aAddress); |
|
73 |
|
74 /** Returns true if optional QoP parameter is present */ |
|
75 IMPORT_C TBool QopPresent(); |
|
76 |
|
77 /** Populates aAddress according to SUPL INIT QoP parameter */ |
|
78 IMPORT_C TInt GetQop (TLbsNetPosRequestQuality& aQuality); |
|
79 |
|
80 /** returns the SLP mode specified*/ |
|
81 IMPORT_C TSuplSlpMode SlpMode(); |
|
82 |
|
83 /** returns the encoded hash of the received SUPL INIT message */ |
|
84 IMPORT_C TPtrC8 GetVerL(const TDesC8 &aHSlp); |
|
85 |
|
86 /** Stores a copy of the unencoded received message data */ |
|
87 void SetReceivedMessageL(const TDesC8& aData); |
|
88 |
|
89 private: |
|
90 |
|
91 /** Constructor */ |
|
92 CSuplInit(); |
|
93 |
|
94 /** second stage constructor */ |
|
95 void ConstructL(); |
|
96 |
|
97 /** Prohibit copy constructor */ |
|
98 CSuplInit(const CSuplInit&); |
|
99 |
|
100 /** Prohibit assigment operator */ |
|
101 CSuplInit& operator= (const CSuplInit&); |
|
102 |
|
103 private: |
|
104 |
|
105 // storage for the un-decoded received message. |
|
106 HBufC8* iMessage; |
|
107 |
|
108 // storage for the hash of the received SUPL INIT message |
|
109 TBuf8<8> iVer; |
|
110 }; |
|
111 |
|
112 #endif // LBS_SUPL_INIT_H |
|
113 |