|
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 #ifndef __PRIVACYSESSION_H__ |
|
17 #define __PRIVACYSESSION_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "privacyserver.h" |
|
21 #include "lbsprivacyservermsgenums.h" |
|
22 |
|
23 |
|
24 class CRequestInfoBase; |
|
25 |
|
26 /** |
|
27 CPrivacySession |
|
28 */ |
|
29 class CPrivacySession : public CSession2 |
|
30 { |
|
31 public: |
|
32 // Constructor |
|
33 CPrivacySession(MPrivacyProtocol& aProtocol, |
|
34 TLbsProxyApiType aApiType); |
|
35 virtual ~CPrivacySession(); |
|
36 |
|
37 // CSession2 |
|
38 void CreateL(); |
|
39 void ServiceL(const RMessage2& aMessage); |
|
40 void Disconnect(const RMessage2& aMessage); |
|
41 |
|
42 protected: |
|
43 CPrivacyServer& Server(); |
|
44 |
|
45 private: |
|
46 void CancelVerifyLocationRequest(const RMessage2& aMessage); |
|
47 void NotifyLocationRequest(const RMessage2& aMessage); |
|
48 void NotifyVerificationTimeout(const RMessage2& aMessage); |
|
49 void VerifyLocationRequest(const RMessage2& aMessage); |
|
50 void NewPrivacyRequest(const RMessage2& aMessage); |
|
51 void RepeatPrivacyRequest(const RMessage2& aMessage); |
|
52 void PrivacyRequest(const RMessage2& aMessage, TInt aRequestId); |
|
53 void CompleteRequest(const RMessage2& aMessage); |
|
54 |
|
55 TBool IsRequestInfoValid(const CRequestInfoBase& aRequestInfo); |
|
56 |
|
57 private: |
|
58 |
|
59 MPrivacyProtocol& iProtocol; |
|
60 TLbsProxyApiType iApiType; |
|
61 |
|
62 }; |
|
63 |
|
64 #endif // __PRIVACYSESSION_H__ |