webservices/wsstar/wsstarplugin/inc/wsstarpolicyvalidator.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_VALIDATER_H
       
    26 #define WSSTAR_POLICY_VALIDATER_H
       
    27 
       
    28 // INCLUDES
       
    29 #include <e32std.h>
       
    30 #include <flogger.h>
       
    31 
       
    32 typedef RSenPointerMap<TDesC8, TDesC8> RPolicyRequestMap2;
       
    33 
       
    34 /**
       
    35  * Class:       
       
    36  *
       
    37  * Description: An implementation of the Validation of policy from ServicePolicy
       
    38  * differenet methods validates Clinet and Service poplicy
       
    39  */
       
    40 class CWSStarPolicyValidator : public CBase
       
    41     {
       
    42     public:
       
    43         static CWSStarPolicyValidator* NewL(RFileLogger& aLogger);
       
    44         static CWSStarPolicyValidator* NewLC(RFileLogger& aLogger);
       
    45         ~CWSStarPolicyValidator();
       
    46 
       
    47         TInt ValidatePolicyArrayL(CSenElement* aPolicyArray, CPolicyRegistry* aRegistry, RPolicyRequestMap2& aRequestMap);
       
    48         TInt ValidateClientPolicyL(CSenElement* aClientPolicy, CPolicyRegistry* aRegistry, RPolicyRequestMap2& aRequestMap);
       
    49         TPtrC8 PolicyNameL(CSenElement* aPolicy);
       
    50         RFileLogger* Log() const;
       
    51         	
       
    52     private:       
       
    53         
       
    54         TPtrC8 PolicyIdL(CSenElement* aPolicy);
       
    55         TInt IsUriAlreadyExist(TPtrC8 aUriName, RPolicyRequestMap& aRequestMap);
       
    56         TBool ValidateExpiryL(CSenElement* aExpiry);
       
    57         CSenElement* GetExpiryTagL();
       
    58         TBool IsExpiredPolicyL(CSenElement* aExpiry);
       
    59         
       
    60         CWSStarPolicyValidator();
       
    61         void ConstructL(RFileLogger& aLogger);
       
    62         RFileLogger* iLog;
       
    63     }; 
       
    64 #endif // WSSTAR_POLICY_HANDLER_H
       
    65