1.1 --- a/epoc32/include/delimitedpath8.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/delimitedpath8.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,153 @@
1.4 -delimitedpath8.h
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __DELIMITEDPATH8_H__
1.21 +#define __DELIMITEDPATH8_H__
1.22 +
1.23 +/**
1.24 + @file DelimitedPath8.h
1.25 + Comments : This file contains the API definition for the classes
1.26 + TDelimitedPathParser8 and CDelimitedPath16.
1.27 + @publishedAll
1.28 + @released
1.29 + */
1.30 +
1.31 +// System includes
1.32 +//
1.33 +#include <e32base.h>
1.34 +#include <delimitedparser8.h>
1.35 +
1.36 +
1.37 +/**
1.38 +Dependencies : TDelimitedParserBase8
1.39 +Comments : Derived class from TDelimitedParserBase providing a class for parsing
1.40 +paths delimited by a '/' as defined in RFC2396.
1.41 +@publishedAll
1.42 +@released
1.43 +@since 6.0
1.44 +*/
1.45 +class TDelimitedPathParser8 : public TDelimitedParserBase8
1.46 + {
1.47 +public: // Methods
1.48 +
1.49 + IMPORT_C TDelimitedPathParser8();
1.50 +
1.51 + IMPORT_C void Parse(const TDesC8& aPath);
1.52 +
1.53 + IMPORT_C void ParseReverse(const TDesC8& aPath);
1.54 + };
1.55 +
1.56 +/**
1.57 +Dependencies : CDelimitedStringBase8
1.58 +Comments : Provides functionality to create a delimited path where components of the
1.59 +path delimited by '/' as defined in RFC2396.
1.60 +@publishedAll
1.61 +@released
1.62 +@since 6.0
1.63 +*/
1.64 +class CDelimitedPath8 : public CDelimitedDataBase8
1.65 + {
1.66 +public: // Methods
1.67 +
1.68 +/**
1.69 + Static factory constructor. Uses two phase construction and leaves nothing
1.70 + on the CleanupStack.
1.71 + @since 6.0
1.72 + @param aPath A descriptor with the initial path.
1.73 + @return A pointer to created object.
1.74 + @post Nothing left on the CleanupStack.
1.75 + */
1.76 + IMPORT_C static CDelimitedPath8* NewL(const TDesC8& aPath);
1.77 +
1.78 +/**
1.79 + Static factory constructor. Uses two phase construction and leaves a
1.80 + pointer to created object on the CleanupStack.
1.81 + @since 6.0
1.82 + @param aPath A descriptor with the initial path.
1.83 + @return A pointer to created object.
1.84 + @post Pointer to created object left of CleanupStack.
1.85 + */
1.86 + IMPORT_C static CDelimitedPath8* NewLC(const TDesC8& aPath);
1.87 +
1.88 +/**
1.89 + Destructor.
1.90 + @since 6.0
1.91 + */
1.92 + IMPORT_C ~CDelimitedPath8();
1.93 +
1.94 +/**
1.95 + Escape encodes the segment then inserts the escaped version in a
1.96 + position before the current parsed segment. The new segment should only contain a
1.97 + single path segment, as any path delimiters in the segment will be converted to an
1.98 + escape triple. The parser is left in a state where its current segment is the same
1.99 + one as before the insertion.
1.100 + @since 6.0
1.101 + @param aSegment A descriptor with the unescaped path segment.
1.102 + @pre The path must have been initially parsed.
1.103 + @post The path will have been extended to include the new segment. The
1.104 + current segment will remain as the one before the insertion.
1.105 + */
1.106 + IMPORT_C void InsertAndEscapeCurrentL(const TDesC8& aSegment);
1.107 +
1.108 +/**
1.109 + Escape encodes the segment then inserts the escaped version at
1.110 + the front of the path. The new segment should only contain a single path segment,
1.111 + as any path delimiters in the segment will be converted to an escape triple. The
1.112 + parser is left in a state where its current segment is the same one as before
1.113 + the insertion.
1.114 + @warning A re-parse is required to ensure that the parser is valid.
1.115 + @since 6.0
1.116 + @param aSegment A descriptor with the unescaped path segment.
1.117 + @pre The delimiter must have been set.
1.118 + @post The path will have been extended to include the new segment.
1.119 + */
1.120 + IMPORT_C void PushAndEscapeFrontL(const TDesC8& aSegment);
1.121 +
1.122 +/**
1.123 + Escape encodes the segment then inserts the escaped version at
1.124 + the back of the path. The new segment should only contain a single path segment,
1.125 + as any path delimiters in the segment will be converted to an escape triple. The
1.126 + parser is left in a state where its current segment is the same one as before
1.127 + the insertion.
1.128 + @warning A re-parse is required to ensure that the parser is valid.
1.129 + @since 6.0
1.130 + @param aSegment A descriptor with the unescaped path segment.
1.131 + @pre The delimiter must have been set.
1.132 + @post The path will have been extended to include the new segment.
1.133 + */
1.134 + IMPORT_C void PushAndEscapeBackL(const TDesC8& aSegment);
1.135 +
1.136 +private: // Methods
1.137 +
1.138 +/**
1.139 + Constructor. First phase of two-phase construction method. Does
1.140 + non-allocating construction.
1.141 + @since 6.0
1.142 + */
1.143 + CDelimitedPath8();
1.144 +
1.145 +/**
1.146 + Second phase of two-phase construction method. Does any allocations required
1.147 + to fully construct the object.
1.148 + @since 6.0
1.149 + @param aPath A descriptor with the initial path.
1.150 + @pre First phase of construction is complete.
1.151 + @post The object is fully constructed.
1.152 + */
1.153 + void ConstructL(const TDesC8& aPath);
1.154 +
1.155 + };
1.156 +
1.157 +#endif // __DELIMITEDPATH8_H__