epoc32/include/SyncMLTransportProperties.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: SyncML Transport properties.
    15 *
    16 */
    17 ///////////////////////////////////////////////////////////////////////////////
    18 // SyncMLTransportProperties.h
    19 //
    20 //
    21 ///////////////////////////////////////////////////////////////////////////////
    22 #ifndef __SYNCMLTRANSPORTPROPERTIES_H__
    23 #define __SYNCMLTRANSPORTPROPERTIES_H__
    24 //
    25 #include <e32base.h>
    26 #include <SyncMLDef.h>
    27 
    28 class RReadStream;
    29 class RWriteStream;
    30 //
    31 
    32 /**
    33 	Data type of a SyncML transport property value.
    34 */
    35 enum TSyncMLTransportPropertyDataType
    36 	{
    37 	/** Narrow text. */
    38 	EDataTypeText8,
    39 	/** Number. */
    40 	EDataTypeNumber,
    41 	/** Boolean. */
    42 	EDataTypeBoolean
    43 	};
    44 
    45 class TSyncMLTransportPropertyInfo
    46 /**	Information about a SyncML transport property.
    47 	@see CSmlTransportPropertiesArray
    48 	@publishedAll
    49 	@released
    50 */
    51 	{
    52 public:
    53 	IMPORT_C void InternalizeL(RReadStream& aStream);
    54 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
    55 public:
    56 	/** Property data type. */
    57 	TSyncMLTransportPropertyDataType iDataType;
    58 	/** Property name. */
    59 	TBuf8<KSmlMaxTransportPropertyNameLen> iName;
    60 	};
    61 
    62 
    63 class CSyncMLTransportPropertiesArray : public CBase
    64 /**	An array of SyncML transport property information.
    65 	
    66 	This is used to store information about the properties supported by a transport type.
    67 	@publishedAll
    68 	@released
    69 	@see RSyncMLTransport::Properties() 
    70 */
    71 	{
    72 public:
    73 	/** Information about a property. */
    74 	typedef TSyncMLTransportPropertyInfo TPropertyInfo;
    75 public:
    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;
    87 private:
    88 	CArrayFixFlat<TPropertyInfo> iElements;
    89 	};
    90 
    91 inline TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex)
    92 /**
    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
    96 */
    97 	{ return At(aIndex); }
    98 
    99 inline const TSyncMLTransportPropertyInfo& CSyncMLTransportPropertiesArray::operator[](TInt aIndex) const
   100 /**
   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
   104 */
   105 	{ return At(aIndex); }
   106 
   107 
   108 ///////////////////////////////////////////////////////////////////////////////
   109 ///////////////////////////////////////////////////////////////////////////////
   110 ///////////////////////////////////////////////////////////////////////////////
   111 #endif // __SYNCMLTRANSPORTPROPERTIES_H__