|
1 //lbsprivacyrequestimpl.h |
|
2 |
|
3 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 // All rights reserved. |
|
5 // This component and the accompanying materials are made available |
|
6 // under the terms of "Eclipse Public License v1.0" |
|
7 // which accompanies this distribution, and is available |
|
8 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 // |
|
10 // Initial Contributors: |
|
11 // Nokia Corporation - initial contribution. |
|
12 // |
|
13 // Contributors: |
|
14 // |
|
15 // Description: |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #ifndef LBS_PRIVACYREQUESTIMPL_H |
|
24 #define LBS_PRIVACYREQUESTIMPL_H |
|
25 |
|
26 // System |
|
27 #include <e32base.h> |
|
28 #include <e32cmn.h> |
|
29 #include "lbsprivacyclient.h" |
|
30 #include "lbsprivacyrequest.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CPrivacyRequestResponseHandler; |
|
34 class MLbsPrivacyRequestObserver; |
|
35 |
|
36 NONSHARABLE_CLASS(CLbsPrivacyRequestImpl) : public CBase |
|
37 { |
|
38 |
|
39 public: |
|
40 static CLbsPrivacyRequestImpl* NewL(MLbsPrivacyRequestObserver& aObserver /*in*/); |
|
41 virtual ~CLbsPrivacyRequestImpl(); |
|
42 |
|
43 public: |
|
44 TInt NewPrivacyRequest(TLbsPrivacyRequestId& aRequestId, /*out*/ |
|
45 const TLbsPrivacyRequest& aPrivacy,/*in*/ |
|
46 const TLbsExternalRequestInfo& aRequestInfo/*in*/); |
|
47 |
|
48 TInt RepeatPrivacyRequest(const TLbsPrivacyRequestId aRequestId, /*in*/ |
|
49 const TLbsPrivacyRequest& aPrivacy,/*in*/ |
|
50 const TLbsExternalRequestInfo& aRequestInfo/*in*/); |
|
51 |
|
52 TInt CompleteRequest(TLbsPrivacyRequestId aRequestId/*in*/, |
|
53 TInt aReason/*in*/); |
|
54 |
|
55 public: |
|
56 void RemoveHandler(CPrivacyRequestResponseHandler* aHandler); |
|
57 |
|
58 private: |
|
59 CLbsPrivacyRequestImpl(MLbsPrivacyRequestObserver& aObserver); |
|
60 void ConstructL(); |
|
61 // By default, prohibit copy constructor |
|
62 CLbsPrivacyRequestImpl(const CLbsPrivacyRequestImpl&); |
|
63 // Prohibit assigment operator |
|
64 CLbsPrivacyRequestImpl& operator= (const CLbsPrivacyRequestImpl&); |
|
65 |
|
66 TInt ValidateNewPrivReqArguments(const TLbsPrivacyRequest& aPrivacy, const TLbsExternalRequestInfo& aRequestInfo); |
|
67 TInt ValidateRepeatPrivReqArguments(const TLbsPrivacyRequestId aRequestId, const TLbsPrivacyRequest& aPrivacy, const TLbsExternalRequestInfo& aRequestInfo); |
|
68 |
|
69 private: |
|
70 MLbsPrivacyRequestObserver& iObserver; |
|
71 |
|
72 RPrivacyServer iServer; |
|
73 RPointerArray<CPrivacyRequestResponseHandler> iResponseHandler; |
|
74 }; |
|
75 |
|
76 #endif // LBS_PRIVACYREQUESTIMPL_H |