⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transportinterface.cpp

📁 Symbian OS C++ for Mobile Phones Volume 3 源码
💻 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 + -