williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __BTCMTM_H__ williamr@2: #define __BTCMTM_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: williamr@2: /* This defines the maximum length that the connection password can be for BlueTooth. The PDU used for this williamr@2: has a payload of 16 bytes. williamr@2: */ williamr@2: #define KBlueToothObexPasswordLength 16 williamr@2: const TInt KBlueToothObexDeviceAddressLength = 6; // 6 byte device address williamr@2: williamr@2: extern const TUint8 KObexConnectionIDHeader; williamr@2: williamr@2: class CBtClientMtm : public CObexClientMtm williamr@2: /** williamr@2: Bluetooth Client MTM. williamr@2: williamr@2: Provides client-side functionality for bluetooth messaging. This is a thin implementation over the top of williamr@2: CObexClientMtm. williamr@2: williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Canonical NewL factory function. williamr@2: * williamr@2: * @param aRegisteredMtmDll Reference to registration data for MTM DLL. williamr@2: * @param aMsvSession Reference to CMsvSession of the client requesting the object. williamr@2: * @return Pointer to a new, constructed CBtClientMtm williamr@2: * @leave Leaves if no memory is available. williamr@2: */ williamr@2: IMPORT_C static CBtClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); williamr@2: williamr@2: /// Contains the timeout values for connect and put operations williamr@2: struct STimeouts williamr@2: { williamr@2: TInt iConnectTimeout; ///< Connection attempt timeout in microseconds williamr@2: TInt iPutTimeout; ///< Put attempt timeout in microseconds williamr@2: }; williamr@2: williamr@2: /// Structure for parameter needed for sending via Bluetooth williamr@2: struct SBtcCmdSendParams williamr@2: { williamr@2: STimeouts iTimeouts; ///< Structure containing connect and put operation timeouts williamr@2: TInt iRemoteObexPort; ///< The value of the remote obex port williamr@2: TDesC* iConnectPassword; /// iConnectPassword; ///