contentcontrolsrv/ccsrv/inc/ccsrvsession.h
changeset 0 79c6a41cd166
child 11 bd874ee5e5e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contentcontrolsrv/ccsrv/inc/ccsrvsession.h	Thu Dec 17 08:54:17 2009 +0200
@@ -0,0 +1,210 @@
+/*
+* 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 <e32base.h>
+
+// 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(
+        TUint32 aSender,
+        TUint32 aReceiver,
+        CCcSrvMsg& aMessage );
+
+private:
+    /**
+     *
+     *
+     */
+    inline CCcSrv& Server()
+        {
+        return *static_cast<CCcSrv*>( const_cast<CServer2*>( 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<CCcSrvMsg> iRequests;
+    
+    /**
+     * Observers
+     */
+    RArray<TUint32> iObservers;
+    
+    };
+
+#endif // CCSRVSESSION_H
+
+// End of file