2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * 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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: SyncML Transport properties.
17 ///////////////////////////////////////////////////////////////////////////////
18 // SyncMLTransportProperties.h
21 ///////////////////////////////////////////////////////////////////////////////
22 #ifndef __SYNCMLTRANSPORTPROPERTIES_H__
23 #define __SYNCMLTRANSPORTPROPERTIES_H__
26 #include <syncmldef.h>
32 Data type of a SyncML transport property value.
34 enum TSyncMLTransportPropertyDataType
44 class TSyncMLTransportPropertyInfo
45 /** Information about a SyncML transport property.
46 @see CSmlTransportPropertiesArray
52 IMPORT_C void InternalizeL(RReadStream& aStream);
53 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
55 /** Property data type. */
56 TSyncMLTransportPropertyDataType iDataType;
58 TBuf8<KSmlMaxTransportPropertyNameLen> iName;
62 class CSyncMLTransportPropertiesArray : public CBase
63 /** An array of SyncML transport property information.
65 This is used to store information about the properties supported by a transport type.
68 @see RSyncMLTransport::Properties()
72 /** Information about a property. */
73 typedef TSyncMLTransportPropertyInfo TPropertyInfo;
75 IMPORT_C CSyncMLTransportPropertiesArray(TInt aGranularity);
76 IMPORT_C void InternalizeL(RReadStream&);
77 IMPORT_C void ExternalizeL(RWriteStream&) const;
78 IMPORT_C TInt AddL(const TPropertyInfo&);
79 IMPORT_C void Delete(TInt aIndex);
80 IMPORT_C TInt Find(const TDesC8& aPropertyName) const;
81 IMPORT_C TInt Count() const;
82 IMPORT_C TPropertyInfo& At(TInt aIndex);
83 IMPORT_C const TPropertyInfo& At(TInt aIndex) const;
84 inline TPropertyInfo& operator[](TInt aIndex);
85 inline const TPropertyInfo& operator[](TInt aIndex) const;
87 CArrayFixFlat<TPropertyInfo> iElements;
90 inline TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex)
92 Gets the member of the array with the specified index value.
93 @return Property value at array index aIndex
94 @param aIndex Index value
96 { return At(aIndex); }
98 inline const TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex) const
100 Gets the member of the array with the specified index value (const overload).
101 @return Property value at array index aIndex
102 @param aIndex Index value
104 { return At(aIndex); }
107 ///////////////////////////////////////////////////////////////////////////////
108 ///////////////////////////////////////////////////////////////////////////////
109 ///////////////////////////////////////////////////////////////////////////////
110 #endif // __SYNCMLTRANSPORTPROPERTIES_H__