diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/mmf/server/mmfsubthreadbase.h --- a/epoc32/include/mmf/server/mmfsubthreadbase.h Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/mmf/server/mmfsubthreadbase.h Wed Mar 31 12:33:34 2010 +0100 @@ -1,9 +1,9 @@ // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// at the URL "http://www.eclipse.org/legal/epl-v10.html". // // Initial Contributors: // Nokia Corporation - initial contribution. @@ -21,6 +21,10 @@ #include #include +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#endif + /** @publishedAll @released @@ -130,7 +134,7 @@ class RMMFSubThreadBase; // declared here. /** -@internalTechnology +@publishedAll Base class for clients to MMF sub threads. Provides functionality to start the sub thread and transmit events from subthread to main thread. @@ -176,91 +180,5 @@ TInt iReserved3; }; -/** -@internalTechnology - -Used to Kill the subthread either immediately or after a timeout. -Used by the subthread on startup to prevent orphaning if no sessions are created to it. -*/ -class CMMFSubThreadShutdown : public CTimer - { - enum {EMMFSubThreadShutdownDelay=1000000}; // 1s -public: - static CMMFSubThreadShutdown* NewL(); - CMMFSubThreadShutdown(); - void ConstructL(); - void Start(); - void ShutdownNow(); -private: - void RunL(); - }; - -/** -@internalTechnology - -Subthread server base class. -Provides session counting and will kill the subthread immediately when the session count reaches zero. -Starts the shutdown timer on construction to prevent orphaning if no sessions are created. -*/ -class CMMFSubThreadServer : public CMmfIpcServer - { -public: - virtual ~CMMFSubThreadServer(); - virtual void SessionCreated(); - virtual TInt RunError(TInt aError); - virtual void ShutdownNow(); -protected: - virtual CMmfIpcSession* NewSessionL(const TVersion& aVersion) const = 0; - CMMFSubThreadServer(TInt aPriority); - void ConstructL(); -private: - CMMFSubThreadShutdown* iShutdownTimer; - }; - -/** -@internalTechnology +#endif -Used to hold on to an RMessage so we can complete it asynchronously to send an event to the main thread. -*/ -class CMMFSubThreadEventReceiver : public CBase - { -public: - static CMMFSubThreadEventReceiver* NewL(const RMmfIpcMessage& aMessage); - ~CMMFSubThreadEventReceiver(); - void SendEvent(const TMMFEvent& aEvent); -private: - CMMFSubThreadEventReceiver(const RMmfIpcMessage& aMessage); -private: - RMmfIpcMessage iMessage; - TBool iNeedToCompleteMessage; - }; - -/** -@internalTechnology - -Subthread session base class. -Derived classes must implement the ServiceL() method. -*/ -class CMMFSubThreadSession : public CMmfIpcSession, public MAsyncEventHandler - { -public: - virtual ~CMMFSubThreadSession(); - void CreateL(const CMmfIpcServer& aServer); - virtual void ServiceL(const RMmfIpcMessage& aMessage) = 0; - //from MAsyncEventHandler - TInt SendEventToClient(const TMMFEvent& aEvent); -protected: - CMMFSubThreadSession() {}; - TBool ReceiveEventsL(const RMmfIpcMessage& aMessage); - TBool CancelReceiveEvents(); - TBool ShutDown(); -protected: - CMMFSubThreadServer* iServer; -private: - CMMFSubThreadEventReceiver* iEventReceiver; - RArray iEvents; - }; - - - -#endif