author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:34:56 +0100 | |
branch | RCL_3 |
changeset 44 | 3e88ff8f41d5 |
parent 43 | c1f20ce4abcf |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// f32\sfile\sf_plugin.h |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#if !defined(__SF_PLUGIN_H__) |
|
19 |
||
20 |
#define __SF_PLUGIN_H__ |
|
21 |
||
22 |
#include "message.h" |
|
23 |
#include <f32fsys.h> |
|
42
a179b74831c9
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
24 |
#include <f32plugin.h> |
0 | 25 |
|
26 |
class CFsSyncMessageScheduler; |
|
27 |
class CFsInternalRequest; |
|
28 |
||
29 |
class TFsPluginThread |
|
30 |
{ |
|
31 |
public: |
|
32 |
TFsPluginThread(); |
|
33 |
public: |
|
34 |
TInt iDriveNumber; |
|
35 |
TBool iIsAvailable; |
|
36 |
RMutex iPluginLock; |
|
37 |
CPluginThread* iThread; |
|
38 |
TUint iId; |
|
39 |
}; |
|
40 |
||
41 |
/** |
|
42 |
* Plugin Manager |
|
43 |
* |
|
44 |
* - Initialised in main thread |
|
45 |
* |
|
46 |
* - Contains array of request chains which represent the |
|
47 |
* plugins registered for each request type. |
|
48 |
* |
|
49 |
* - Plugins register their interest with each request type, |
|
50 |
* specifying the associated thread and pre/post processing options. |
|
51 |
*/ |
|
52 |
class FsPluginManager |
|
53 |
{ |
|
54 |
public: |
|
55 |
static void InitialiseL(); |
|
56 |
||
57 |
static TInt MountPlugin(CFsPluginFactory& aPluginFactory, TInt aDrive, TInt aPos); |
|
58 |
static void DismountPlugin(CFsPluginFactory& aPluginFactory, TInt aPos); |
|
59 |
||
60 |
static TInt InstallPluginFactory(CFsPluginFactory* aFactory,RLibrary aLib); |
|
61 |
static CFsPluginFactory* GetPluginFactory(const TDesC& aName); |
|
62 |
||
44 | 63 |
static TInt NextPlugin(CFsPlugin*& aPlugin, CFsMessageRequest* aMsgRequest, TBool aLock, TBool aCheckCurrentOperation=ETrue); |
64 |
static TInt PrevPlugin(CFsPlugin*& aPlugin, CFsMessageRequest* aMsgRequest, TBool aLock); |
|
0 | 65 |
static TInt InsertInPluginStack(CFsPlugin*& aPlugin,TInt aPos); |
66 |
static TInt IsInChain(TInt aUPos, TInt aPos,TInt aDrive, CFsPluginFactory* aPluginFactory); |
|
67 |
static CFsPlugin* FindByUniquePosition(TInt aPos); |
|
68 |
||
44 | 69 |
static TInt InitPlugin(CFsPlugin& aPlugin); |
0 | 70 |
static void TransferRequests(CPluginThread* aPluginThread); |
71 |
static void CancelPlugin(CFsPlugin* aPlugin,CSessionFs* aSession); |
|
72 |
static TInt ChainCount(); |
|
73 |
static TInt Plugin(CFsPlugin*& aPlugin, TInt aPos); |
|
74 |
||
44 | 75 |
static void LockChain(); |
0 | 76 |
static void UnlockChain(); |
77 |
||
78 |
static CFsPluginConn* CreatePluginConnL(TInt aUniquePosition, TUint aClientId); |
|
79 |
static CFsPluginConn* GetPluginConnFromHandle(CSessionFs* aSession, TInt aHandle); |
|
80 |
||
81 |
static TBool IsPluginConnThread(TThreadId tid, CFsPlugin* aPlugin); |
|
82 |
||
83 |
static void DispatchSync(CFsRequest* aRequest); |
|
84 |
static void CompleteSessionRequests(CSessionFs* aSession, TInt aValue, CFsInternalRequest* aRequest); |
|
85 |
||
86 |
private: |
|
87 |
static TInt UpdateMountedDrive(CFsPlugin* aPlugin, CFsPluginFactory* aFactory,TInt aDrive); |
|
88 |
static void GetNextCancelPluginOpRequest(CPluginThread* aPluginThread, CFsRequest*& aCancelPluginRequest); |
|
89 |
private: |
|
90 |
static CFsObjectCon* iPluginFactories; |
|
91 |
static CFsObjectCon* iPluginConns; |
|
92 |
||
93 |
static RPointerArray<CFsPlugin> iPluginChain; |
|
44 | 94 |
static RFastLock iChainLock; |
0 | 95 |
|
96 |
static CFsSyncMessageScheduler* iScheduler; |
|
97 |
||
98 |
friend class RequestAllocator; |
|
99 |
}; |
|
100 |
||
101 |
#endif // __SF_PLUGIN_H |
|
102 |