?? btcommtransport.cpp
字號:
// Copyright (c) 2004 - 2007, Symbian Software Ltd. All rights reserved.
#include "btcommtransport.h"
CBtCommTransport* CBtCommTransport::NewL(TAny* aTransportCreateInfo)
/**
Factory function opens a comm port on BTCOMM::0.
@param aTransportCreateInfo Pointer to an instance of
TTransportCreateInfo, which contains the
data required to allocate the transport.
The address field is not used.
@return New, initialized COMM connection.
*/
{
_LIT(KBtCommCsyName, "BTCOMM");
_LIT(KBtCommPortName, "BTCOMM::0");
const TTransportInterfaceCreateInfo& tci =
*reinterpret_cast<TTransportInterfaceCreateInfo*>(aTransportCreateInfo);
CBtCommTransport* self = new(ELeave) CBtCommTransport(tci.iObserver);
CleanupStack::PushL(self);
self->ConstructL(KBtCommCsyName, KBtCommPortName, tci.iInitListen);
CleanupStack::Pop(self);
return self;
}
CBtCommTransport::CBtCommTransport(MTransportObserver& aObserver)
/**
This c'tor is defined to pass the supplied observer to the superclass.
@param aObserver Observer to notify about transport events.
This is managed by the CTransport superclass.
*/
: CRs232Transport(aObserver)
{
// empty.
}
CBtCommTransport::~CBtCommTransport()
/**
This d'tor is defined here to ensure that only one
instance is generated.
*/
{
// resources are freed in the CRs232Transport d'tor.
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -