?? transportinterface.cpp
字號:
// Copyright (c) 2004 - 2007, Symbian Software Ltd. All rights reserved.
#include <transportinterface.h>
EXPORT_C CTransportInterface* CTransportInterface::NewL(
TUid aTransportUid, MTransportObserver& aObserver, const TDesC& aAddress, TBool aInitListen)
/**
This factory function allocates uses ECOM to allocate the required transport.
@param aTransportUid Which ECOM implementation should be used to allocate the
transport.
@param aObserver Observer to notify when a payload is sent or received.
@param aAddress Remote device's address. The format depends on the transport
type. For example, it could be a telephone number for SMS
or an email address for email.
@param aInitListen If true, this object should start by listening
for an incoming payload. Otherwise, it should
wait for its owner to send a payload to the remote
device.
@return Transport that sends messages to a remote
device. This is owned by the caller.
*/
{
TTransportInterfaceCreateInfo tci = {aObserver, &aAddress, aInitListen};
TAny* self = REComSession::CreateImplementationL(
aTransportUid, _FOFF(CTransportInterface, iDtor_ID_Key), &tci);
return reinterpret_cast<CTransportInterface*>(self);
}
EXPORT_C CTransportInterface::CTransportInterface()
/**
This constructor is defined to initialize the CActive superclass.
It additionally adds this object to the active scheduler.
*/
: CActive(CActive::EPriorityStandard)
{
CActiveScheduler::Add(this);
}
EXPORT_C CTransportInterface::~CTransportInterface()
/**
This destructor handles ECOM cleanup. The application
must still call RComSession::FinalClose before it terminates.
*/
{
REComSession::DestroyedImplementation(iDtor_ID_Key);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -