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

📄 mmstransport.h

📁 Symbian OS C++ for Mobile Phones Volume 3 源码
💻 H
字号:
// Copyright (c) 2004 - 2007, Symbian Software Ltd. All rights reserved.

/**
	Sends multimedia messages using the MTM directly.
 */

#ifndef MMSTRANSPORT_H
#define MMSTRANSPORT_H

#include <bautils.h>
#include <msvapi.h>
#include <mtclreg.h>
#include <mmsclient.h>
#include <cmsvmimeheaders.h>

#include "mmsutils.h"
#include "messagetransport.h"


class CMmsTransport : public CMessageTransport
/**
	Sends multimedia messages to a remote device using the
	MMS MTM so can set the root SMIL document, and so control
	the message's presentation.
 */
	{
public:
	static CMmsTransport* NewL(TAny* aTransportCreateInfo);
	virtual ~CMmsTransport();
	
private:
	static CMmsTransport* New2L(MTransportObserver& aObserver, const TDesC& aAddress, TBool aInitListen);
	CMmsTransport(MTransportObserver& aObserver);
	void ConstructL(const TDesC& aAddress, TBool aInitListen);
	void DestroySendOperation();
	
	// override CMessageTransport
	virtual void DoCancel();
	// override CTransport
	virtual void RunL();
	
	// implement CMessageTransport
	virtual void BuildAndSendMessageL(const TDesC& aPayloadText);
	virtual TBool ShouldUseReceivedMtmUid(TUid aMtmUid) const;
	virtual HBufC* ExtractPlainTextLC(CMsvStore& aStore) const;
	
	void AddTextAttachmentL(CMsvStore& aStore, const TDesC& aText, const TDesC& aContentLocation);
	TMsvAttachmentId AddFileAttachmentL(CMsvStore& aStore, const TDesC& aNameAndExt, const TDesC8& aMimeType);
	TMsvAttachmentId AddFileAttachmentL(
		CMsvStore& aStore, RFile& aFile, const TDesC& aContentLocation, const TDesC8& aMimeType);
	
private:
	/** File server session, used for managing attachments. */
	RFs iFs;
	/** The MTM registry is used to obtain an instance of the MMS MTM. */
	CClientMtmRegistry* iClientMtmRegistry;
	/** The Client MTM, used to construct and send the message. */
	CMmsClientMtm* iMmsClientMtm;
	/** This object manages the asynchronous sending operation. */
	CMsvOperation* iSendOperation;
	};

#endif	// #ifndef MMSTRANSPORT_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -