|
1 // Copyright (c) 2007-2010 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 "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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef FDCHCTLORIGINALCLI_H |
|
22 #define FDCHCTLORIGINALCLI_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <fdchctloriginalipc.h> |
|
26 |
|
27 NONSHARABLE_CLASS(RFdcHctlOriginal) |
|
28 : public RSessionBase |
|
29 { |
|
30 public: |
|
31 inline RFdcHctlOriginal(); |
|
32 |
|
33 inline TInt Connect(); |
|
34 inline void Close(); |
|
35 |
|
36 inline void RequestConnection(); |
|
37 |
|
38 private: |
|
39 TAny* iExtension; |
|
40 }; |
|
41 |
|
42 inline RFdcHctlOriginal::RFdcHctlOriginal() |
|
43 : iExtension(NULL) |
|
44 {} |
|
45 |
|
46 inline TInt RFdcHctlOriginal::Connect() |
|
47 { |
|
48 // We are not able to "start" the server, as it is set running when the function driver |
|
49 // is loaded. Instead we just want to try and connect and ask for the provision of any |
|
50 // hardware that is available. |
|
51 return CreateSession( |
|
52 KFdcHctlOrigSrvName, |
|
53 TVersion( |
|
54 KFdcHctlOrigSrvMajorVersionNumber, |
|
55 KFdcHctlOrigSrvMinorVersionNumber, |
|
56 KFdcHctlOrigSrvBuildNumber |
|
57 ) |
|
58 ); |
|
59 } |
|
60 |
|
61 inline void RFdcHctlOriginal::Close() |
|
62 { |
|
63 RSessionBase::Close(); |
|
64 } |
|
65 |
|
66 inline void RFdcHctlOriginal::RequestConnection() |
|
67 { |
|
68 // We can always fail here - this is a best effort request. |
|
69 Send(EFunctionRequestConnection); |
|
70 } |
|
71 |
|
72 #endif // FDCHCTLORIGINALCLI_H |