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_POS_PAYLOAD_H |
|
22 #define LBS_SUPL_POS_PAYLOAD_H |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 /** |
|
28 CSuplPosPayload is an abstract class providing a base definition for SUPL positioning |
|
29 payload messages either received or under construction for sending. SUPL supports |
|
30 positioning using the RRLP, TIA-801 and RRC protocols. This reference SUPL |
|
31 Protocol Manager implementation supports only the RRLP positioning protocol. |
|
32 |
|
33 Concrete classes derived from this class represent each of the supported |
|
34 positioning protocol message types, and provide methods for accessing and setting |
|
35 their parameters. |
|
36 |
|
37 @internalTechnology |
|
38 */ |
|
39 NONSHARABLE_CLASS(CSuplPosPayload) : public CBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** Pos Payload identifiers */ |
|
44 typedef TUint32 TSuplPosPayloadType; |
|
45 enum _TSuplPosPayloadType |
|
46 { |
|
47 ERrlpAssistanceData = 0, |
|
48 ERrlpAssistanceDataAck, |
|
49 ERrlpMeasurePositionReq, |
|
50 ERrlpMeasurePositionResp, |
|
51 ERrlpProtocolError, |
|
52 |
|
53 EPosPayloadMessageTypeLimit |
|
54 }; |
|
55 |
|
56 protected: |
|
57 CSuplPosPayload(TSuplPosPayloadType aType, TBool aIsOutgoingMsg); |
|
58 |
|
59 public: |
|
60 virtual ~CSuplPosPayload(); |
|
61 |
|
62 public: |
|
63 |
|
64 /** Returns the message type */ |
|
65 IMPORT_C CSuplPosPayload::TSuplPosPayloadType MessageType(); |
|
66 |
|
67 /** Decodes a pos payload and returns a CSuplPosPayload object containing the decoded payload */ |
|
68 IMPORT_C static CSuplPosPayload* DecodePosPayloadL(const HBufC8* aPosPayload, TInt& aError); |
|
69 |
|
70 /** Encode a populated outgoing message */ |
|
71 virtual TInt EncodeToL(TPtr8& aBuf); |
|
72 |
|
73 /** Prints the content of the data structure to the logger */ |
|
74 virtual void LogMessageContent(); |
|
75 |
|
76 private: |
|
77 |
|
78 /** Prohibit copy constructor */ |
|
79 CSuplPosPayload(const CSuplPosPayload&); |
|
80 |
|
81 /** Prohibit assigment operator */ |
|
82 CSuplPosPayload& operator= (const CSuplPosPayload&); |
|
83 |
|
84 protected: |
|
85 |
|
86 /** Message type identifiers */ |
|
87 TSuplPosPayloadType iMessageType; |
|
88 TBool iIsOutgoingMessage; |
|
89 }; |
|
90 |
|
91 #endif // LBS_SUPL_POS_PAYLOAD_H |
|