webservices/wsstar/wsstarpolicy/inc/policyintersecter.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     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_INTERSECTER_H
       
    26 #define WSSTAR_POLICY_INTERSECTER_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:   CPolicyIntersecter
       
    38  * Description: This class can intersect two polcicies provided as fileNames or TElements
       
    39  * The Intersection take care of domain specific knowledge of the assertions and can resolve it. 
       
    40  * currently only Ws-SecurityPolicy domain is supported
       
    41  */
       
    42 
       
    43 class CPolicyIntersecter : public CBase
       
    44 
       
    45 {
       
    46   
       
    47   public:
       
    48 
       
    49   static CPolicyIntersecter* NewL();
       
    50   static CPolicyIntersecter* NewLC();
       
    51     
       
    52   virtual ~CPolicyIntersecter();
       
    53 
       
    54   TXmlEngElement IntersectL(TDesC& aFirstPolicy, TDesC& aSecondPolicy); //filenames with absolute path
       
    55   TXmlEngElement IntersectL(TXmlEngElement aFirstPolicy, TXmlEngElement aSecondPolicy); //root elements
       
    56 private:
       
    57 
       
    58   void ConstructL();
       
    59 
       
    60   CPolicyIntersecter();
       
    61   
       
    62   void IntersectAllANDAssertionsL(TXmlEngElement aFirstElement, 
       
    63                     TXmlEngElement aSecondElement, RArray<TXmlEngElement>& aResult);
       
    64   TXmlEngElement IntersectCompareSecondAssertionsL(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    
       
    74    TXmlEngElement  iIntersectedPolicyElement;
       
    75    RXmlEngDocument iPolicy1; 
       
    76    RXmlEngDocument iPolicy2;
       
    77    
       
    78 //   TString XORString;
       
    79 //   TString ANDString;
       
    80 //   TString policyNsUri;
       
    81 };
       
    82 
       
    83 #endif //WSSTAR_POLICY_INTERSECTER_H