diff -r 000000000000 -r 29b1cd4cb562 bluetoothcommsprofiles/btpan/panmessages/inc/panmessages.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetoothcommsprofiles/btpan/panmessages/inc/panmessages.h Fri Jan 15 08:13:17 2010 +0200 @@ -0,0 +1,110 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Custom messages between BNEP and PAN +// +// + +/** + @file + @internalComponent +*/ + +#ifndef PANMESSAGES_H +#define PANMESSAGES_H + +#include +#include +#include + +#include "panroles.h" +#include "pancommon.h" + +const TInt KPanMessagesImplementationUid = 0x1028376D; + + +// PAN Custom Message Signatures +DECLARE_MESSAGE_SIG_1(SigInternalSocket, RInternalSocket*, Socket) +DECLARE_MESSAGE_SIG_1(SigBool, TBool, Value) +DECLARE_MESSAGE_SIG_1(SigSetupConnectionResponse, TBnepSetupConnectionResponseMessage, SetupResponse) +DECLARE_MESSAGE_SIG_2(SigUuidUuid, TUUID, RequestedLocalRole, TUUID, RequestedRemoteRole) +DECLARE_MESSAGE_SIG_2(SigPanRolePanRole, TBluetoothPanRole, RequestedLocalRole, TBluetoothPanRole, RequestedRemoteRole) + +/* +@internalComponent +*/ +NONSHARABLE_CLASS(TPanMessage) + { +private: + enum + { + // 0 is always TCFNodeSignalBase::TMessageId::KCFNullMessageId + ECreateChannelController = 1, + ESetRetryConnect = 2, + ERoleRequestFromRemoteDevice = 3, + ERoleResponseFromRemoteDevice = 4, + ERemoteDeviceDisconnect = 5, + ERoleRequestFromLocalDevice = 6, + ERoleResponseFromLocalDevice = 7, + ECloseChannelController = 8, + ESetUplinkAccessAllowedForBnepLink = 9, + EChannelControllerCreated = 10, + ESetRetryConnectComplete = 11, + EChannelControllerClosed = 12 + }; + +public: + /** Register the messages with the comms-transport */ + IMPORT_C static void RegisterL(); + + /** De-register the messages with the comms-transport */ + IMPORT_C static void DeRegister(); + +public: + enum { ERealmId = 0x1028376C }; // Same as DLL Uid + + /** + Activities that help identify what a TLastMessageAck is actually + ACKing. + */ + enum TPanActivity + { + EActivityNull = MeshMachine::KActivityNull, + EActivityCreateChannelControllerForIncoming, // 1 + EActivityCreateChannelControllerForOutgoing, // 2 + }; + + // MBnepConnectionManager replacement messages + typedef TMessageSigInternalSocket TCreateChannelController; + typedef Messages::TMessageSigVoid TSetRetryConnect; + + + // MPanConnectionNotify replacement messages (Bnep -> Pan) + typedef TMessageSigUuidUuid TRoleRequestFromRemoteDevice; + typedef TMessageSigSetupConnectionResponse TRoleResponseFromRemoteDevice; + typedef Messages::TMessageSigNumber TRemoteDeviceDisconnect; + + + // MBnepChannelControl replacement messages (Pan -> Bnep) + typedef TMessageSigPanRolePanRole TRoleRequestFromLocalDevice; + typedef TMessageSigSetupConnectionResponse TRoleResponseFromLocalDevice; + typedef Messages::TMessageSigVoid TCloseChannelController; + typedef TMessageSigBool TSetUplinkAccessAllowedForBnepLink; + + // Messages not corresponding to legacy interfaces + typedef Messages::TMessageSigNumber TChannelControllerCreated; + typedef Messages::TMessageSigNumber TSetRetryConnectComplete; + }; + +#endif +// PANMESSAGES_H