1 /* |
|
2 * Copyright (c) 2002-2004 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 "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of customization components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __TARMDmAdapter_H__ |
|
21 #define __TARMDmAdapter_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <smldmadapter.h> |
|
26 |
|
27 //#ifdef __SAP_POLICY_MANAGEMENT |
|
28 #include <PolicyEngineClient.h> |
|
29 //#endif |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 // Adapter to check policy and if allowed to call "original" adapter |
|
35 class CTARMDmAdapter : public CSmlDmAdapter |
|
36 { |
|
37 public: |
|
38 |
|
39 // Implementation of MSmlDmAdapter interface functions that make policy checks |
|
40 // =========================================================================== |
|
41 private: |
|
42 void UpdateLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aObject, const TDesC8& aType, TInt aStatusRef ); |
|
43 void UpdateLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef ); |
|
44 void DeleteObjectL( const TDesC8& aURI, const TDesC8& aLUID, TInt aStatusRef ); |
|
45 void FetchLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aType, TInt aResultsRef, TInt aStatusRef ); |
|
46 void FetchLeafObjectSizeL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aType, TInt aResultsRef, TInt aStatusRef ); |
|
47 void ChildURIListL( const TDesC8& aURI, const TDesC8& aLUID, const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList, TInt aResultsRef, TInt aStatusRef ); |
|
48 |
|
49 void AddNodeObjectL( const TDesC8& aURI, const TDesC8& aParentLUID, TInt aStatusRef ); |
|
50 void ExecuteCommandL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aArgument, const TDesC8& aType, TInt aStatusRef ); |
|
51 void ExecuteCommandL( const TDesC8& aURI, const TDesC8& aLUID, RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef ); |
|
52 void CopyCommandL( const TDesC8& aTargetURI, const TDesC8& aTargetLUID, const TDesC8& aSourceURI, const TDesC8& aSourceLUID, const TDesC8& aType, TInt aStatusRef ); |
|
53 |
|
54 // Implementation of MSmlDmAdapter interface functions AFTER policy checks |
|
55 // ======================================================================= |
|
56 public: |
|
57 virtual void _UpdateLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aObject, const TDesC8& aType, TInt aStatusRef ) = 0; |
|
58 virtual void _UpdateLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef ) = 0; |
|
59 virtual void _DeleteObjectL( const TDesC8& aURI, const TDesC8& aLUID, TInt aStatusRef ) = 0; |
|
60 virtual void _FetchLeafObjectL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aType, TInt aResultsRef, TInt aStatusRef ) = 0; |
|
61 virtual void _FetchLeafObjectSizeL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aType, TInt aResultsRef, TInt aStatusRef ) = 0; |
|
62 virtual void _ChildURIListL( const TDesC8& aURI, const TDesC8& aLUID, const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList, TInt aResultsRef, TInt aStatusRef ) = 0; |
|
63 |
|
64 virtual void _AddNodeObjectL( const TDesC8& aURI, const TDesC8& aParentLUID, TInt aStatusRef ) = 0; |
|
65 virtual void _ExecuteCommandL( const TDesC8& aURI, const TDesC8& aLUID, const TDesC8& aArgument, const TDesC8& aType, TInt aStatusRef ) = 0; |
|
66 virtual void _ExecuteCommandL( const TDesC8& aURI, const TDesC8& aLUID, RWriteStream*& aStream, const TDesC8& aType, TInt aStatusRef ) = 0; |
|
67 virtual void _CopyCommandL( const TDesC8& aTargetURI, const TDesC8& aTargetLUID, const TDesC8& aSourceURI, const TDesC8& aSourceLUID, const TDesC8& aType, TInt aStatusRef ) = 0; |
|
68 |
|
69 // Other |
|
70 |
|
71 //#ifdef __SAP_POLICY_MANAGEMENT |
|
72 // PolicyCheck |
|
73 virtual TPtrC8 PolicyRequestResourceL( const TDesC8& aURI ) = 0; |
|
74 virtual TInt CheckPolicyL( const TDesC8& aURI ); |
|
75 virtual TInt CheckPolicy2L( const TDesC8& aResource ); |
|
76 //#endif |
|
77 // Other |
|
78 |
|
79 protected: |
|
80 CTARMDmAdapter( MSmlDmCallback* aCallback ); |
|
81 virtual ~CTARMDmAdapter(); |
|
82 |
|
83 private: |
|
84 virtual void InitializeL(); |
|
85 |
|
86 protected: |
|
87 TBool iInitialized; |
|
88 |
|
89 private: |
|
90 |
|
91 //#ifdef __SAP_POLICY_MANAGEMENT |
|
92 RPolicyEngine iPE; |
|
93 RPolicyRequest iPR; |
|
94 //#endif |
|
95 }; |
|
96 |
|
97 #endif // __TARMDmAdapter_H__ |
|
98 |
|
99 // End of File |
|