|
1 // Copyright (c) 2004-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 ramodfamily.cpp |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 |
|
22 #include "ramodfamily.h" |
|
23 #include "ramod.h" |
|
24 //TODO why is this header included? #include <ss_protprov.h> |
|
25 #include <ss_glob.h> |
|
26 |
|
27 /* |
|
28 * @internalTechnology |
|
29 */ |
|
30 IMPORT_C CProtocolFamilyBase* Install(void); |
|
31 |
|
32 /* |
|
33 * @internalTechnology |
|
34 */ |
|
35 EXPORT_C CProtocolFamilyBase* Install(void) |
|
36 { |
|
37 return new (ELeave) CramodProtocolFamily; |
|
38 } |
|
39 |
|
40 /** |
|
41 * CramodProtocolFamily |
|
42 */ |
|
43 CramodProtocolFamily::CramodProtocolFamily() |
|
44 { |
|
45 __DECLARE_NAME(_S("CramodProtocolFamily")); |
|
46 } |
|
47 |
|
48 CramodProtocolFamily::~CramodProtocolFamily() |
|
49 { |
|
50 } |
|
51 |
|
52 TInt CramodProtocolFamily::Install() |
|
53 { |
|
54 return KErrNone; |
|
55 } |
|
56 |
|
57 TInt CramodProtocolFamily::Remove() |
|
58 { |
|
59 return KErrNone; |
|
60 } |
|
61 |
|
62 TUint CramodProtocolFamily::ProtocolList(TServerProtocolDesc*& aProtocolList) |
|
63 { |
|
64 TServerProtocolDesc* p = new (ELeave) TServerProtocolDesc[1]; // Esock catches this leave |
|
65 |
|
66 Cramod::FillIdentification(p[0]); |
|
67 aProtocolList = p; |
|
68 return 1; |
|
69 } |
|
70 |
|
71 CProtocolBase* CramodProtocolFamily::NewProtocolL(TUint /*aSockType*/, |
|
72 TUint aProtocol) |
|
73 { |
|
74 __ASSERT_ALWAYS(aProtocol == KMyProtocolId, User::Leave(KErrNotSupported) ); |
|
75 |
|
76 CProtocolBase* pProto=Cramod::NewL(); |
|
77 |
|
78 return pProto; |
|
79 } |
|
80 |
|
81 |
|
82 |
|
83 |