Symbian3/SDK/Source/GUID-92D6CC11-C597-5D00-AAE5-866289B7462F.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 15:24:34 +0100
changeset 9 59758314f811
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-92D6CC11-C597-5D00-AAE5-866289B7462F"><title>MTM Resource File</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This section explains the MTM resource file format that is used for installing MTMs. </p> <section><title>Description</title> <p>You have to create and deliver an MTM resource file to register the MTM with the Message Server. The Message Server searches the ROM drive for MTM resource file on start-up and it automatically registers any MTMs found. </p> <p>MTMs are represented by four DLLs on the device, which are placed in a specific directory. The system finds installed MTMs by scanning the <filepath>\resource\messaging\mtm</filepath> directory on all drives for resource files containing a resource of type <xref href="GUID-50D650D3-8B2B-3FED-B09C-087971EEE7C9.dita"><apiname>MTM_INFO_FILE</apiname></xref>. </p> <p> <b>Important:</b> This compiled resource file must define the MTM's properties using the resource structures <xref href="GUID-50D650D3-8B2B-3FED-B09C-087971EEE7C9.dita"><apiname>MTM_INFO_FILE</apiname></xref>, <xref href="GUID-7D5C9320-17AB-381E-8369-1804EB143199.dita"><apiname>MTM_CAPABILITIES</apiname></xref> and <xref href="GUID-C4058AFE-56A4-3B43-B80C-8D03D15A0C2D.dita"><apiname>MTM_SECURITY_CAPABILITY_SET</apiname></xref>. </p> <p>The <xref href="GUID-50D650D3-8B2B-3FED-B09C-087971EEE7C9.dita"><apiname>MTM_INFO_FILE</apiname></xref> resource must define a MTM_COMPONENT_V2 resource for each MTM DLL for the Messaging protocol. This structure is as follows: </p> <ul><li id="GUID-FE61DA3D-BBCB-500C-9B4C-4EE6DFC964E8"><p>The second UID of DLL—indicates the message type or the protocol, such as SMTP, POP3, IMAP4, SMS that the MTM considers. </p> </li> <li id="GUID-4C9E649E-AAD1-5B9B-BEB5-4F2B738302CC"><p>The third UID of DLL—indicates the message type or the protocol (SMTP, POP3, IMAP4, SMS) that the MTM considers. </p> <p> <b>Note:</b> In practice, the MTM type UID may be different for each MTM. The technology type UID may be the same for an attached group of MTMs, such as the POP and SMTP MTMs, which are separate but work together. </p> </li> <li id="GUID-18AA66D4-44E7-51A4-8719-09EB25770D8C"><p>Ordinal number—indicates where the MTM component’s factory function can be found in the registered DLL. </p> </li> <li id="GUID-97AD0551-C80F-5446-AB10-14DF4E8A7A40"><p>Human-readable name—used to show to the user the available message types when the user has requested a Send As or a similar operation. </p> <p> <b>Note:</b> MTM UIDs are used to identify MTMs to the registry, but it is recommended to have meaningful (human-readable) names. </p> </li> <li id="GUID-2DA2E510-F9C9-52A4-9968-98FAEB825CFA"><p> <xref href="GUID-D82DEC7A-71C2-3004-BFC2-C82C009A2715.dita"><apiname>TVersion</apiname></xref> structure—version information, to allow updating of the MTMs by an installation program. </p> </li> </ul> <p> <b>Note:</b> The Message Server's <xref href="GUID-F8FB7A3E-9F7E-399A-AB40-C2E0D6777025.dita"><apiname>CMtmDllInfo</apiname></xref> class encapsulates the registration data for an MTM and the run-time data held for a registered MTM is represented by the <xref href="GUID-0D5D7FAC-4F14-3046-92FB-873B8350FF4C.dita"><apiname>CRegisteredMtmDll</apiname></xref> class. </p> <p> <b>Important:</b> The resource file must have the Server MTM DLL and Client MTM DLL information to handle various message manipulation functions in the server. </p> </section> <section><title>Example</title> <p>The following code snippet shows the details of an MTM resource file. </p> <codeblock id="GUID-6A043853-66EC-563E-9AE1-F0A96F32A254" xml:space="preserve">// txtdat.RSS
//
// Copyright (c) 2008 Symbian Ltd.  All rights reserved.
//

#include &lt;mtmconfig.rh&gt;

RESOURCE MTM_INFO_FILE
    {
    mtm_type_uid = 0x100012FA;
    technology_type_uid = 0x10001626;
    components = 
        {
        MTM_COMPONENT_V2
            {
            human_readable_name = "My server dll info";
            component_uid = KUidMtmServerComponentVal;
            entry_point = 1;
            version = VERSION_V2 {};
            filename = "z:\\system\\libs\\servermtm.dll";
            },
        MTM_COMPONENT_V2
            {
            human_readable_name = "My client dll info";
            component_uid = KUidMtmClientComponentVal;
            entry_point = 1;
            version = VERSION_V2 {};
            filename = "z:\\system\\libs\\clientmtm.dll";
            },
        MTM_COMPONENT_V2
            {
            human_readable_name = "My ui dll info";
            component_uid = KUidMtmUiComponentVal;
            entry_point = 1;
            version = VERSION_V2 {};
            filename = "z:\\system\\libs\\dummyuimtm.dll"; // this does not exist
            },
        MTM_COMPONENT_V2
            {
            human_readable_name = "My ui data dll info";
            component_uid = KUidMtmUiDataComponentVal;
            entry_point = 1;
            version = VERSION_V2 {};
            filename = "z:\\system\\libs\\dummyuidatamtm.dll"; // this does not exist
            }
        };
    }
// flags to indicate that can send messages, and handle body text
RESOURCE MTM_CAPABILITIES
    {
    send_capability = 1;
    body_capability = 1;
    }

// additional capabilities required by clients of the MTM
RESOURCE MTM_SECURITY_CAPABILITY_SET
    {
    capabilities = { ECapabilityNetworkServices };
    }</codeblock> </section> </conbody><related-links><link href="GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita"><linktext>Installing an MTM</linktext> </link> </related-links></concept>