Message Type Modules (MTMs) are polymorphic DLL plug-ins that implement the interfaces defined by the Message Server framework to handle various message types—such as, IMAP4, POP3, SMTP, SMS and MMS.
Client applications can access different types of message and every message type must handled in a specific way. To support a new message type within the client applications, MTMs to implement that type must be provided. The following points are specific to each message type, and so must be implemented in an MTM:
User interface requirements
Error handling mechanism
MTM DLL information
A Message Server abstraction that is used to locate and load particular MTM components.
The MTM architecture is the plug-in scheme provided by the Messaging Framework to integrate different message transports to the Message Server. The plug-in scheme consists of four interfaces, the UI MTM, UI Data MTM, Client MTM and Server MTM.
Client MTM manages the message type’s data model, providing the UI MTM and client applications with interfaces to access and to search for messages.
User Interface (UI) Data MTM provides icons, menu text and a list of capabilities for a message type.
User Interface (UI) MTM implements the user interface required for the message type, including a viewer, editor and dialog settings.
Server MTM provides message transport over the network and manages a queue of outstanding client requests, and ensures that more than one message of a given type is sent simultaneously.
Each of the MTM DLLs is a polymorphic DLL that exports an instance of a system-defined base class. The Message Server and client applications use these base class interfaces to access MTM functionality in a generic and extensible way. The MTM in turn implements a specialized version of the class to provide specific message type functionality.
Client applications can load and use the UI MTM, UI Data MTM and Client MTM DLLs. The DLLs are loaded within the client’s process space. The Server MTM DLLs are loaded within the Message Server process. The Messaging Middleware architecture allows clients to access the combined functionality of the Message Server and the Server MTMs through a single server interface. The following figure shows the MTM architecture.
The following figure shows the relationship between the Message Server and MTMs. The grey classes are realisations of the MTM interfaces defined by the Messaging Framework. The Message Server depends on the Server MTM interface and controls access to message data and delegates protocol-specific requests to Server side MTMs. Messaging clients depend on the Client, UI and UI Data MTM interfaces and the Message Server client API.
Messaging Middleware provides the following base classes, which defines the component interfaces for MTM implementations.
The base class for UI MTMs is CBaseMtmUi .
The base class for UI Data MTMs is CBaseMtmUiData .
The base class for Client MTMs is CBaseMtm .
The base class for Server MTMs is CBaseServerMtm .
Important: MTMs can also provide message type-specific functionality that is not defined by the base class interfaces. For example, for IMAP4, perform a full synchronization with a remote service; for POP3, connect to a remote server and download messages. The APIs for the client interfaces are extensible through run time type information provided by the QueryCapability API, and the InvokeAsyncFunction and InvokeSyncFunction APIs.
For information on how to implement the base classes, see the Implementing MTMs .
The MTM DLLs provide the following functions. MTMs implement them according to the requirements for the message type:
Allow the client applications to query the supported functionality for the message type. For example, the maximum message size or whether attachments are supported.
Message management functionality
Allow the client applications to manage the messages, for example, to send, reply and forward messages.
Attachment management functionality
Allow the client applications to handle attachments. For example, to add, remove or create an attachment for a particular message.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.