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 "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.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>
33 Data type of a SyncML transport property value.
35 enum TSyncMLTransportPropertyDataType
45 class TSyncMLTransportPropertyInfo
46 /** Information about a SyncML transport property.
47 @see CSmlTransportPropertiesArray
53 IMPORT_C void InternalizeL(RReadStream& aStream);
54 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
56 /** Property data type. */
57 TSyncMLTransportPropertyDataType iDataType;
59 TBuf8<KSmlMaxTransportPropertyNameLen> iName;
63 class CSyncMLTransportPropertiesArray : public CBase
64 /** An array of SyncML transport property information.
66 This is used to store information about the properties supported by a transport type.
69 @see RSyncMLTransport::Properties()
73 /** Information about a property. */
74 typedef TSyncMLTransportPropertyInfo TPropertyInfo;
76 IMPORT_C CSyncMLTransportPropertiesArray(TInt aGranularity);
77 IMPORT_C void InternalizeL(RReadStream&);
78 IMPORT_C void ExternalizeL(RWriteStream&) const;
79 IMPORT_C TInt AddL(const TPropertyInfo&);
80 IMPORT_C void Delete(TInt aIndex);
81 IMPORT_C TInt Find(const TDesC8& aPropertyName) const;
82 IMPORT_C TInt Count() const;
83 IMPORT_C TPropertyInfo& At(TInt aIndex);
84 IMPORT_C const TPropertyInfo& At(TInt aIndex) const;
85 inline TPropertyInfo& operator[](TInt aIndex);
86 inline const TPropertyInfo& operator[](TInt aIndex) const;
88 CArrayFixFlat<TPropertyInfo> iElements;
91 inline TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex)
93 Gets the member of the array with the specified index value.
94 @return Property value at array index aIndex
95 @param aIndex Index value
97 { return At(aIndex); }
99 inline const TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex) const
101 Gets the member of the array with the specified index value (const overload).
102 @return Property value at array index aIndex
103 @param aIndex Index value
105 { return At(aIndex); }
108 ///////////////////////////////////////////////////////////////////////////////
109 ///////////////////////////////////////////////////////////////////////////////
110 ///////////////////////////////////////////////////////////////////////////////
111 #endif // __SYNCMLTRANSPORTPROPERTIES_H__