diff -r 000000000000 -r c8caa15ef882 simpleengine/xmlutils/inc/simplepresencelist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/simpleengine/xmlutils/inc/simplepresencelist.h Tue Feb 02 01:05:17 2010 +0200 @@ -0,0 +1,153 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SIMPLE engine presencelist +* +*/ + + + + +#ifndef simplepresencelist_H +#define simplepresencelist_H + +#include +#include "simplecommon.h" +#include "msimplepresencelist.h" + +// FORWARD DECLARATION +class CSimpleNamespace; +class CSimpleMeta; +class CBodyPart; + +/** + * CSimplePresenceList + * + * SIMPLE Engine presence list + * + * @lib simplexmlutils + * @since S60 v3.1 + */ + +class CSimplePresenceList : public CBase, public MSimplePresenceList + { + +public: + + /** + * Two-phased constructor. + * @since S60 v3.1 + * @param aData MIME multipart data + * @param aBoundary MIME multipart boundary + * @param aStart MIME multipart start content-id + * @return CSimplePresenceList + */ + static CSimplePresenceList* NewL( + const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart ); + + /** + * Destructor. + */ + virtual ~CSimplePresenceList(); + + +// from base class MSimplePresenceList + + + /** + * Destructor. + * @since Series60 3.1 + */ + void Close(); + + + /** + * Getter for the Metadata document. + * @since Series60 3.1 + * @return metadata document. + */ + MSimpleMeta* MetaData(); + + /** + * Getting the child elements of this element. + * + * @since Series60 3.1 + * @param aDocuments an array of presence entities. This is an empty array if there + * are no entities. OUT. + */ + void GetDocuments( RPointerArray& aDocuments ); + + /** + * Getting the sub-lists + * + * @since Series60 3.1 + * @param aLists array of presence sub lists. OUT. + */ + void GetSubLists( RPointerArray& aLists ); + + +protected: + + +private: + + /** + * ClenupStack operation + * aPtrArray RPointerArray + */ + static void ResetAndDestroy( TAny* aPtrArray ); + + /** + * DoConstructL + * Handles XML parsing of MIME multiparts + * @param aParts MIME multipart parts + * @param aStart MIME multipart start content-id + */ + void DoConstructL( RPointerArray& aParts, const TDesC8& aStart ); + + /** + * Two-phase constructor + * @param aData MIME multipart data + * @param aBoundary MIME multipart boundary + * @param aStart MIME multipart start content-id + */ + void ConstructL( + const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart ); + + /** + * constructor + */ + CSimplePresenceList(); + +private: // data + + /** + * Meta data of RLMI + * Own. + */ + CSimpleMeta* iMeta; + + /** + * Sub presence lists + */ + RPointerArray iPresList; + + /** + * Presence documents in root level + */ + RPointerArray iDocuments; + }; + +#endif // simplepresencelist_H + +// End of File