|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "ncminternalsrv.h" |
|
25 #include "ncmserverconsts.h" |
|
26 |
|
27 |
|
28 /** Constructor */ |
|
29 EXPORT_C RNcmInternalSrv::RNcmInternalSrv() |
|
30 { |
|
31 } |
|
32 |
|
33 /** Destructor */ |
|
34 EXPORT_C RNcmInternalSrv::~RNcmInternalSrv() |
|
35 { |
|
36 } |
|
37 |
|
38 EXPORT_C TVersion RNcmInternalSrv::Version() const |
|
39 { |
|
40 return TVersion( KNcmSrvMajorVersionNumber, |
|
41 KNcmSrvMinorVersionNumber, |
|
42 KNcmSrvBuildNumber |
|
43 ); |
|
44 } |
|
45 |
|
46 EXPORT_C TInt RNcmInternalSrv::Connect() |
|
47 { |
|
48 return CreateSession(KNcmServerName, Version(), 1); |
|
49 } |
|
50 |
|
51 EXPORT_C TInt RNcmInternalSrv::TransferHandle(RHandleBase& aCommHandle, RHandleBase& aCommChunk, RHandleBase& aDataHandle, RHandleBase& aDataChunk) |
|
52 { |
|
53 return SendReceive(ENcmTransferHandle, TIpcArgs(aCommHandle, aCommChunk, aDataHandle, aDataChunk)); |
|
54 } |
|
55 |
|
56 EXPORT_C TInt RNcmInternalSrv::SetIapId(TUint aIapId) |
|
57 { |
|
58 return SendReceive(ENcmSetIapId, TIpcArgs(aIapId)); |
|
59 } |
|
60 |
|
61 EXPORT_C TInt RNcmInternalSrv::SetDhcpResult(TInt aResult) |
|
62 { |
|
63 return SendReceive(ENcmSetDhcpResult, TIpcArgs(aResult)); |
|
64 } |
|
65 |
|
66 EXPORT_C void RNcmInternalSrv::DhcpProvisionNotify(TRequestStatus& aStatus) |
|
67 { |
|
68 SendReceive(ENcmDhcpProvisionNotify, aStatus); |
|
69 } |
|
70 |
|
71 EXPORT_C void RNcmInternalSrv::DhcpProvisionNotifyCancel() |
|
72 { |
|
73 SendReceive(ENcmDhcpProvisionNotifyCancel); |
|
74 } |
|
75 |
|
76 EXPORT_C TInt RNcmInternalSrv::TransferBufferSize(TUint aSize) |
|
77 { |
|
78 return SendReceive(ENcmTransferBufferSize, TIpcArgs(aSize)); |
|
79 } |
|
80 |