|
1 // Copyright (c) 2007-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 // Custom messages between BNEP and PAN |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef PANMESSAGES_H |
|
24 #define PANMESSAGES_H |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <comms-infras/ss_nodemessages.h> |
|
28 #include <comms-infras/eintsock.h> |
|
29 |
|
30 #include "panroles.h" |
|
31 #include "pancommon.h" |
|
32 |
|
33 const TInt KPanMessagesImplementationUid = 0x1028376D; |
|
34 |
|
35 |
|
36 // PAN Custom Message Signatures |
|
37 DECLARE_MESSAGE_SIG_1(SigInternalSocket, RInternalSocket*, Socket) |
|
38 DECLARE_MESSAGE_SIG_1(SigBool, TBool, Value) |
|
39 DECLARE_MESSAGE_SIG_1(SigSetupConnectionResponse, TBnepSetupConnectionResponseMessage, SetupResponse) |
|
40 DECLARE_MESSAGE_SIG_2(SigUuidUuid, TUUID, RequestedLocalRole, TUUID, RequestedRemoteRole) |
|
41 DECLARE_MESSAGE_SIG_2(SigPanRolePanRole, TBluetoothPanRole, RequestedLocalRole, TBluetoothPanRole, RequestedRemoteRole) |
|
42 |
|
43 /* |
|
44 @internalComponent |
|
45 */ |
|
46 NONSHARABLE_CLASS(TPanMessage) |
|
47 { |
|
48 private: |
|
49 enum |
|
50 { |
|
51 // 0 is always TCFNodeSignalBase::TMessageId::KCFNullMessageId |
|
52 ECreateChannelController = 1, |
|
53 ESetRetryConnect = 2, |
|
54 ERoleRequestFromRemoteDevice = 3, |
|
55 ERoleResponseFromRemoteDevice = 4, |
|
56 ERemoteDeviceDisconnect = 5, |
|
57 ERoleRequestFromLocalDevice = 6, |
|
58 ERoleResponseFromLocalDevice = 7, |
|
59 ECloseChannelController = 8, |
|
60 ESetUplinkAccessAllowedForBnepLink = 9, |
|
61 EChannelControllerCreated = 10, |
|
62 ESetRetryConnectComplete = 11, |
|
63 EChannelControllerClosed = 12 |
|
64 }; |
|
65 |
|
66 public: |
|
67 /** Register the messages with the comms-transport */ |
|
68 IMPORT_C static void RegisterL(); |
|
69 |
|
70 /** De-register the messages with the comms-transport */ |
|
71 IMPORT_C static void DeRegister(); |
|
72 |
|
73 public: |
|
74 enum { ERealmId = 0x1028376C }; // Same as DLL Uid |
|
75 |
|
76 /** |
|
77 Activities that help identify what a TLastMessageAck is actually |
|
78 ACKing. |
|
79 */ |
|
80 enum TPanActivity |
|
81 { |
|
82 EActivityNull = MeshMachine::KActivityNull, |
|
83 EActivityCreateChannelControllerForIncoming, // 1 |
|
84 EActivityCreateChannelControllerForOutgoing, // 2 |
|
85 }; |
|
86 |
|
87 // MBnepConnectionManager replacement messages |
|
88 typedef TMessageSigInternalSocket<ECreateChannelController, ERealmId> TCreateChannelController; |
|
89 typedef Messages::TMessageSigVoid<ESetRetryConnect, ERealmId> TSetRetryConnect; |
|
90 |
|
91 |
|
92 // MPanConnectionNotify replacement messages (Bnep -> Pan) |
|
93 typedef TMessageSigUuidUuid<ERoleRequestFromRemoteDevice, ERealmId> TRoleRequestFromRemoteDevice; |
|
94 typedef TMessageSigSetupConnectionResponse<ERoleResponseFromRemoteDevice, ERealmId> TRoleResponseFromRemoteDevice; |
|
95 typedef Messages::TMessageSigNumber<ERemoteDeviceDisconnect, ERealmId> TRemoteDeviceDisconnect; |
|
96 |
|
97 |
|
98 // MBnepChannelControl replacement messages (Pan -> Bnep) |
|
99 typedef TMessageSigPanRolePanRole<ERoleRequestFromLocalDevice, ERealmId> TRoleRequestFromLocalDevice; |
|
100 typedef TMessageSigSetupConnectionResponse<ERoleResponseFromLocalDevice, ERealmId> TRoleResponseFromLocalDevice; |
|
101 typedef Messages::TMessageSigVoid<ECloseChannelController, ERealmId> TCloseChannelController; |
|
102 typedef TMessageSigBool<ESetUplinkAccessAllowedForBnepLink, ERealmId> TSetUplinkAccessAllowedForBnepLink; |
|
103 |
|
104 // Messages not corresponding to legacy interfaces |
|
105 typedef Messages::TMessageSigNumber<EChannelControllerCreated, ERealmId> TChannelControllerCreated; |
|
106 typedef Messages::TMessageSigNumber<ESetRetryConnectComplete, ERealmId> TSetRetryConnectComplete; |
|
107 }; |
|
108 |
|
109 #endif |
|
110 // PANMESSAGES_H |