Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 09:51, 24 August 2007.

TSS000173 - How can I tell if a messaging module (MTM) is connected?

From Forum Nokia Wiki


Subject:

How can I tell if a messaging module (MTM) is connected? TSS000173

 

Platform(s): Device(s), SW version(s):
S60 1st Edition
S60 2nd Edition
N/A

Category:

Symbian C++

Subcategory:

Messaging

Description:

Overview
Examine via the messaging server to find out whether an MTM is used or not.
Normally client applications do not need to know whether an MTM module is connected to the server or not. The server automatically loads and unloads them when needed, and there is no direct function for inquiring such information. However, you can use the CClientMtmRegistry class to inquire if an MTM module is used or not. This would be the same as if an MTM is connected to the server or not.
Solution
First, open a client session with the message server:
CMsvSession* session = CMsvSession::OpenAsyncL(*this);
Then create an object of the CClientMtmRegistry class:
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
    }
    If the UID of an MTM is unknown, run the following loop to get it.
    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
Internal GPS yogesh.bhople General Symbian C++ 5 2008-07-15 16:25
custom MTM and standard SMS UI stefano_campri General Messaging 3 2008-04-21 08:22
[announce] appswitch for 3rd edition ! cyke64 Python 23 2008-08-08 19:02
phone number of SMS-sender AzuManga Symbian Networking & Messaging 3 2005-06-15 07:34
SendAs problems with custom Client MTM failing to load on S60 3rd Edition Gallery App nutter420 General Symbian C++ 1 2007-11-23 20:35
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZmessagingQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZTechnicalSolutionQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX