author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 3 | e1b950c65cb4 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
inline TUid CParserPropertyValue::Uid() const |
williamr@2 | 17 |
/** Returns the property value's UID. |
williamr@2 | 18 |
|
williamr@2 | 19 |
This UID identifies the property value's type and is specified on construction. |
williamr@2 | 20 |
The values are defined in vuid.h. |
williamr@2 | 21 |
|
williamr@2 | 22 |
@return The property value's UID. */ |
williamr@2 | 23 |
{return iPropertyValueTypeUid;} |
williamr@2 | 24 |
|
williamr@2 | 25 |
inline void CParserPropertyValue::SetPlugIn(MVersitPlugIn* aPlugIn) |
williamr@2 | 26 |
/** Assigns a Versit plug-in to the property value. |
williamr@2 | 27 |
|
williamr@2 | 28 |
Allows functions of the MVersitPlugIn class to be used when writing to a stream. |
williamr@2 | 29 |
|
williamr@2 | 30 |
If a plug-in is in use then this function needs to be called with each property value |
williamr@2 | 31 |
before it is externalised. However, this will be done for you if you add a property |
williamr@2 | 32 |
using the function CVersitParser::AddPropertyL(). |
williamr@2 | 33 |
|
williamr@2 | 34 |
@param aPlugIn A pointer to an MVersitPlugIn instance. */ |
williamr@2 | 35 |
{iPlugIn=aPlugIn;} |
williamr@2 | 36 |
|
williamr@2 | 37 |
inline MVersitPlugIn* CParserPropertyValue::PlugIn() |
williamr@2 | 38 |
/** Gets a pointer to the Versit plug-in |
williamr@2 | 39 |
|
williamr@2 | 40 |
@return A pointer to the plug-in. */ |
williamr@2 | 41 |
{return iPlugIn;} |
williamr@2 | 42 |
|
williamr@2 | 43 |
// |
williamr@2 | 44 |
// CParserPropertyValueCDesCArray |
williamr@2 | 45 |
// |
williamr@2 | 46 |
inline CParserPropertyValueBinary::CParserPropertyValueBinary() :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)) |
williamr@2 | 47 |
/** Constructs a binary property value. |
williamr@2 | 48 |
|
williamr@2 | 49 |
Sets the property value UID to KVersitPropertyBinaryUid. */ |
williamr@2 | 50 |
{} |
williamr@2 | 51 |
|
williamr@2 | 52 |
inline CParserPropertyValueBinary::CParserPropertyValueBinary(CBufSeg& aValue) :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)), iValue(&aValue) |
williamr@2 | 53 |
/** Constructs a binary property value. |
williamr@2 | 54 |
|
williamr@2 | 55 |
Sets the property value to aValue and the property value UID to KVersitPropertyBinaryUid. |
williamr@2 | 56 |
|
williamr@2 | 57 |
@param aValue The property value. */ |
williamr@2 | 58 |
{} |
williamr@2 | 59 |
|
williamr@2 | 60 |
// |
williamr@2 | 61 |
// CParserPropertyValueCDesCArray |
williamr@2 | 62 |
// |
williamr@2 | 63 |
inline CDesCArray* CParserPropertyValueCDesCArray::Value() const |
williamr@2 | 64 |
/** Gets the property value. |
williamr@2 | 65 |
|
williamr@2 | 66 |
@return Pointer to the array of descriptors owned by the property value object. */ |
williamr@2 | 67 |
{return iValue;} |
williamr@2 | 68 |
|
williamr@2 | 69 |
// |
williamr@2 | 70 |
// CParserPropertyValueTimeZone |
williamr@2 | 71 |
// |
williamr@2 | 72 |
inline TTimeIntervalSeconds CParserPropertyValueTimeZone::Value() const |
williamr@2 | 73 |
/** Gets the time zone property value. |
williamr@2 | 74 |
|
williamr@2 | 75 |
@return A time interval (in seconds) which represents the offset from universal |
williamr@2 | 76 |
time. */ |
williamr@2 | 77 |
{return iValue;} |
williamr@2 | 78 |
|
williamr@2 | 79 |
// |
williamr@2 | 80 |
// CParserPropertyValueDaylight |
williamr@2 | 81 |
// |
williamr@2 | 82 |
inline CVersitDaylight* CParserPropertyValueDaylight::Value() const |
williamr@2 | 83 |
/** Gets the daylight saving property value. |
williamr@2 | 84 |
|
williamr@2 | 85 |
@return Pointer to the daylight saving specification. */ |
williamr@2 | 86 |
{return iValue;} |
williamr@2 | 87 |
|
williamr@2 | 88 |
// |
williamr@2 | 89 |
// CParserPropertyValueDateTime |
williamr@2 | 90 |
// |
williamr@2 | 91 |
inline TVersitDateTime* CParserPropertyValueDateTime::Value() const |
williamr@2 | 92 |
/** Gets a pointer to the date/time property value. |
williamr@2 | 93 |
|
williamr@2 | 94 |
@return Pointer to the date/time property value. */ |
williamr@2 | 95 |
{return iValue;} |
williamr@2 | 96 |
|
williamr@2 | 97 |
// |
williamr@2 | 98 |
// CParserPropertyValueDate |
williamr@2 | 99 |
// |
williamr@2 | 100 |
inline TVersitDateTime* CParserPropertyValueDate::Value() const |
williamr@2 | 101 |
/** Gets a pointer to the date property value. |
williamr@2 | 102 |
|
williamr@2 | 103 |
@return Pointer to the date property value. */ |
williamr@2 | 104 |
{return iValue;} |
williamr@2 | 105 |
|
williamr@2 | 106 |
// |
williamr@2 | 107 |
// CParserPropertyValueMultiDateTime |
williamr@2 | 108 |
// |
williamr@2 | 109 |
inline CArrayPtr<TVersitDateTime>* CParserPropertyValueMultiDateTime::Value() const |
williamr@2 | 110 |
/** Gets a pointer to the object's list of date/time property values. |
williamr@2 | 111 |
|
williamr@2 | 112 |
@return Pointer to the array of date/time property values. */ |
williamr@2 | 113 |
{return iValue;} |
williamr@2 | 114 |
|
williamr@2 | 115 |
// |
williamr@2 | 116 |
// CParserPropertyValueInt |
williamr@2 | 117 |
// |
williamr@2 | 118 |
inline TInt CParserPropertyValueInt::Value() const |
williamr@2 | 119 |
/** Gets the signed integer property value. |
williamr@2 | 120 |
|
williamr@2 | 121 |
@return The signed integer property value. */ |
williamr@2 | 122 |
{return iValue;} |
williamr@2 | 123 |
|
williamr@2 | 124 |
// |
williamr@2 | 125 |
// CParserProperty |
williamr@2 | 126 |
// |
williamr@2 | 127 |
inline void CParserProperty::SetValue(CParserPropertyValue* aPropertyValue) |
williamr@2 | 128 |
/** Sets the property value. |
williamr@2 | 129 |
|
williamr@2 | 130 |
The property takes ownership of the property value. |
williamr@2 | 131 |
|
williamr@2 | 132 |
@param aPropertyValue A pointer to the property value to be set. */ |
williamr@2 | 133 |
{iPropertyValue=aPropertyValue;} |
williamr@2 | 134 |
|
williamr@2 | 135 |
inline CParserPropertyValue* CParserProperty::Value() const |
williamr@2 | 136 |
/** Gets a pointer to the property value. |
williamr@2 | 137 |
|
williamr@2 | 138 |
Ownership of the property value is not transferred by this function. |
williamr@2 | 139 |
|
williamr@2 | 140 |
@return Pointer to generic parser property value. */ |
williamr@2 | 141 |
{return iPropertyValue;} |
williamr@2 | 142 |
|
williamr@2 | 143 |
inline TUid CParserProperty::Uid() const |
williamr@2 | 144 |
/** Gets the UID of the property value. |
williamr@2 | 145 |
|
williamr@2 | 146 |
@return UID of the property value. */ |
williamr@2 | 147 |
{return iPropertyValue->Uid();} |
williamr@2 | 148 |
|
williamr@2 | 149 |
/* |
williamr@2 | 150 |
* Gets the name of the property. |
williamr@2 | 151 |
* |
williamr@2 | 152 |
* @return " HBufC8*& " |
williamr@2 | 153 |
* Pointer to the property name. |
williamr@2 | 154 |
*/ |
williamr@2 | 155 |
inline HBufC8*& CParserProperty::NameBuf() |
williamr@2 | 156 |
{return iPropertyName;} |
williamr@2 | 157 |
|
williamr@2 | 158 |
inline void CParserProperty::SetNameUid(TUid aUid) |
williamr@2 | 159 |
/** Sets a property name UID. |
williamr@2 | 160 |
|
williamr@2 | 161 |
This function is called by CVersitParser::AddProperty() when internalising, |
williamr@2 | 162 |
and will not normally be used directly. |
williamr@2 | 163 |
|
williamr@2 | 164 |
@param aUid A property name UID. */ |
williamr@2 | 165 |
{iPropertyNameUid=aUid;} |
williamr@2 | 166 |
|
williamr@2 | 167 |
inline TUid CParserProperty::NameUid() const |
williamr@2 | 168 |
/** Gets the property name UID. |
williamr@2 | 169 |
|
williamr@2 | 170 |
@return UID of the property name. */ |
williamr@2 | 171 |
{return iPropertyNameUid;} |
williamr@2 | 172 |
|
williamr@2 | 173 |
inline void CParserProperty::SetParamArray(CArrayPtr<CParserParam>* aArrayOfParams) |
williamr@2 | 174 |
/** Sets the array of property parameters. |
williamr@2 | 175 |
|
williamr@2 | 176 |
The property takes ownership of aArrayOfParams |
williamr@2 | 177 |
|
williamr@2 | 178 |
@param aArrayOfParams Array of property parameters. */ |
williamr@2 | 179 |
{iArrayOfParams=aArrayOfParams;} |