|
1 // Copyright (c) 2008-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 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef SYMBIAN_NODEMESSAGES_SERVICEPROVIDER_H |
|
23 #define SYMBIAN_NODEMESSAGES_SERVICEPROVIDER_H |
|
24 |
|
25 #include <comms-infras/ss_nodemessages.h> |
|
26 #include <elements/nm_messages_peer.h> |
|
27 #include <comms-infras/ss_nodemessages_peer.h> |
|
28 #include <comms-infras/ss_nodemessages_parameters.h> |
|
29 |
|
30 namespace ESock |
|
31 { |
|
32 class TCFServiceProvider : public ESock::TCFPeer |
|
33 { |
|
34 private: |
|
35 enum |
|
36 { |
|
37 ECFStart = 1, |
|
38 ECFStop = 2, |
|
39 ECFStarted = 3, |
|
40 ECFStopped = 4, |
|
41 ECFCommsBinderRequest = 5, |
|
42 ECFCommsBinderResponse = 6, |
|
43 }; |
|
44 protected: |
|
45 |
|
46 public: |
|
47 enum { ERealmId = 0x10285F4F }; //UID allocated on 4/6/08 from KUidNodeMessageRealms |
|
48 /*========================================================================== |
|
49 [Name]: TCommsBinderRequest |
|
50 [Semantics]: A request for a dataclient. Recipient has to respond with TCommsBinderResponse carrying |
|
51 one of its dataclients. |
|
52 |
|
53 [Type]: Request for TCommsBinderResponse. |
|
54 [Fallible]: Yes. |
|
55 |
|
56 [Structure]: |
|
57 param: iValue - the semantics of this parameter depends on the recipient's plane: |
|
58 CPR : - dataclient type, i.e.: EAttachToDefault/ECreateNew/EWaitForIncoming |
|
59 SCPR: - protocol Id - could be left blank when not needed |
|
60 MCPR: - attach flags (normal/monitor) 0 for start only |
|
61 iFamilyBundle - parameters to assist the finding/creation of dataclient |
|
62 ===========================================================================*/ |
|
63 typedef TMessageSigNumberDefaultFamilyBundleDefaultToNull<ECFCommsBinderRequest, TCFServiceProvider::ERealmId> TCommsBinderRequest; |
|
64 |
|
65 /*========================================================================== |
|
66 [Name]: TCommsBinderResponse |
|
67 [Semantics]: Sent to the control client as a response to TCommsBinderRequest and |
|
68 as a request for TBindToComplete |
|
69 |
|
70 [Type]: Request for TBindToComplete. |
|
71 Response to TCommsBinderRequest. |
|
72 [Fallible]: Yes. |
|
73 |
|
74 [Structure]: |
|
75 param: iNodeId - the requested binder |
|
76 ===========================================================================*/ |
|
77 |
|
78 typedef Messages::TMessageSigNodeId<ECFCommsBinderResponse, TCFServiceProvider::ERealmId> TCommsBinderResponse; |
|
79 |
|
80 /*========================================================================== |
|
81 [Name]: TStart |
|
82 [Semantics]: Request to start the stack. The recipient should start the stack below it |
|
83 and start its own layer. |
|
84 |
|
85 [Type]: Request for TStarted. |
|
86 [Fallible]: Yes. |
|
87 |
|
88 [Structure]: |
|
89 ===========================================================================*/ |
|
90 typedef Messages::TMessageSigVoid<ECFStart, TCFServiceProvider::ERealmId> TStart; |
|
91 typedef Messages::TMessageSigVoid<ECFStarted, TCFServiceProvider::ERealmId> TStarted; |
|
92 |
|
93 /*========================================================================== |
|
94 [Name]: TStop |
|
95 [Semantics]: Request to stop the stack. The recipient should stop its own layer |
|
96 and subsequently stop the stack below it. |
|
97 |
|
98 [Type]: Request for TStopped. |
|
99 [Fallible]: No. |
|
100 |
|
101 [Structure]: |
|
102 param: iValue - stop code (reason). |
|
103 ===========================================================================*/ |
|
104 typedef Messages::TMessageSigNumber<ECFStop, TCFServiceProvider::ERealmId> TStop; |
|
105 typedef Messages::TMessageSigNumber<ECFStopped, TCFServiceProvider::ERealmId> TStopped; |
|
106 }; |
|
107 |
|
108 class TCFControlClient : public TCFPeer |
|
109 { |
|
110 private: |
|
111 enum |
|
112 { |
|
113 ECFGoneDown = 1, |
|
114 ECFGoneUp = 2 |
|
115 }; |
|
116 |
|
117 public: |
|
118 enum { ERealmId = 0x10285F3F }; //UID allocated on 4/6/08 from KUidNodeMessageRealms |
|
119 |
|
120 /*========================================================================== |
|
121 [Name]: TGoneDown |
|
122 [Semantics]: Notification about the stack below gone down. This is an equivallent of |
|
123 of an unsolicited TStopped (i.e.: the stack below is notionally stopped). |
|
124 |
|
125 [Type]: Notification |
|
126 |
|
127 [Structure]: |
|
128 param iValue1 - reason for going down. |
|
129 iValue2 - Access Point id as provisioned with CAccessPointConfig::ProviderInfo()::APId() |
|
130 ===========================================================================*/ |
|
131 typedef Messages::TMessageSigNumberDefaultNumberDefault<ECFGoneDown, TCFControlClient::ERealmId> TGoneDown; |
|
132 /*========================================================================== |
|
133 [Name]: TGoneUp |
|
134 [Semantics]: Notification about the stack below gone up. This is an equivallent of |
|
135 of an unsolicited TStarted (i.e.: the stack below is notionally started). |
|
136 |
|
137 [Type]: Notification |
|
138 |
|
139 [Structure]: |
|
140 param None |
|
141 ===========================================================================*/ |
|
142 typedef Messages::TMessageSigVoid<ECFGoneUp, TCFControlClient::ERealmId> TGoneUp; |
|
143 }; |
|
144 |
|
145 } //namespace ESock |
|
146 |
|
147 #endif |
|
148 //SYMBIAN_NODEMESSAGES_SERVICEPROVIDER_H |
|
149 |