webservices/wsstar/wsstarmessagehandlers/inc/wsstarmessageutils.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 
       
    26  
       
    27 
       
    28 #ifndef WSSTAR_MESSAGE_UTILS_H
       
    29 #define WSSTAR_MESSAGE_UTILS_H
       
    30 
       
    31 
       
    32 #include "SenElement.h"
       
    33 #include "SenDomFragmentBase.h"
       
    34 
       
    35 
       
    36 /**
       
    37  * Set of static convenience methods to help in message exploring
       
    38  */
       
    39 class CWSStarMessageUtils : public CBase
       
    40     {
       
    41     typedef RArray<TXmlEngElement> RArrayElements;
       
    42     
       
    43     public:
       
    44     typedef RPointerArray<CSenElement> RArraySenElements;
       
    45         /*
       
    46         * Encode data into Base64 format
       
    47         * @param aParent
       
    48         * @param aValue - name of element or attribute
       
    49         * @param aAttribute = determine if we want find tag name or attribute name
       
    50         * @return 
       
    51         */
       
    52         static CSenElement* GetMarkedElementL(CSenElement& aParent, const TDesC8& aValue, 
       
    53                                                 TBool aAttribute = ETrue);
       
    54         
       
    55         /*
       
    56         * Find an Element in XML tree
       
    57         * @param aElementName -seeking element name
       
    58         * @param aNamespace - seeking element  namespace
       
    59         * @param aParent - node where the seeking is starting
       
    60         * @param aElements - find elements' array
       
    61         */
       
    62         static void FindElementL(const TDesC8& aElementName, const TDesC8& aNamespace, 
       
    63                                 const TXmlEngElement& aParent, RArrayElements* aElements);
       
    64         /*
       
    65         * Find an Element in XML tree
       
    66         * @param aLocalName -seeking element name
       
    67         * @param aParent - node where the seeking is starting
       
    68         * @param aElements - find elements' array
       
    69         */
       
    70         static CSenElement* FindElementL(const TDesC8& aLocalName, CSenElement& aParent);
       
    71         
       
    72         static void FindElementL(const TDesC8& aLocalName,CSenElement& aParent,RArraySenElements& aElements);
       
    73     private:
       
    74         /**
       
    75         * Hide default C++ constructor.
       
    76         */
       
    77         CWSStarMessageUtils();
       
    78         
       
    79         /**
       
    80         * Prohibit copy constructor if not deriving from CBase.
       
    81         */
       
    82         CWSStarMessageUtils( const CWSStarMessageUtils& );
       
    83 
       
    84         /**
       
    85         * Prohibit assignment operator if not deriving from CBase.
       
    86         */
       
    87         CWSStarMessageUtils& operator=( const CWSStarMessageUtils& );        
       
    88     };
       
    89 
       
    90 #endif // WSSTAR_MESSAGE_UTILS_H
       
    91