diff -r 0efa10d348c0 -r a5a39a295112 contentcontrolsrv/ccsrv/inc/ccsrvsession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contentcontrolsrv/ccsrv/inc/ccsrvsession.h Wed Sep 01 12:22:09 2010 +0100 @@ -0,0 +1,208 @@ +/* +* Copyright (c) 2008 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: +* +*/ + +#ifndef CCSRVSESSION_H +#define CCSRVSESSION_H + +// System includes +#include + +// Forward declarations +#include "ccsrv.h" + +/** + * Home screen content control server session + * + * + * @code + * + * @endcode + * + * @lib ccsrv.exe + * @since S60 v5.0 + */ +class CCcSrvSession : public CSession2 + { +public: // Constructor and destructor + /** + * Constructor + */ + CCcSrvSession(); + + /** + * Destructor. + */ + ~CCcSrvSession(); + +public: // From CSession2 + /** + * + */ + void CreateL(); + + /** + * + */ + void ServiceL( + const RMessage2& aMessage ); + +public: // New functions + /** + * + */ + TUint32 Id(); + + /** + * + */ + void SetId( TUint32 aId ); + + /** + * + * + */ + void RegisterObserverSessionL( + TUint32 aObserver ); + + /** + * + * + */ + void UnregisterObserverSessionL( + TUint32 aObserver ); + + /** + * + * + */ + void ReceiveMsgL( + CCcSrvMsg& aMessage ); + +private: + /** + * + * + */ + inline CCcSrv& Server() + { + return *static_cast( const_cast( CSession2::Server() ) ); + }; + + /** + * + */ + void DoServiceL( + RMessage2& aMessage ); + + + /** + * + * + */ + void HandleRegisterProviderL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleRegisterObserverL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleCancelReqL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleWaitForApiReqL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleWaitForApiNtfL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleApiReqL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleApiRespL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleGetMsgDataL( + RMessage2& aMessage ); + + /** + * + * + */ + void HandleApiNtfL( + RMessage2& aMessage ); + + /** + * + * + */ + void SendObserverNtfL( + TUint32 aSender, + TUint32 aNtf ); + +private: // Data + /** + * Session id + */ + TUint32 iId; + + /** + * Last used transaction id + */ + TInt iLastTrId; + + /** + * Outstanding transactions + */ + RPointerArray iRequests; + + /** + * Observers + */ + RArray iObservers; + + }; + +#endif // CCSRVSESSION_H + +// End of file