diff -r 000000000000 -r e6b17d312c8b ximpfw/presence/srcpresencedatamodel/presentitygroups/presentitygroupmemberinfoimp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ximpfw/presence/srcpresencedatamodel/presentitygroups/presentitygroupmemberinfoimp.h Thu Dec 17 08:54:49 2009 +0200 @@ -0,0 +1,132 @@ +/* +* 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: MPresentityGroupMemberInfo API object implementation. +* +*/ + +#ifndef CPRESENTITYGROUPMEMBERINFOIMP_H +#define CPRESENTITYGROUPMEMBERINFOIMP_H + +#include +#include + +#include "ximpapidataobjbase.h" +#include "presenceapiobjbase.h" +#include + +class CXIMPIdentityImp; + +/** + * MPresenceInfo API object implementation. + * + * @lib ximpdatamodel.dll + * @since S60 v3.2 + */ +NONSHARABLE_CLASS( CPresentityGroupMemberInfoImp ): public CXIMPApiDataObjBase, + public MPresentityGroupMemberInfo + { + public: + /** The class ID. */ + enum { KClassId = PRIMP_CLSID_CPRESENTITYGROUPMEMBERINFOIMP }; + +public: + + IMPORT_C static CPresentityGroupMemberInfoImp* NewLC( + const MXIMPIdentity& aIdentity, + const TDesC16& aDisplayName ); + IMPORT_C static CPresentityGroupMemberInfoImp* NewLC(); + IMPORT_C static CPresentityGroupMemberInfoImp* NewL(); + virtual ~CPresentityGroupMemberInfoImp(); + +private: + + CPresentityGroupMemberInfoImp(); + void ConstructL(); + void ConstructL( const MXIMPIdentity& aIdentity, + const TDesC16& aDisplayName ); + + /** + * @see CXIMPApiDataObjBase + */ + XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS + +public: // From MXIMPBase + + /** + * Implementation of MXIMPBase interface methods + * @see MXIMPBase + */ + XIMPIMP_DECLARE_IF_BASE_METHODS + + /** + * @see CXIMPApiDataObjBase + */ + XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS + +public: // From MPresentityGroupMemberInfo + + const MXIMPIdentity& GroupMemberId() const; + const TDesC16& GroupMemberDisplayName() const; + void SetGroupMemberIdL( MXIMPIdentity* aIdentity ); + void SetGroupMemberDisplayNameL( const TDesC16& aDisplayName ); + + +public: // New functions + + /** + * Extenalizes object data to given stream. + * @param aStream Stream to write. + */ + //IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; + + + /** + * Internalizes object data from given stream. + * @param aStream Stream to read. + */ + IMPORT_C void InternalizeL( RReadStream& aStream ); + + + /** + * TLinearOrder for ordering based on stored group id, + * when this class is used within an RPointerArray or derivatives. + */ + IMPORT_C static TInt GroupIdLinearOrder( + const CPresentityGroupMemberInfoImp& aA, + const CPresentityGroupMemberInfoImp& aB ); + + /** + * Access to identity object + * @return Identity + */ + IMPORT_C const CXIMPIdentityImp& IdentityImp() const; + +private: // data + + /** + * Identity + * Own. + */ + CXIMPIdentityImp* iIdentity; + + /** + * Displayname + * Own. + */ + RBuf16 iDisplayName; + + }; + + +#endif // CPRESENTITYGROUPMEMBERINFOIMP_H