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