epoc32/include/mmf/server/mmfsubthreadbase.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/mmf/server/mmfsubthreadbase.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/mmf/server/mmfsubthreadbase.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// 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
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -21,6 +21,10 @@
    1.16  #include <mmf/common/mmfpaniccodes.h>
    1.17  #include <mmf/common/mmfcontroller.h>
    1.18  
    1.19 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.20 +#include <mmf/server/mmfsubthreadbaseimpl.h>
    1.21 +#endif
    1.22 +
    1.23  /**
    1.24  @publishedAll
    1.25  @released
    1.26 @@ -130,7 +134,7 @@
    1.27  
    1.28  class RMMFSubThreadBase; // declared here.
    1.29  /**
    1.30 -@internalTechnology
    1.31 +@publishedAll
    1.32  
    1.33  Base class for clients to MMF sub threads.
    1.34  Provides functionality to start the sub thread and transmit events from subthread to main thread.
    1.35 @@ -176,91 +180,5 @@
    1.36  	TInt iReserved3;
    1.37  	};
    1.38  
    1.39 -/**
    1.40 -@internalTechnology
    1.41 +#endif
    1.42  
    1.43 -Used to Kill the subthread either immediately or after a timeout.
    1.44 -Used by the subthread on startup to prevent orphaning if no sessions are created to it.
    1.45 -*/
    1.46 -class CMMFSubThreadShutdown : public CTimer
    1.47 -	{
    1.48 -	enum {EMMFSubThreadShutdownDelay=1000000};	// 1s
    1.49 -public:
    1.50 -	static CMMFSubThreadShutdown* NewL();
    1.51 -	CMMFSubThreadShutdown();
    1.52 -	void ConstructL();
    1.53 -	void Start();
    1.54 -	void ShutdownNow();
    1.55 -private:
    1.56 -	void RunL();
    1.57 -	};
    1.58 -
    1.59 -/**
    1.60 -@internalTechnology
    1.61 -
    1.62 -Subthread server base class.
    1.63 -Provides session counting and will kill the subthread immediately when the session count reaches zero.
    1.64 -Starts the shutdown timer on construction to prevent orphaning if no sessions are created.
    1.65 -*/
    1.66 -class CMMFSubThreadServer : public CMmfIpcServer
    1.67 -	{
    1.68 -public:
    1.69 -	virtual ~CMMFSubThreadServer();
    1.70 -	virtual void SessionCreated();
    1.71 -	virtual TInt RunError(TInt aError);
    1.72 -	virtual void ShutdownNow();
    1.73 -protected:
    1.74 -	virtual CMmfIpcSession* NewSessionL(const TVersion& aVersion) const = 0;
    1.75 -	CMMFSubThreadServer(TInt aPriority);
    1.76 -	void ConstructL();
    1.77 -private:
    1.78 -	CMMFSubThreadShutdown* iShutdownTimer;
    1.79 -	};
    1.80 -
    1.81 -/**
    1.82 -@internalTechnology
    1.83 -
    1.84 -Used to hold on to an RMessage so we can complete it asynchronously to send an event to the main thread.
    1.85 -*/
    1.86 -class CMMFSubThreadEventReceiver : public CBase
    1.87 -	{
    1.88 -public:
    1.89 -	static CMMFSubThreadEventReceiver* NewL(const RMmfIpcMessage& aMessage);
    1.90 -	~CMMFSubThreadEventReceiver();
    1.91 -	void SendEvent(const TMMFEvent& aEvent);
    1.92 -private:
    1.93 -	CMMFSubThreadEventReceiver(const RMmfIpcMessage& aMessage);
    1.94 -private:
    1.95 -	RMmfIpcMessage iMessage;
    1.96 -	TBool iNeedToCompleteMessage;
    1.97 -	};
    1.98 -
    1.99 -/**
   1.100 -@internalTechnology
   1.101 -
   1.102 -Subthread session base class.
   1.103 -Derived classes must implement the ServiceL() method.
   1.104 -*/
   1.105 -class CMMFSubThreadSession : public CMmfIpcSession, public MAsyncEventHandler
   1.106 -	{
   1.107 -public:
   1.108 -	virtual ~CMMFSubThreadSession();
   1.109 -	void CreateL(const CMmfIpcServer& aServer);
   1.110 -	virtual void ServiceL(const RMmfIpcMessage& aMessage) = 0;
   1.111 -	//from MAsyncEventHandler
   1.112 -	TInt SendEventToClient(const TMMFEvent& aEvent);
   1.113 -protected:
   1.114 -	CMMFSubThreadSession() {};
   1.115 -	TBool ReceiveEventsL(const RMmfIpcMessage& aMessage);
   1.116 -	TBool CancelReceiveEvents();
   1.117 -	TBool ShutDown();
   1.118 -protected:
   1.119 -	CMMFSubThreadServer* iServer;
   1.120 -private:
   1.121 -	CMMFSubThreadEventReceiver* iEventReceiver;
   1.122 -	RArray<TMMFEvent> iEvents;
   1.123 -	};
   1.124 -
   1.125 -
   1.126 -
   1.127 -#endif