|
1 // Copyright (c) 1997-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 // |
|
15 |
|
16 /** |
|
17 @file SLIPDLL.CPP |
|
18 */ |
|
19 |
|
20 #include "SLIP.H" |
|
21 |
|
22 |
|
23 // |
|
24 // Panic |
|
25 // |
|
26 |
|
27 /** |
|
28 Panic the Protocol |
|
29 |
|
30 @internalComponent |
|
31 @param aPanic panic number |
|
32 */ |
|
33 void SlipPanic(TSlipPanic aPanic) |
|
34 { |
|
35 _LIT(KSlip, "SLIP"); |
|
36 User::Panic(KSlip,aPanic); |
|
37 } |
|
38 |
|
39 /** |
|
40 Panic the Protocol |
|
41 |
|
42 @internalComponent |
|
43 @param aFault panic number |
|
44 */ |
|
45 void SlipFault(TSlipFault aFault) |
|
46 { |
|
47 _LIT(KSlipFault, "SLIP Fault"); |
|
48 User::Panic(KSlipFault,aFault); |
|
49 } |
|
50 |
|
51 |
|
52 TInt CSlipIfFactory::Info(TNifIfInfo& aInfo, TInt) const |
|
53 { |
|
54 CSlip::FillInInfo(aInfo); |
|
55 return 1; |
|
56 } |
|
57 |
|
58 void CSlipIfFactory::InstallL() |
|
59 { |
|
60 |
|
61 } |
|
62 |
|
63 CNifIfBase* CSlipIfFactory::NewInterfaceL(const TDesC& aName) |
|
64 { |
|
65 |
|
66 _LIT(KSlip, "Slip"); |
|
67 if(aName.CompareF(KSlip)) |
|
68 User::Leave(KErrNotSupported); |
|
69 |
|
70 return new (ELeave) CSlip(*this); |
|
71 } |
|
72 |
|
73 // Force export of non-mangled name |
|
74 extern "C" { IMPORT_C CNifFactory *Install(); } |
|
75 |
|
76 EXPORT_C CNifFactory *Install() |
|
77 { |
|
78 return new (ELeave) CSlipIfFactory; |
|
79 } |
|
80 |