Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2001-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __OBEXHEADERLIST_H__
17 #define __OBEXHEADERLIST_H__
22 #include <e32base.h> //CBase
28 class CObexBaseObject;
29 class CObexServerSendOperation;
34 const TUid KUidObexHeaders = {0x10204282};
36 class CObexHeaderList : public CBase
38 Encapsulates and owns a list of CObexHeader objects.
39 Public users of this class can add CObexHeader objects
48 It provides functionalities for its friend classes to internalize and
49 externalize itself from a CMsvStore stream, and add all its contained
50 CObexHeader objects to a CObexBaseObject, as well as two general list
51 functions to return the number of objects it contained and a contained
52 object at a specified index into the list.
54 friend class CObexServerSendOperation; // requires the use of 'AddHeadersToBaseObjectL'
57 * Factory function to return a new CObexHeaderList.
58 @return New CObexHeaderList object
60 IMPORT_C static CObexHeaderList* NewL();
64 * Factory function to return a new CObexHeaderList and leave it on the
66 @return New CObexHeaderList object
68 IMPORT_C static CObexHeaderList* NewLC();
72 * Destructor which frees all allocated memory with the list.
74 IMPORT_C ~CObexHeaderList();
77 * Add a CObexHeader object to the list. The CObexHeader object added
78 * should have its attribute, header ID and header value set before
79 * it is added to the list. CObexHeaderlist will not change these
80 * values of its contained CObexHeader objects
81 * @param aHeader Pointer to a constant CObexHeader object
83 * @return KErrNone, if the operation is successful, otherwise
84 * one of the system wide error codes
86 IMPORT_C TInt AddHeader(const CObexHeader* aHeader);
88 IMPORT_C void ExportToAttachmentL(CMsvAttachment& aAttachment) const;
90 IMPORT_C void ImportFromAttachmentL(CMsvAttachment& aAttachment);
92 IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const;
94 IMPORT_C void InternalizeL(RReadStream& aReadStream);
101 * Add all the CObexHeader objects contained in a list to a
105 * @param aObexBaseObj CObexBaseObject to add the objects to
107 * @leave Error System wide error code
110 IMPORT_C void AddHeadersToBaseObjectL(CObexBaseObject& aObexBaseObj);
113 //General list processing functions
116 * Return the number of CObexHeader object pointers contained in the list.
119 * @return The number of CObexHeader object pointers in the list
121 IMPORT_C TInt Count() const;
124 * Get a non constant reference to the CObexHeader object pointer at
125 * position aPos into the list.
128 * @param aPos A list index specifying the CObexHeader object pointer to
131 * @leave KErrArgument aPos is out of range
132 * @leave KErrNotFound The list is empty
134 * @return A non constant reference to the CObexHeader object
137 IMPORT_C CObexHeader*& ObexHeaderL(TInt aPos);
141 * Leaving constructor function used in 2 phase construction in NewLC()
146 * Constructor function used in 2 phase construction in NewLC()
151 ///<pointer to the CObexHeader object pointer array
152 RPointerArray<CObexHeader>* iObexHeaders;
155 #endif // __OBEXHEADERLIST_H__