|
1 /* |
|
2 * Copyright (c) 2006-2006 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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef WSSTAR_POLICY_MERGER_H |
|
26 #define WSSTAR_POLICY_MERGER_H |
|
27 |
|
28 #include <SenDomFragmentBase.h> |
|
29 #include <RSenDocument.h> |
|
30 #include <XmlEngDDocument.h> |
|
31 |
|
32 |
|
33 class CSenElement; |
|
34 class CWsSecurityPolicy; |
|
35 |
|
36 /** |
|
37 * Class: CPolicyMerger |
|
38 * Description: This class can merge two polcicies provided as fileNames or TElement |
|
39 * The Merging take care of domian specific knowledge of the assertion and can resolve it. |
|
40 * currently only Ws-SecurityPolicy domain is supported |
|
41 */ |
|
42 |
|
43 class CPolicyMerger : public CBase //CodeScannerWarnings |
|
44 |
|
45 { |
|
46 |
|
47 public: |
|
48 |
|
49 static CPolicyMerger* NewL(); |
|
50 static CPolicyMerger* NewLC(); |
|
51 |
|
52 virtual ~CPolicyMerger(); |
|
53 |
|
54 TXmlEngElement MergeL(TDesC& aFirstPolicy, TDesC& aSecondPolicy); //filenames with absolute path |
|
55 TXmlEngElement MergeL(TXmlEngElement aFirstPolicy, TXmlEngElement aSecondPolicy); //root elements |
|
56 private: |
|
57 |
|
58 void ConstructL(); |
|
59 |
|
60 CPolicyMerger(); |
|
61 |
|
62 void MergeAllANDAssertionsL(TXmlEngElement aFirstElement, |
|
63 TXmlEngElement aSecondElement, RArray<TXmlEngElement>& aResult); |
|
64 TXmlEngElement MergeCompareSecondAssertionsL(TXmlEngElement aFirstElement, |
|
65 TXmlEngElement aSecondElement, TXmlEngElement aIntersectedAND); |
|
66 |
|
67 TInt VerifyNamespace(TXmlEngElement aFirstElement, TXmlEngElement aSecondElement); |
|
68 |
|
69 private: |
|
70 CWsSecurityPolicy* iSecurityPolicyDomain; |
|
71 |
|
72 TXmlEngElement irootAND; |
|
73 TXmlEngElement iMergedPolicyElement; |
|
74 |
|
75 RXmlEngDocument iPolicy1; |
|
76 RXmlEngDocument iPolicy2; |
|
77 |
|
78 // TString XORString; |
|
79 // TString ANDString; |
|
80 // TString policyNsUri; |
|
81 }; |
|
82 |
|
83 #endif //WSSTAR_POLICY_MERGER_H |