1.1 --- a/epoc32/include/obexheaderlist.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,155 +0,0 @@
1.4 -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef __OBEXHEADERLIST_H__
1.20 -#define __OBEXHEADERLIST_H__
1.21 -
1.22 -
1.23 -
1.24 -#include <e32std.h>
1.25 -#include <e32base.h> //CBase
1.26 -
1.27 -//forward declaration
1.28 -class RReadStream;
1.29 -class RWriteStream;
1.30 -class CObexHeader;
1.31 -class CObexBaseObject;
1.32 -class CObexServerSendOperation;
1.33 -
1.34 -
1.35 -class CMsvAttachment;
1.36 -
1.37 -const TUid KUidObexHeaders = {0x10204282};
1.38 -
1.39 -class CObexHeaderList : public CBase
1.40 -/**
1.41 -Encapsulates and owns a list of CObexHeader objects.
1.42 -Public users of this class can add CObexHeader objects
1.43 -
1.44 -@publishedAll
1.45 -@released
1.46 -*/
1.47 - {
1.48 -public:
1.49 -
1.50 - /*
1.51 - It provides functionalities for its friend classes to internalize and
1.52 - externalize itself from a CMsvStore stream, and add all its contained
1.53 - CObexHeader objects to a CObexBaseObject, as well as two general list
1.54 - functions to return the number of objects it contained and a contained
1.55 - object at a specified index into the list.
1.56 - */
1.57 - friend class CObexServerSendOperation; // requires the use of 'AddHeadersToBaseObjectL'
1.58 -
1.59 - /**
1.60 - * Factory function to return a new CObexHeaderList.
1.61 - @return New CObexHeaderList object
1.62 - */
1.63 - IMPORT_C static CObexHeaderList* NewL();
1.64 -
1.65 -
1.66 - /**
1.67 - * Factory function to return a new CObexHeaderList and leave it on the
1.68 - * cleanup stack.
1.69 - @return New CObexHeaderList object
1.70 - */
1.71 - IMPORT_C static CObexHeaderList* NewLC();
1.72 -
1.73 -
1.74 - /**
1.75 - * Destructor which frees all allocated memory with the list.
1.76 - */
1.77 - IMPORT_C ~CObexHeaderList();
1.78 -
1.79 - /**
1.80 - * Add a CObexHeader object to the list. The CObexHeader object added
1.81 - * should have its attribute, header ID and header value set before
1.82 - * it is added to the list. CObexHeaderlist will not change these
1.83 - * values of its contained CObexHeader objects
1.84 - * @param aHeader Pointer to a constant CObexHeader object
1.85 - *
1.86 - * @return KErrNone, if the operation is successful, otherwise
1.87 - * one of the system wide error codes
1.88 - */
1.89 - IMPORT_C TInt AddHeader(const CObexHeader* aHeader);
1.90 -
1.91 - IMPORT_C void ExportToAttachmentL(CMsvAttachment& aAttachment) const;
1.92 -
1.93 - IMPORT_C void ImportFromAttachmentL(CMsvAttachment& aAttachment);
1.94 -
1.95 - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const;
1.96 -
1.97 - IMPORT_C void InternalizeL(RReadStream& aReadStream);
1.98 -
1.99 -protected:
1.100 -
1.101 -
1.102 -
1.103 - /**
1.104 - * Add all the CObexHeader objects contained in a list to a
1.105 - * CObexBaseObject.
1.106 - *
1.107 - *
1.108 - * @param aObexBaseObj CObexBaseObject to add the objects to
1.109 - *
1.110 - * @leave Error System wide error code
1.111 - *
1.112 - */
1.113 - IMPORT_C void AddHeadersToBaseObjectL(CObexBaseObject& aObexBaseObj);
1.114 -
1.115 -
1.116 - //General list processing functions
1.117 -
1.118 - /**
1.119 - * Return the number of CObexHeader object pointers contained in the list.
1.120 - *
1.121 - *
1.122 - * @return The number of CObexHeader object pointers in the list
1.123 - */
1.124 - IMPORT_C TInt Count() const;
1.125 -
1.126 - /**
1.127 - * Get a non constant reference to the CObexHeader object pointer at
1.128 - * position aPos into the list.
1.129 - *
1.130 - *
1.131 - * @param aPos A list index specifying the CObexHeader object pointer to
1.132 - * be returned
1.133 - *
1.134 - * @leave KErrArgument aPos is out of range
1.135 - * @leave KErrNotFound The list is empty
1.136 - *
1.137 - * @return A non constant reference to the CObexHeader object
1.138 - * pointer
1.139 - */
1.140 - IMPORT_C CObexHeader*& ObexHeaderL(TInt aPos);
1.141 -
1.142 -private:
1.143 - /**
1.144 - * Leaving constructor function used in 2 phase construction in NewLC()
1.145 - */
1.146 - void ConstructL();
1.147 -
1.148 - /**
1.149 - * Constructor function used in 2 phase construction in NewLC()
1.150 - */
1.151 - CObexHeaderList();
1.152 -
1.153 -private:
1.154 - ///<pointer to the CObexHeader object pointer array
1.155 - RPointerArray<CObexHeader>* iObexHeaders;
1.156 - };
1.157 -
1.158 -#endif // __OBEXHEADERLIST_H__