libraries/memoryaccess/DynamicDfcSupport.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // DynamicDfcSupport.h
       
     2 // 
       
     3 // Copyright (c) 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 #ifndef DYNAMICDFCSUPPORT_H
       
    13 #define DYNAMICDFCSUPPORT_H
       
    14 
       
    15 #include <kernel.h>
       
    16 #include <fshell/common.mmh>
       
    17 
       
    18 #ifdef FSHELL_DYNAMICDFC_SUPPORT
       
    19 
       
    20 class TDynDfcQueWrapper
       
    21 	{
       
    22 public:
       
    23 	static TInt Create(TDynDfcQueWrapper*& aDfcQ, TInt aPriority, const TDesC& aBaseName);
       
    24 	void Destroy();
       
    25 	TDfcQue* Que() const { return iQueue; }
       
    26 
       
    27 private:
       
    28 	TDynDfcQueWrapper();
       
    29 	~TDynDfcQueWrapper();
       
    30 
       
    31 private:
       
    32 	TDynamicDfcQue* iQueue;
       
    33 	};
       
    34 
       
    35 #else
       
    36 
       
    37 class TDynDfcQueWrapper
       
    38 	{
       
    39 public:
       
    40 	static TInt Create(TDynDfcQueWrapper*& aDfcQ, TInt aPriority, const TDesC& aBaseName);
       
    41 	void Destroy();
       
    42 	TDfcQue* Que() const { return iQueue; }
       
    43 
       
    44 private:
       
    45 	TDynDfcQueWrapper();
       
    46 	~TDynDfcQueWrapper();
       
    47 	static void ExitDfcThread(TAny* aPtr);
       
    48 
       
    49 private:
       
    50 	TDfcQue* iQueue;
       
    51 	TDfc iKillDfc;
       
    52 	};
       
    53 
       
    54 #endif // FSHELL_DYNAMICDFC_SUPPORT
       
    55 
       
    56 #endif // DYNAMICDFCSUPPORT_H