|
1 /** |
|
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 @publishedPartner |
|
25 @released |
|
26 */ |
|
27 |
|
28 #ifndef LBS_EXTERNAL_LOCATE_LOG_EVENT_H |
|
29 #define LBS_EXTERNAL_LOCATE_LOG_EVENT_H |
|
30 |
|
31 #include <lbs/lbslogevent.h> |
|
32 #include <lbs/lbsnetprotocolbase.h> |
|
33 |
|
34 #include <lbs/lbsloccommon.h> // For TLbsExternalRequestInfo |
|
35 #include "lbsnetcommon.h" // For TLbsNetSessionId |
|
36 |
|
37 /** |
|
38 the privacy request parameter structure |
|
39 */ |
|
40 class TLbsLoggingPrivacyRequestParams |
|
41 { |
|
42 public: |
|
43 TLbsNetSessionId iSessionId; |
|
44 TLbsExternalRequestInfo iRequestInfo; |
|
45 TLbsNetPosRequestPrivacy iRequestPrivacy; |
|
46 }; |
|
47 |
|
48 /** |
|
49 the privacy response parameter structure |
|
50 */ |
|
51 class TLbsLoggingPrivacyResponseParams |
|
52 { |
|
53 public: |
|
54 TLbsNetSessionId iSessionId; |
|
55 /** verification result to the privacy request */ |
|
56 CLbsNetworkProtocolBase::TLbsPrivacyResponse iResult; |
|
57 } ; |
|
58 |
|
59 /** log event object for external locate request */ |
|
60 class CLbsExternalLocateLogEvent : public CLbsLogEvent |
|
61 { |
|
62 public: |
|
63 IMPORT_C static CLbsExternalLocateLogEvent* NewL(TUid aRequestOriginator,TPositionInfoBase* aRefPosInfo, TPositionInfoBase* aPosInfo); |
|
64 IMPORT_C void SetPrivacyRequestParams(const TLbsLoggingPrivacyRequestParams& aParams); |
|
65 IMPORT_C void SetPrivacyResponseParams(const TLbsLoggingPrivacyResponseParams& aParams); |
|
66 IMPORT_C void SetReferenceLocation(TPositionInfoBase* aPosInfo); |
|
67 ~CLbsExternalLocateLogEvent(); |
|
68 |
|
69 // for external locate |
|
70 IMPORT_C TPositionInfoBase* ReferenceLocation() const; |
|
71 IMPORT_C void SetRequestOriginator(TUid aRequestor); |
|
72 IMPORT_C TUid RequestOriginator() const; |
|
73 IMPORT_C TLbsLoggingPrivacyRequestParams PrivacyRequestParams() const; |
|
74 IMPORT_C TLbsLoggingPrivacyResponseParams PrivacyResponseParams() const; |
|
75 |
|
76 protected: |
|
77 void DoExternalizeL(RWriteStream& aWriteStream) const; |
|
78 void DoInternalizeL(RReadStream& aReadStream); |
|
79 void DoUpdateL(const CLbsLogEvent& aSourceLogEvent); |
|
80 void DoCopyL(CLbsLogEvent*& aTargetLogEvent) const; |
|
81 TInt DataSize() const; |
|
82 private: |
|
83 CLbsExternalLocateLogEvent(); |
|
84 void ConstructL(TUid aRequestOriginator, TPositionInfoBase* aRefPosInfo, TPositionInfoBase* aPosInfo); |
|
85 void CopyPrivacyRequestParams(TLbsLoggingPrivacyRequestParams& aTargetPrivacyInfo, |
|
86 const TLbsLoggingPrivacyRequestParams& aSourcePrivacyInfo); |
|
87 void CopyPrivacyResponseParams(TLbsLoggingPrivacyResponseParams& aTargetPrivacyInfo, |
|
88 const TLbsLoggingPrivacyResponseParams& aSourcePrivacyInfo); |
|
89 private: |
|
90 /** Descriptor of the request originator */ |
|
91 TUid iRequestOriginator; |
|
92 /** Privacy request/response info */ |
|
93 TLbsLoggingPrivacyRequestParams iPrivacyReqInfo; |
|
94 /** Indicate whether the MT-LR access is granted or not */ |
|
95 TLbsLoggingPrivacyResponseParams iPrivacyResInfo; |
|
96 /** The calculation method indicates MS-Based or Autonomous GPS is withint TPositionInfoBase */ |
|
97 /** The positioning mode used to calculate this location fix. */ |
|
98 // TPositionModuleInfo::TTechnologyType iPositionMode; |
|
99 /** The returned reference location information if the request is completed successfully */ |
|
100 TPositionInfo* iRefPosInfo; |
|
101 }; // class CLbsExternalLocateLogEvent |
|
102 |
|
103 #endif // LBS_EXTERNAL_LOCATE_LOG_EVENT_H |