author | Brendan Donegan <brendand@symbian.org> |
Sun, 04 Jul 2010 20:28:57 +0100 | |
branch | nvmemory |
changeset 82 | f73dcda8349f |
parent 13 | 73107a0bc259 |
permissions | -rw-r--r-- |
13
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
1 |
/* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
8 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
11 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
13 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
15 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
17 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
18 |
/* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
19 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
20 |
* This file starts the HOSTFS local drive mapping |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
21 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
22 |
*/ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
23 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
24 |
#include <e32std.h> |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
25 |
#include "estart.h" |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
26 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
27 |
#define __ENABLE_HOSTFS |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
28 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
29 |
/*! |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
30 |
* Customised estart class |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
31 |
*/ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
32 |
class TSyborgFSStartup : public TFSStartup |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
33 |
{ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
34 |
public: |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
35 |
#ifdef __ENABLE_HOSTFS |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
36 |
virtual void InitHostFS(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
37 |
#endif |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
38 |
}; |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
39 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
40 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
41 |
#ifdef __ENABLE_HOSTFS |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
42 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
43 |
/* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
44 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
45 |
* Run the Host FS starter program |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
46 |
* |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
47 |
*/ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
48 |
void TSyborgFSStartup::InitHostFS() |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
49 |
{ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
50 |
_LIT(KHostFSMounter, "z:\\sys\\bin\\SVPHOSTFS.EXE"); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
51 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
52 |
RProcess ws; |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
53 |
TInt r=ws.Create(KHostFSMounter, KNullDesC); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
54 |
if (r == KErrNone) |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
55 |
{ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
56 |
TRequestStatus stat; |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
57 |
ws.Rendezvous(stat); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
58 |
ws.Resume(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
59 |
User::WaitForRequest(stat); // wait for start or death |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
60 |
ws.Close(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
61 |
} |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
62 |
} |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
63 |
#endif |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
64 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
65 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
66 |
/*! |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
67 |
* Estart entry point |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
68 |
*/ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
69 |
GLDEF_C TInt E32Main() |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
70 |
{ |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
71 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
72 |
TSyborgFSStartup fsStart; |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
73 |
fsStart.Init(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
74 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
75 |
fsStart.Run(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
76 |
#ifdef __ENABLE_HOSTFS |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
77 |
fsStart.InitHostFS(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
78 |
#endif |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
79 |
fsStart.StartSystem(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
80 |
|
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
81 |
fsStart.Close(); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
82 |
return(0); |
73107a0bc259
Merged patch from Johnathan White (@accenture)
Martin Trojer <martin.trojer@nokia.com>
parents:
diff
changeset
|
83 |
} |