|
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 // Includes |
|
17 #include <ecom/ecom.h> |
|
18 #include <ecom/implementationinformation.h> |
|
19 #include <ecom/implementationproxy.h> |
|
20 #include "nullExample.h" |
|
21 |
|
22 |
|
23 // ================= MEMBER FUNCTIONS ======================= |
|
24 |
|
25 // C++ default constructor can NOT contain any code, that |
|
26 // might leave. |
|
27 // |
|
28 CInterfaceImpl::CInterfaceImpl(): |
|
29 CExampleInterface() |
|
30 { |
|
31 |
|
32 } |
|
33 |
|
34 // Two-phased constructor. |
|
35 CInterfaceImpl* CInterfaceImpl::NewL(TAny* aConstructionParams) |
|
36 { |
|
37 __ASSERT_ALWAYS(aConstructionParams == NULL, User::Leave(KErrArgument)); |
|
38 //return new (ELeave) CInterfaceImpl; |
|
39 CInterfaceImpl* self= new (ELeave) CInterfaceImpl(); |
|
40 return self; |
|
41 } |
|
42 |
|
43 // Destructor |
|
44 CInterfaceImpl::~CInterfaceImpl() |
|
45 { |
|
46 } |
|
47 |
|
48 TInt CInterfaceImpl::Version() const |
|
49 { |
|
50 return 2; |
|
51 } |
|
52 |
|
53 void CInterfaceImpl::DoMethodL() |
|
54 { |
|
55 // Access TLS to ensure it has been set properly |
|
56 REINTERPRET_CAST(TInt*, Dll::Tls()); |
|
57 } |
|
58 |
|
59 TInt CInterfaceImpl::FireAndForget() |
|
60 { |
|
61 TRAPD(error,DoMethodL()); |
|
62 return error; // Always KErrNotSupported |
|
63 } |
|
64 |
|
65 TUid CInterfaceImpl::ImplId() |
|
66 { |
|
67 TUid idVal = {0x01aa500c}; |
|
68 return (idVal); |
|
69 } |
|
70 |
|
71 // Provide the CActive overloads |
|
72 void CInterfaceImpl::RunL() |
|
73 { |
|
74 // Do nothing : should never be called |
|
75 __ASSERT_DEBUG(EFalse,User::Invariant()); |
|
76 } |
|
77 |
|
78 void CInterfaceImpl::DoCancel() |
|
79 { |
|
80 // Do nothing |
|
81 } |
|
82 |
|
83 TInt CInterfaceImpl::RunError(TInt aError) |
|
84 { |
|
85 return aError; |
|
86 } |
|
87 |
|
88 // __________________________________________________________________________ |
|
89 // Exported proxy for instantiation method resolution |
|
90 // Define the interface UIDs |
|
91 const TImplementationProxy KImplTable[] = |
|
92 { |
|
93 //{{0x01aa500c}, CInterfaceImpl::NewL} |
|
94 IMPLEMENTATION_PROXY_ENTRY(0x01aa500c, CInterfaceImpl::NewL) |
|
95 }; |
|
96 |
|
97 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
98 { |
|
99 aTableCount = sizeof(KImplTable) / sizeof(TImplementationProxy); |
|
100 return KImplTable; |
|
101 } |
|
102 |
|
103 // End of File |