diff -r 000000000000 -r 59dfe4ae66d0 rcsimengine/inc/chatcontactmanagerimpl_sym.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rcsimengine/inc/chatcontactmanagerimpl_sym.h Fri Oct 08 18:07:26 2010 +0530 @@ -0,0 +1,148 @@ +/* +* Copyright (c) 2009-2010 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: +* RCS IM Library - Initial version +* +*/ + + +#ifndef __CHATCONTACT_MANAGER_IMPL_SYM_H__ +#define __CHATCONTACT_MANAGER_IMPL_SYM_H__ + + +#include +#include +#include "chatinterfaces.h" +#include "qmobilityglobal.h" +#include "qcontactfilter.h" +#include "qcontactdetailfilter.h" +#include "qtcontactsglobal.h" + + +//SIP and MCE Specific Headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//Profile agent, SIP stack inclusions +#include +#include +#include +#include + +//#include "rcschatengine_globals.h" + +class TMsrpChatSession; +class CContactItem; +class ChatContactManager; +class ContactView; + + + +QTM_BEGIN_NAMESPACE +class QContact; +class QContactDetailFilterPrivate; +QTM_END_NAMESPACE + +QTM_USE_NAMESPACE + +const TInt KGranularity = 12; +const TInt KAcceptSize = 24; +/* Interface implementation of MChatContactIntf */ +class ChatContactManagerImpl: public QObject, + public MMceSessionObserver, + public MSIPProfileRegistryObserver, // for CSIPProfileRegistry + public MSIPObserver, // for CSIP + public MMceInSessionObserver, // for incoming sessions from MCE + public MMceDataSinkObserver + +{ + public: + ChatContactManagerImpl(ChatContactManager *apCntManager); + ~ChatContactManagerImpl(); + + + + /* Setup MCE Manager */ + RcsIMLib::RcsChatId createChatSession(QContactLocalId contactId, QString initMsg); + void closeSession(RcsIMLib::RcsChatId sessID); + void acceptIncomingSession(RcsIMLib::RcsChatId sessID); + + + // From MMceSessionObserver + void SessionStateChanged(CMceSession& aSession, TMceTransactionDataContainer* aContainer); + void SessionConnectionStateChanged(CMceSession& aSession, TBool aActive ); + void Failed( CMceSession& aSession, TInt aError ); + void UpdateFailed(CMceSession& aSession, TMceTransactionDataContainer* aContainer ); + + // From MSIPProfileAgentObserver + void ProfileRegistryEventOccurred(TUint32 aProfileId, TEvent aEvent); + void ProfileRegistryErrorOccurred(TUint32 aProfileId, TInt aError); + + // From MSIPObserver + void IncomingRequest(TUint32 aIapId, CSIPServerTransaction* aTransaction); + void TimedOut(CSIPServerTransaction& aTransaction); + + // From MMceInSessionObserver + void IncomingSession(CMceInSession* aSession, TMceTransactionDataContainer* aContainer ); + void IncomingUpdate(CMceSession& aOrigSession, CMceInSession* aUpdatedSession, TMceTransactionDataContainer* aContainer ); + void DataReceived(CMceMediaStream& aStream,CMceMediaSink& aSink, const TDesC8& aData); + + private: + void setupMceManagerL(); + RcsIMLib::RcsChatId createChatSessionL(QContactLocalId contactId, QString initMsg); + void GetStreams(CMceSession& aSession, CMceMessageStream*& aUplinkStr, CMceMessageStream*& aDownlinkStr ); + + private: + //Variables here + QContactManager *mManager; + ChatContactManager *mParent; + //SYM Specific Headers + CMceManager *mMceMgr; + CSIP *mSip; + CSIPProfileRegistry *mProfileReg; + CSIPProfile *mProfile; + RPointerArray mMceSessions; + RPointerArray mChatSessionArray; + TMceTransactionDataContainer mDataContainer; + RPointerArray mAllprofiles; + //QList mAllContacts; + //QList mAllSIPContacts; + //QContactLocalId mMyID; + //QContactLocalId mMyBuddyID; + //QString mMyFirstName; + //QContactDetailFilter mFilter; + HBufC8 *mOriginatorUri; + + +}; +#endif //__CHATCONTACT_MANAGER_IMPL_SYM_H__