|
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 subconevents.cpp |
|
18 */ |
|
19 |
|
20 #include <e32std.h> |
|
21 #include <e32test.h> |
|
22 #include <ecom/ecom.h> |
|
23 #include <ecom/implementationproxy.h> |
|
24 #include <cs_subconevents.h> |
|
25 |
|
26 #include "cs_subconeventsfactory.h" |
|
27 |
|
28 // private event |
|
29 const TUint32 KSubConGenericEventDataClientBase = 0x3; |
|
30 |
|
31 START_ATTRIBUTE_TABLE( CSubConGenEventParamsGranted, KSubConnGenericEventsImplUid, KSubConGenericEventParamsGranted ) |
|
32 REGISTER_ATTRIBUTE( CSubConGenEventParamsGranted, iFamily, TMetaNumber) |
|
33 REGISTER_ATTRIBUTE( CSubConGenEventParamsGranted, iGenericSet, TMetaPtr<CSubConGenericParameterSet>) |
|
34 REGISTER_ATTRIBUTE( CSubConGenEventParamsGranted, iExtensionSets, TMetaObject<RMetaDataEComContainer>) |
|
35 END_ATTRIBUTE_TABLE() |
|
36 |
|
37 START_ATTRIBUTE_TABLE( CSubConGenEventParamsChanged, KSubConnGenericEventsImplUid, KSubConGenericEventParamsChanged ) |
|
38 REGISTER_ATTRIBUTE( CSubConGenEventParamsChanged, iError, TMetaNumber) |
|
39 END_ATTRIBUTE_TABLE_BASE(CSubConGenEventParamsGranted, 0) |
|
40 |
|
41 START_ATTRIBUTE_TABLE( CSubConGenEventParamsRejected, KSubConnGenericEventsImplUid, KSubConGenericEventParamsRejected ) |
|
42 REGISTER_ATTRIBUTE( CSubConGenEventParamsRejected, iError, TMetaNumber) |
|
43 REGISTER_ATTRIBUTE ( CSubConGenEventParamsRejected, iFamilyId, TMetaNumber) |
|
44 END_ATTRIBUTE_TABLE() |
|
45 |
|
46 START_ATTRIBUTE_TABLE( CSubConGenEventDataClientBase, KSubConnGenericEventsImplUid, KSubConGenericEventDataClientBase) |
|
47 REGISTER_ATTRIBUTE( CSubConGenEventDataClientBase, iIap, TMetaNumber) |
|
48 REGISTER_ATTRIBUTE( CSubConGenEventDataClientBase, iSourceAddress, TMeta<TSockAddr>) |
|
49 REGISTER_ATTRIBUTE( CSubConGenEventDataClientBase, iDestAddress, TMeta<TSockAddr>) |
|
50 END_ATTRIBUTE_TABLE() |
|
51 |
|
52 START_ATTRIBUTE_TABLE( CSubConGenEventDataClientJoined, KSubConnGenericEventsImplUid, KSubConGenericEventDataClientJoined) |
|
53 END_ATTRIBUTE_TABLE_BASE(CSubConGenEventDataClientBase, 0) |
|
54 |
|
55 START_ATTRIBUTE_TABLE( CSubConGenEventDataClientLeft, KSubConnGenericEventsImplUid, KSubConGenericEventDataClientLeft) |
|
56 END_ATTRIBUTE_TABLE_BASE(CSubConGenEventDataClientBase, 0) |
|
57 |
|
58 START_ATTRIBUTE_TABLE( CSubConGenEventSubConDown, KSubConnGenericEventsImplUid, KSubConGenericEventSubConDown) |
|
59 REGISTER_ATTRIBUTE( CSubConGenEventSubConDown, iError, TMetaNumber) |
|
60 END_ATTRIBUTE_TABLE() |
|
61 |
|
62 /** |
|
63 Plugin Implementation |
|
64 */ |
|
65 CSubConNotificationEvent* CSubConGenEventsFactory::NewL(TAny* aConstructionParameters) |
|
66 { |
|
67 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
68 switch (type) |
|
69 { |
|
70 case (KSubConGenericEventParamsGranted): |
|
71 return new (ELeave) CSubConGenEventParamsGranted; |
|
72 case (KSubConGenericEventDataClientJoined): |
|
73 return new (ELeave) CSubConGenEventDataClientJoined; |
|
74 case (KSubConGenericEventDataClientLeft): |
|
75 return new (ELeave) CSubConGenEventDataClientLeft; |
|
76 case (KSubConGenericEventSubConDown): |
|
77 return new (ELeave) CSubConGenEventSubConDown; |
|
78 case (KSubConGenericEventParamsChanged): |
|
79 return new (ELeave) CSubConGenEventParamsChanged; |
|
80 case (KSubConGenericEventParamsRejected): |
|
81 return new (ELeave) CSubConGenEventParamsRejected; |
|
82 default: |
|
83 User::Leave(KErrNotFound); |
|
84 } |
|
85 return NULL; |
|
86 } |
|
87 |
|
88 CSubConGenEventParamsGranted::~CSubConGenEventParamsGranted() |
|
89 /** (virtual) sub-connection parameter granted event destructor |
|
90 */ |
|
91 { |
|
92 delete iGenericSet; |
|
93 iExtensionSets.ResetAndDestroy(); |
|
94 } |
|
95 |
|
96 CSubConGenEventParamsChanged::~CSubConGenEventParamsChanged() |
|
97 /** Empty (virtual) sub-connection parameter changed event destructor |
|
98 */ |
|
99 { |
|
100 } |
|
101 |
|
102 CSubConGenEventParamsRejected::~CSubConGenEventParamsRejected() |
|
103 /** Empty (virtual) sub-connection parameter rejected event destructor |
|
104 */ |
|
105 { |
|
106 } |
|
107 |
|
108 CSubConGenEventDataClientBase::~CSubConGenEventDataClientBase() |
|
109 /** Empty (virtual) sub-connection data client base destructor |
|
110 */ |
|
111 { |
|
112 } |
|
113 |
|
114 CSubConGenEventDataClientJoined::~CSubConGenEventDataClientJoined() |
|
115 /** Empty (virtual) sub-connection data client joined event destructor |
|
116 */ |
|
117 { |
|
118 } |
|
119 |
|
120 CSubConGenEventDataClientLeft::~CSubConGenEventDataClientLeft() |
|
121 /** Empty (virtual) sub-connection data client left event destructor |
|
122 */ |
|
123 { |
|
124 } |
|
125 |
|
126 CSubConGenEventSubConDown::~CSubConGenEventSubConDown() |
|
127 /** Empty (virtual) sub-connection down event destructor |
|
128 */ |
|
129 { |
|
130 } |
|
131 |
|
132 |