1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericservices/httputils/DelimitedParser/TDelimitedQueryParser.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,110 @@
1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include <delimitedquery8.h>
1.20 +#include <delimitedquery16.h>
1.21 +
1.22 +//
1.23 +//
1.24 +// Implementation of TDelimitedQueryParser8
1.25 +//
1.26 +//
1.27 +/**
1.28 + Constructor.
1.29 +
1.30 + @since 6.0
1.31 + */
1.32 +EXPORT_C TDelimitedQueryParser8::TDelimitedQueryParser8()
1.33 +: TDelimitedParserBase8()
1.34 + {
1.35 + SetDelimiter(TChar('&'));
1.36 + }
1.37 +
1.38 +/**
1.39 + This parses the descriptor into query segments from left to right.
1.40 +
1.41 + @since 6.0
1.42 + @param aQuery A descriptor containing the query.
1.43 + @pre The delimiter must have been set.
1.44 + @post The current segment is the leftmost segment and the direction of
1.45 + parsing is set from left to right (EDelimitedDataForward).
1.46 + */
1.47 +EXPORT_C void TDelimitedQueryParser8::Parse(const TDesC8& aQuery)
1.48 + {
1.49 + // Call base class functions
1.50 + TDelimitedParserBase8::Parse(aQuery);
1.51 + }
1.52 +
1.53 +/**
1.54 + This parses the descriptor into query segments from right to left.
1.55 +
1.56 + @since 6.0
1.57 + @param aQuery A descriptor containing the query.
1.58 + @pre The delimiter must have been set.
1.59 + @post The current segment is the leftmost segment and the direction of
1.60 + parsing is set from right to left (EDelimitedDataReverse).
1.61 + */
1.62 +EXPORT_C void TDelimitedQueryParser8::ParseReverse(const TDesC8& aQuery)
1.63 + {
1.64 + // Call base class functions
1.65 + TDelimitedParserBase8::ParseReverse(aQuery);
1.66 + }
1.67 +
1.68 +//
1.69 +//
1.70 +// Implementation of TDelimitedQueryParser16
1.71 +//
1.72 +//
1.73 +/**
1.74 + Constructor.
1.75 +
1.76 + @since 6.0
1.77 + */
1.78 +EXPORT_C TDelimitedQueryParser16::TDelimitedQueryParser16()
1.79 +: TDelimitedParserBase16()
1.80 + {
1.81 + SetDelimiter(TChar('&'));
1.82 + }
1.83 +
1.84 +/**
1.85 + This parses the descriptor into query segments from left to right.
1.86 +
1.87 + @since 6.0
1.88 + @param aQuery A descriptor containing the query.
1.89 + @pre The delimiter must have been set.
1.90 + @post The current segment is the leftmost segment and the direction of
1.91 + parsing is set from left to right (EDelimitedDataFroward).
1.92 + */
1.93 +EXPORT_C void TDelimitedQueryParser16::Parse(const TDesC16& aQuery)
1.94 + {
1.95 + // Call base class functions
1.96 + TDelimitedParserBase16::Parse(aQuery);
1.97 + }
1.98 +
1.99 +/**
1.100 + This parses the descriptor into query segments from right to left.
1.101 +
1.102 + @since 6.0
1.103 + @param aQuery A descriptor containing the query.
1.104 + @pre The delimiter must have been set.
1.105 + @post The current segment is the leftmost segment and the direction of
1.106 + parsing is set from right to left (EDelimitedDataReverse).
1.107 + */
1.108 +EXPORT_C void TDelimitedQueryParser16::ParseReverse(const TDesC16& aQuery)
1.109 + {
1.110 + // Call base class functions
1.111 + TDelimitedParserBase16::ParseReverse(aQuery);
1.112 + }
1.113 +