0
|
1 |
/*
|
|
2 |
* Copyright (c) 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 the License "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 |
|
|
20 |
#include "p2pdevice.h" // For DP2PDevice
|
|
21 |
#include "p2puserchannel.h" // For DP2PUserChannel
|
|
22 |
#include "p2proutertrace.h" // For C_TRACE..
|
|
23 |
#include "p2pinternaldefs.h" // For KP2PDriverName
|
|
24 |
|
|
25 |
// CONSTS
|
|
26 |
const TInt KMajorVersionNumber = 0;
|
|
27 |
const TInt KMinorVersionNumber = 1;
|
|
28 |
const TInt KBuildVersionNumber = 1;
|
|
29 |
|
|
30 |
DP2PDevice::DP2PDevice(
|
|
31 |
// None
|
|
32 |
)
|
|
33 |
{
|
|
34 |
|
|
35 |
C_TRACE( ( _T( "DP2PDevice::DP2PDevice>" ) ) );
|
|
36 |
iVersion = TVersion( KMajorVersionNumber, KMinorVersionNumber, KBuildVersionNumber );
|
|
37 |
//iParseMask |= KDeviceAllowUnit; // NOTE! allows over 32-channel objects
|
|
38 |
iParseMask |= KDeviceAllowInfo;
|
|
39 |
C_TRACE( ( _T( "DP2PDevice::DP2PDevice<" ) ) );
|
|
40 |
|
|
41 |
}
|
|
42 |
|
|
43 |
DP2PDevice::~DP2PDevice(
|
|
44 |
// None
|
|
45 |
)
|
|
46 |
{
|
|
47 |
|
|
48 |
C_TRACE( ( _T( "DP2PDevice::~DP2PDevice<>" ) ) );
|
|
49 |
|
|
50 |
}
|
|
51 |
|
|
52 |
TInt DP2PDevice::Install(
|
|
53 |
// None
|
|
54 |
)
|
|
55 |
{
|
|
56 |
|
|
57 |
C_TRACE( ( _T( "DP2PDevice::Install<>" ) ) );
|
|
58 |
return ( SetName( &KP2PDriverName ) );
|
|
59 |
|
|
60 |
}
|
|
61 |
|
|
62 |
void DP2PDevice::GetCaps(
|
|
63 |
TDes8& //aDes
|
|
64 |
) const
|
|
65 |
{
|
|
66 |
|
|
67 |
C_TRACE( ( _T( "DP2PDevice::GetCaps><-" ) ) );
|
|
68 |
|
|
69 |
}
|
|
70 |
|
|
71 |
// In context of the user thread, thread in CS.
|
|
72 |
TInt DP2PDevice::Create(
|
|
73 |
DLogicalChannelBase*& aChannel
|
|
74 |
)
|
|
75 |
{
|
|
76 |
|
|
77 |
C_TRACE( ( _T( "DP2PDevice::Create 0x%x>" ), &aChannel ) );
|
|
78 |
aChannel = new DP2PUserChannel();
|
|
79 |
TInt retVal = aChannel ? KErrNone : KErrNoMemory;
|
|
80 |
C_TRACE( ( _T( "DP2PDevice::Create 0x%x %d<" ), &aChannel, retVal ) );
|
|
81 |
return retVal;
|
|
82 |
|
|
83 |
}
|