This page was last modified 03:59, 29 June 2007.
怎样才能知道某一种消息类型(MTM)
From Forum Nokia Wiki
- 开发伙伴平台:
60系列开发平台 1.0/2.0
- 概述
可以通过检查消息服务器来找到某一个MTM是否已綺连接。
通常情况下客户端应用程序不需要知道某一类型的MTM模块是否 已綺连接到了服务器程序。服务器程序会自动地装载或者卸载 需要的MTM模块,并且其实没有直接的函数可以查找相关的消息。 尽管如此,你仍然可以通过使用CClientMtmRegistry类来查找 MTM模块是否已綺被使用。这和查询某一个特定的MTM模块是否 已綺连接到了服务器效果是一样的。
- 解决方案
首先,连接到消息服务器,打开一个客户端进程:
CMsvSession* session = CMsvSession::OpenAsyncL(*this);
创建一个CClientMtmRegistry类的对象:
CClientMtmRegistry* mtmReg; mtmReg = CClientMtmRegistry::NewL(*session); /* list of known MTM Uid KUidMsgTypeSMS KUidMsgTypeMultimedia KUidMsgTypePOP3 KUidMsgTypeIMAP4 KUidMsgTypeSMTP */ if (mtmReg->IsPresent(KUidMsgTypePOP3)) { // POP3 MTM is present } if (mtmReg->IsInUse(KUidMsgTypePOP3)) { // POP3 MTM is in use }
如果某一个MTM的UID是未知的,可以用下面的裚环来获取。
TInt mtmCount = mtmReg->NumRegisteredMtmDlls(); for (TInt i=0; i<mtmCount; i++) { TUid mtmUid = mtmReg->MtmTypeUid(i); const CMtmDllInfo* mtmInfo; mtmInfo = &(iMtmReg->RegisteredMtmDllInfo(mtmUid)); TBuf8<256> info; info.Copy(mtmInfo->HumanReadableName()); }
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delivery report using RSendAs and RSendAsMessage | Giulio2000 | General Messaging | 3 | 2007-03-19 03:17 |
| Creating new mail mesg. using MTM in 9210 | Nokia_Archive | General Symbian C++ | 2 | 2007-09-20 11:24 |
| A few questions from beginner | DmitryD_9999 | General Symbian C++ | 0 | 2003-05-07 15:39 |
| Service when using SMTP MTM | nkraghunandan | General Symbian C++ | 0 | 2003-08-11 13:53 |
| Sending Fax with Nokia 7650 | synov | Symbian Tools & SDKs | 0 | 2002-11-05 03:25 |
