|
1 /* |
|
2 * Copyright (c) 2005-2009 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 _LIT(KDataCBluetoothSocket, "CBluetoothSocket"); |
|
20 _LIT(KDataRfcommSockAddr, "TRfcommSockAddr"); |
|
21 _LIT(KDataBTServiceSecurity, "TBTServiceSecurity"); |
|
22 _LIT(KDataBTSockAddr, "TBTSockAddr"); |
|
23 _LIT(KDataSockAddr, "TSockAddr"); |
|
24 _LIT(KDataRSocket, "RSocket"); |
|
25 _LIT(KDataBTDevAddr, "TBTDevAddr"); |
|
26 |
|
27 // --------------------- CTestBlock ----------------------------------- |
|
28 |
|
29 inline CTestBlock::CTestBlock() |
|
30 { |
|
31 } |
|
32 |
|
33 inline CTestBlock::~CTestBlock() |
|
34 { |
|
35 } |
|
36 |
|
37 inline CDataWrapper* CTestBlock::CreateDataL( const TDesC& aData ) |
|
38 { |
|
39 CDataWrapper* wrapper = NULL; |
|
40 if (aData==KDataCBluetoothSocket) |
|
41 { |
|
42 wrapper=CT_CBluetoothSocketData::NewL(); |
|
43 } |
|
44 else if (aData==KDataRfcommSockAddr) |
|
45 { |
|
46 wrapper=CT_TRfcommSockAddrData::NewL(); |
|
47 } |
|
48 else if (aData==KDataBTSockAddr) |
|
49 { |
|
50 wrapper=CT_BTSockAddrData::NewL(); |
|
51 } |
|
52 else if (aData==KDataSockAddr) |
|
53 { |
|
54 wrapper=CT_SockAddrData::NewL(); |
|
55 } |
|
56 else if(aData==KDataBTServiceSecurity) |
|
57 { |
|
58 wrapper=CT_BTServiceSecurityData::NewL(); |
|
59 } |
|
60 else if (aData==KDataRSocket) |
|
61 { |
|
62 wrapper=CT_RSocketData::NewL(); |
|
63 } |
|
64 else if (aData==KDataBTDevAddr) |
|
65 { |
|
66 wrapper=CT_BTDevAddrData::NewL(); |
|
67 } |
|
68 return wrapper; |
|
69 } |
|
70 |
|
71 // --------------------- CT_BTSockAPIServer ----------------------------------- |
|
72 |
|
73 inline CT_BTSockAPIServer::CT_BTSockAPIServer() |
|
74 { |
|
75 } |
|
76 |
|
77 inline CT_BTSockAPIServer::~CT_BTSockAPIServer() |
|
78 { |
|
79 } |
|
80 |
|
81 inline CTestBlockController* CT_BTSockAPIServer::CreateTestBlock() |
|
82 { |
|
83 return new CTestBlock(); |
|
84 } |