williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: inline TUid CParserPropertyValue::Uid() const williamr@2: /** Returns the property value's UID. williamr@2: williamr@2: This UID identifies the property value's type and is specified on construction. williamr@2: The values are defined in vuid.h. williamr@2: williamr@2: @return The property value's UID. */ williamr@2: {return iPropertyValueTypeUid;} williamr@2: williamr@2: inline void CParserPropertyValue::SetPlugIn(MVersitPlugIn* aPlugIn) williamr@2: /** Assigns a Versit plug-in to the property value. williamr@2: williamr@2: Allows functions of the MVersitPlugIn class to be used when writing to a stream. williamr@2: williamr@2: If a plug-in is in use then this function needs to be called with each property value williamr@2: before it is externalised. However, this will be done for you if you add a property williamr@2: using the function CVersitParser::AddPropertyL(). williamr@2: williamr@2: @param aPlugIn A pointer to an MVersitPlugIn instance. */ williamr@2: {iPlugIn=aPlugIn;} williamr@2: williamr@2: inline MVersitPlugIn* CParserPropertyValue::PlugIn() williamr@2: /** Gets a pointer to the Versit plug-in williamr@2: williamr@2: @return A pointer to the plug-in. */ williamr@2: {return iPlugIn;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueCDesCArray williamr@2: // williamr@2: inline CParserPropertyValueBinary::CParserPropertyValueBinary() :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)) williamr@2: /** Constructs a binary property value. williamr@2: williamr@2: Sets the property value UID to KVersitPropertyBinaryUid. */ williamr@2: {} williamr@2: williamr@2: inline CParserPropertyValueBinary::CParserPropertyValueBinary(CBufSeg& aValue) :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)), iValue(&aValue) williamr@2: /** Constructs a binary property value. williamr@2: williamr@2: Sets the property value to aValue and the property value UID to KVersitPropertyBinaryUid. williamr@2: williamr@2: @param aValue The property value. */ williamr@2: {} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueCDesCArray williamr@2: // williamr@2: inline CDesCArray* CParserPropertyValueCDesCArray::Value() const williamr@2: /** Gets the property value. williamr@2: williamr@2: @return Pointer to the array of descriptors owned by the property value object. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueTimeZone williamr@2: // williamr@2: inline TTimeIntervalSeconds CParserPropertyValueTimeZone::Value() const williamr@2: /** Gets the time zone property value. williamr@2: williamr@2: @return A time interval (in seconds) which represents the offset from universal williamr@2: time. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueDaylight williamr@2: // williamr@2: inline CVersitDaylight* CParserPropertyValueDaylight::Value() const williamr@2: /** Gets the daylight saving property value. williamr@2: williamr@2: @return Pointer to the daylight saving specification. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueDateTime williamr@2: // williamr@2: inline TVersitDateTime* CParserPropertyValueDateTime::Value() const williamr@2: /** Gets a pointer to the date/time property value. williamr@2: williamr@2: @return Pointer to the date/time property value. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueDate williamr@2: // williamr@2: inline TVersitDateTime* CParserPropertyValueDate::Value() const williamr@2: /** Gets a pointer to the date property value. williamr@2: williamr@2: @return Pointer to the date property value. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueMultiDateTime williamr@2: // williamr@2: inline CArrayPtr* CParserPropertyValueMultiDateTime::Value() const williamr@2: /** Gets a pointer to the object's list of date/time property values. williamr@2: williamr@2: @return Pointer to the array of date/time property values. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserPropertyValueInt williamr@2: // williamr@2: inline TInt CParserPropertyValueInt::Value() const williamr@2: /** Gets the signed integer property value. williamr@2: williamr@2: @return The signed integer property value. */ williamr@2: {return iValue;} williamr@2: williamr@2: // williamr@2: // CParserProperty williamr@2: // williamr@2: inline void CParserProperty::SetValue(CParserPropertyValue* aPropertyValue) williamr@2: /** Sets the property value. williamr@2: williamr@2: The property takes ownership of the property value. williamr@2: williamr@2: @param aPropertyValue A pointer to the property value to be set. */ williamr@2: {iPropertyValue=aPropertyValue;} williamr@2: williamr@2: inline CParserPropertyValue* CParserProperty::Value() const williamr@2: /** Gets a pointer to the property value. williamr@2: williamr@2: Ownership of the property value is not transferred by this function. williamr@2: williamr@2: @return Pointer to generic parser property value. */ williamr@2: {return iPropertyValue;} williamr@2: williamr@2: inline TUid CParserProperty::Uid() const williamr@2: /** Gets the UID of the property value. williamr@2: williamr@2: @return UID of the property value. */ williamr@2: {return iPropertyValue->Uid();} williamr@2: williamr@2: /* williamr@2: * Gets the name of the property. williamr@2: * williamr@2: * @return " HBufC8*& " williamr@2: * Pointer to the property name. williamr@2: */ williamr@2: inline HBufC8*& CParserProperty::NameBuf() williamr@2: {return iPropertyName;} williamr@2: williamr@2: inline void CParserProperty::SetNameUid(TUid aUid) williamr@2: /** Sets a property name UID. williamr@2: williamr@2: This function is called by CVersitParser::AddProperty() when internalising, williamr@2: and will not normally be used directly. williamr@2: williamr@2: @param aUid A property name UID. */ williamr@2: {iPropertyNameUid=aUid;} williamr@2: williamr@2: inline TUid CParserProperty::NameUid() const williamr@2: /** Gets the property name UID. williamr@2: williamr@2: @return UID of the property name. */ williamr@2: {return iPropertyNameUid;} williamr@2: williamr@2: inline void CParserProperty::SetParamArray(CArrayPtr* aArrayOfParams) williamr@2: /** Sets the array of property parameters. williamr@2: williamr@2: The property takes ownership of aArrayOfParams williamr@2: williamr@2: @param aArrayOfParams Array of property parameters. */ williamr@2: {iArrayOfParams=aArrayOfParams;}