Symbian3/PDK/Source/GUID-92D6CC11-C597-5D00-AAE5-866289B7462F.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <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
       
    13 //
       
    14 // Copyright (c) 2008 Symbian Ltd.  All rights reserved.
       
    15 //
       
    16 
       
    17 #include &lt;mtmconfig.rh&gt;
       
    18 
       
    19 RESOURCE MTM_INFO_FILE
       
    20     {
       
    21     mtm_type_uid = 0x100012FA;
       
    22     technology_type_uid = 0x10001626;
       
    23     components = 
       
    24         {
       
    25         MTM_COMPONENT_V2
       
    26             {
       
    27             human_readable_name = "My server dll info";
       
    28             component_uid = KUidMtmServerComponentVal;
       
    29             entry_point = 1;
       
    30             version = VERSION_V2 {};
       
    31             filename = "z:\\system\\libs\\servermtm.dll";
       
    32             },
       
    33         MTM_COMPONENT_V2
       
    34             {
       
    35             human_readable_name = "My client dll info";
       
    36             component_uid = KUidMtmClientComponentVal;
       
    37             entry_point = 1;
       
    38             version = VERSION_V2 {};
       
    39             filename = "z:\\system\\libs\\clientmtm.dll";
       
    40             },
       
    41         MTM_COMPONENT_V2
       
    42             {
       
    43             human_readable_name = "My ui dll info";
       
    44             component_uid = KUidMtmUiComponentVal;
       
    45             entry_point = 1;
       
    46             version = VERSION_V2 {};
       
    47             filename = "z:\\system\\libs\\dummyuimtm.dll"; // this does not exist
       
    48             },
       
    49         MTM_COMPONENT_V2
       
    50             {
       
    51             human_readable_name = "My ui data dll info";
       
    52             component_uid = KUidMtmUiDataComponentVal;
       
    53             entry_point = 1;
       
    54             version = VERSION_V2 {};
       
    55             filename = "z:\\system\\libs\\dummyuidatamtm.dll"; // this does not exist
       
    56             }
       
    57         };
       
    58     }
       
    59 // flags to indicate that can send messages, and handle body text
       
    60 RESOURCE MTM_CAPABILITIES
       
    61     {
       
    62     send_capability = 1;
       
    63     body_capability = 1;
       
    64     }
       
    65 
       
    66 // additional capabilities required by clients of the MTM
       
    67 RESOURCE MTM_SECURITY_CAPABILITY_SET
       
    68     {
       
    69     capabilities = { ECapabilityNetworkServices };
       
    70     }</codeblock> </section> </conbody><related-links><link href="GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita"><linktext>Installing an MTM</linktext> </link> </related-links></concept>