|
1 // Copyright (c) 2005-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 |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef SS_MCPRNODEMESSAGES_H_INCLUDED |
|
22 #define SS_MCPRNODEMESSAGES_H_INCLUDED |
|
23 |
|
24 #include <comms-infras/ss_nodemessages.h> |
|
25 #include <connpref.h> |
|
26 #include <comms-infras/metadata.h> |
|
27 #include <comms-infras/ss_nodemessages_selector.h> |
|
28 |
|
29 namespace ESock |
|
30 { |
|
31 |
|
32 // |
|
33 /** TDeferredSelectionPrefsExt |
|
34 |
|
35 @internalTechnology |
|
36 */ |
|
37 class TDeferredSelectionPrefsExt : public Meta::SMetaData |
|
38 { |
|
39 public: |
|
40 enum {EUid = 0x10272C79, ETypeId = 3}; |
|
41 |
|
42 public: |
|
43 IMPORT_C explicit TDeferredSelectionPrefsExt(TUid aTierId, const TConnPref& aPrefs); |
|
44 |
|
45 EXPORT_DATA_VTABLE_AND_FN |
|
46 |
|
47 TConnPref iPrefs; |
|
48 TUid iTierId; |
|
49 }; |
|
50 |
|
51 // |
|
52 //TPromptingSelectionPrefsExt - this is only a workaround to handle the prompting |
|
53 //AccessPoints on the IPProto level during re-selection |
|
54 class TPromptingSelectionPrefsExt : public Meta::SMetaData |
|
55 /** |
|
56 @internalTechnology |
|
57 @prototype |
|
58 */ |
|
59 { |
|
60 public: |
|
61 enum {EUid = 0x10272C79, ETypeId = 4}; |
|
62 |
|
63 public: |
|
64 IMPORT_C explicit TPromptingSelectionPrefsExt(TUid aTierId, const TConnPref& aPrefs); |
|
65 |
|
66 EXPORT_DATA_VTABLE_AND_FN |
|
67 |
|
68 TConnPref iPrefs; |
|
69 TUid iTierId; |
|
70 |
|
71 // This bool supports detection of whether or not prompting is in progress |
|
72 // It replaces the usage of the existence or non-existence of the extension in |
|
73 // the container to determine the equivalent meaning. This is required since |
|
74 // it is no longer permisable to arbitrarily remove extensions |
|
75 TBool iPromptingInProgress; |
|
76 }; |
|
77 |
|
78 |
|
79 /**Safe CF Message carriers (east-west) |
|
80 Deriving from Messages::TSignatureBase so that we have all of the error handling for free |
|
81 TSafeMessageCarrierBase assumes the message id, the activity id and the sender from the message it carries. |
|
82 |
|
83 @internalAll |
|
84 */ |
|
85 class TSafeMessageCarrierBase : public Messages::TSignatureBase |
|
86 { |
|
87 protected: |
|
88 static const TInt KMaxCarrierSize = 48; //Max size of a TSafeMessageCarrier, less the iMessageBuf size |
|
89 static const TInt KMaxCarriedMessageSize = 100; //Min(CommsFW::KMaxInlineMessageSize, Messages::TSignalBase::KMaxInlineMessageSize) - KMaxCarrierSize; |
|
90 |
|
91 protected: //Not meant to be used directly by design! |
|
92 explicit TSafeMessageCarrierBase() {} |
|
93 explicit TSafeMessageCarrierBase(const Messages::TSignatureBase& aMessage); |
|
94 |
|
95 EXPORT_DATA_VTABLE_AND_FN |
|
96 |
|
97 protected: |
|
98 void DispatchCarriedMessageL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aNodeId); |
|
99 IMPORT_C virtual void Error(const Messages::TRuntimeCtxId& aSender, const Messages::TRuntimeCtxId& aRecipient, TInt aError); |
|
100 |
|
101 private: |
|
102 TBuf8<KMaxCarriedMessageSize> iMessageBuf; |
|
103 Messages::TSignatureBase* iMessage; //Local reference only, not stored, not sent, used on the receving end |
|
104 }; |
|
105 |
|
106 /**Safe CF Message carriers (east-west) |
|
107 |
|
108 @internalAll |
|
109 */ |
|
110 class TSafeRequestCarrierEast : public TSafeMessageCarrierBase |
|
111 { |
|
112 public: |
|
113 DECLARE_MVIP_CTR(TSafeRequestCarrierEast) |
|
114 |
|
115 protected: //Not meant to be used directly by design! |
|
116 explicit TSafeRequestCarrierEast() {} //Not meant to be used directly by design! |
|
117 IMPORT_C explicit TSafeRequestCarrierEast(const Messages::TSignatureBase& aMessage); //Not meant to be used directly by design! |
|
118 |
|
119 EXPORT_DATA_VTABLE_AND_FN |
|
120 |
|
121 protected: |
|
122 IMPORT_C virtual void DispatchL(const Messages::TRuntimeCtxId& aSender, const Messages::TRuntimeCtxId& aRecipient); |
|
123 }; |
|
124 |
|
125 /**Safe CF Message carriers (east-west) |
|
126 |
|
127 @internalAll |
|
128 */ |
|
129 class TSafeResponseCarrierWest : public TSafeMessageCarrierBase |
|
130 { |
|
131 public: |
|
132 DECLARE_MVIP_CTR(TSafeResponseCarrierWest) |
|
133 |
|
134 protected: //Not meant to be used directly by design! |
|
135 explicit TSafeResponseCarrierWest() {} //Not meant to be used directly by design! |
|
136 IMPORT_C explicit TSafeResponseCarrierWest(const Messages::TSignatureBase& aMessage, const Messages::TRuntimeCtxId& aRecipient); //Not meant to be used directly by design! |
|
137 |
|
138 EXPORT_DATA_VTABLE_AND_FN |
|
139 |
|
140 protected: |
|
141 IMPORT_C virtual void DispatchL(const Messages::TRuntimeCtxId& aSender, const Messages::TRuntimeCtxId& aRecipient); |
|
142 |
|
143 private: |
|
144 Messages::TNodeId iRecipient; |
|
145 }; |
|
146 |
|
147 /** |
|
148 |
|
149 @internalAll |
|
150 */ |
|
151 class TCFSafeMessage |
|
152 { |
|
153 public: |
|
154 static void RegisterL(); |
|
155 static void DeRegister(); |
|
156 |
|
157 //Safe CF Message carriers (east-west) |
|
158 template <class TMESSAGE> |
|
159 class TRequestCarrierEast : public TSafeRequestCarrierEast |
|
160 { |
|
161 public: |
|
162 explicit TRequestCarrierEast(const TMESSAGE& aMessage) |
|
163 : TSafeRequestCarrierEast(aMessage) |
|
164 { |
|
165 __ASSERT_COMPILE(KMaxCarriedMessageSize>=(sizeof(TMESSAGE)+TSignalBase::KMaxUnstoredOverhead)); //External representation should not be greater |
|
166 } |
|
167 }; |
|
168 |
|
169 //Safe CF Message carriers (east-west) |
|
170 template <class TMESSAGE> |
|
171 class TResponseCarrierWest : public TSafeResponseCarrierWest |
|
172 { |
|
173 public: |
|
174 explicit TResponseCarrierWest(const TMESSAGE& aMessage, const Messages::TRuntimeCtxId& aRecipient) |
|
175 : TSafeResponseCarrierWest(aMessage, aRecipient) |
|
176 { |
|
177 __ASSERT_COMPILE(KMaxCarriedMessageSize>=(sizeof(TMESSAGE)+TSignalBase::KMaxUnstoredOverhead)); //External representation should not be greater |
|
178 } |
|
179 }; |
|
180 }; |
|
181 |
|
182 |
|
183 } //namespace ESock |
|
184 |
|
185 #endif //SS_MCPRNODEMESSAGES_H_INCLUDED |
|
186 |