1 // Copyright (c) 2002-2009 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 // Implements the factory class which is used to instantiate the RAW IP NIF. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include <f32file.h> |
|
23 #include "RawIPNifMainFactory.h" |
|
24 #include "RawIPNifMain.h" |
|
25 #include "bttlog.h" |
|
26 |
|
27 void CRawIPNifMainFactory::InstallL() |
|
28 /** |
|
29 * This function is pure virtual in CNifFactory, so we have to define it |
|
30 * here. It is called by NifMan before NewInterfaceL(). |
|
31 * However, it doesn't do anything. |
|
32 */ |
|
33 { |
|
34 } |
|
35 |
|
36 CNifIfBase* CRawIPNifMainFactory::NewInterfaceL(const TDesC& aName) |
|
37 /** |
|
38 * Factory function which creates an instance of the RAW IP NIF. |
|
39 * |
|
40 * @param aName The name of the NIF |
|
41 * @return A newly instantiated RAW IP NIF |
|
42 */ |
|
43 { |
|
44 return NewInterfaceL(aName, NULL); |
|
45 } |
|
46 |
|
47 CNifIfBase* CRawIPNifMainFactory::NewInterfaceL(const TDesC& aName,MNifIfNotify* aNotify) |
|
48 /** |
|
49 * Factory function which creates an instance of the RAW IP NIF. |
|
50 * |
|
51 * @param aName The name of the NIF |
|
52 * @param aNotify supplies details from "IfParams" field in CommDb - not used in btt |
|
53 * @return A newly instantiated RAW IP NIF |
|
54 */ |
|
55 { |
|
56 #ifdef __BTT_LOGGING__ |
|
57 iTheLogger = CBttLogger::NewL(KNifSubDir, KRefFile, User::FastCounter()); |
|
58 #endif // __BTT_LOGGING__ |
|
59 |
|
60 _LOG_L1C1(_L8("Raw IP.NIF logging started.")); |
|
61 _LOG_L1C2(_L8(" aNotify = %x"), aNotify); |
|
62 |
|
63 CRawIPNifMain* s = new (ELeave) CRawIPNifMain(*this, aNotify, iTheLogger); |
|
64 CleanupStack::PushL(s); |
|
65 s->ConstructL(aName); |
|
66 CleanupStack::Pop(s); |
|
67 |
|
68 return s; |
|
69 } |
|
70 |
|
71 TInt CRawIPNifMainFactory::Info(TNifIfInfo& /*aInfo*/, TInt /*aIndex*/) const |
|
72 /** |
|
73 * This function is pure virtual in CNifFactory, so we have to define it |
|
74 * here. However, it doesn't do anything, and is never called by NifMan. |
|
75 * |
|
76 * @param aInfo Ignored |
|
77 * @param aIndex Ignored |
|
78 * @return Always KErrNone |
|
79 */ |
|
80 { |
|
81 return KErrNone; |
|
82 } |
|