Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.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 id="GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5" xml:lang="en"><title>Installing
       
    13 an MTM</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>This section explains how to install MTMs during build time to include
       
    15 them in ROM and how to install MTMs at run time on to a target phone (not
       
    16 in ROM). </p>
       
    17 <section><title>Build time</title> <p>To install an MTM during build time,
       
    18 complete the following steps: </p> <ol id="GUID-69A643BE-D84D-5799-AC9B-DE4909FC474A">
       
    19 <li id="GUID-4D566FC3-1D68-52A6-B089-20D10FDD86E4"><p>Build the MTM DLLs to
       
    20 a <filepath>\sys\bin</filepath> directory on any drive. For example, <filepath>c:\sys\bin</filepath>. </p> </li>
       
    21 <li id="GUID-1FD3BE6E-75CB-52E9-9437-1F099DE63777"><p>Build the MTM resource
       
    22 file to <filepath>resource\messaging\mtm</filepath>. </p><note> You can do
       
    23 this manually or use the mmp file syntax to export it to the <filepath>\resource\messaging\mtm</filepath> directory
       
    24 automatically at build time.</note> </li>
       
    25 </ol> <p><b>Example</b> </p> <codeblock id="GUID-90D8E09C-7F3D-5D07-8056-083A0EAC1486" xml:space="preserve">// mtm.mmp
       
    26 //
       
    27 // Copyright  2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
    28 // All rights reserved.
       
    29 // This component and the accompanying materials are made available
       
    30 // under the terms of the License "Symbian Foundation License v1.0"
       
    31 // which accompanies this distribution, and is available
       
    32 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
    33 //
       
    34 // Initial Contributors:
       
    35 // Nokia Corporation - initial contribution.
       
    36 //
       
    37 // Contributors:
       
    38 //
       
    39 // Description:
       
    40 //
       
    41 
       
    42 /**
       
    43 @file
       
    44 
       
    45 @SYMPurpose mtm.dll
       
    46 */
       
    47 
       
    48 TARGET        mtm.dll
       
    49 TARGETTYPE    dll
       
    50 TARGETPATH    sys/bin
       
    51 
       
    52 CAPABILITY    ReadDeviceData WriteDevicedata 
       
    53 UID        0x1000008d 0x10204286
       
    54 VENDORID    0x70000001
       
    55 
       
    56 SOURCEPATH    ../src
       
    57 
       
    58 USERINCLUDE     ../inc
       
    59 SYSTEMINCLUDE    /epoc32/include 
       
    60 
       
    61 LIBRARY        euser.lib 
       
    62 LIBRARY        msgs.lib 
       
    63 LIBRARY        bafl.lib 
       
    64 LIBRARY        efsrv.lib 
       
    65 
       
    66 SOURCEPATH    .
       
    67 start resource mtm.rss
       
    68 TARGET        mtm.rsc
       
    69 TARGETPATH  resource/messaging/mtm
       
    70 end
       
    71 
       
    72 </codeblock> </section>
       
    73 <section><title>Run time</title> <p>After creating a group of MTMs, you have
       
    74 to write an MTM installation application to install and register the MTMs
       
    75 with the Message Server using the <xref href="GUID-92D6CC11-C597-5D00-AAE5-866289B7462F.dita">MTM
       
    76 resource file</xref>. A program to do this would typically be run at the end
       
    77 of installation. </p> <p><b>Procedure</b> </p> <p>To install an MTM at run
       
    78 time on to a target phone, complete the following steps: </p> <ol id="GUID-33B69DC3-8A6B-585F-BE2F-F8484CACAC4C">
       
    79 <li id="GUID-209A4F6B-05D8-5F3E-979B-B28153FD66F9"><p>Create a session with
       
    80 the Message Server using the <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita"><apiname>CMsvSession</apiname></xref> class. </p> </li>
       
    81 <li id="GUID-ECF08244-F9C6-582D-8A90-1387D627E5B8"><p>Call <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita#GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B/GUID-E6553712-78CF-366C-B72A-5B673616C1A0"><apiname>CMsvSession::InstallMtmGroup()</apiname></xref> to
       
    82 install a new group of MTMs. </p> <p> <b> Result:</b> The <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita#GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B/GUID-E6553712-78CF-366C-B72A-5B673616C1A0"><apiname>CMsvSession::InstallMtmGroup()</apiname></xref> function
       
    83 notifies the Message Server about the availability of a new MTM. When this
       
    84 is done, all running client processes are also notified about the availability
       
    85 of a new MTM. </p> <codeblock id="GUID-5CEEAD15-9165-5346-99B8-FB80240438E6" xml:space="preserve">// Creating a Message Server session
       
    86 CDummyObserver ob;
       
    87 iSession=CMsvSession::OpenSyncL(ob);
       
    88 CleanupStack::PushL(iSession);
       
    89 //Install an MTM using a resource file
       
    90 iSession-&gt;InstallMtmGroup(ResourceFileName);</codeblock> </li>
       
    91 </ol> <p>To remove an MTM, call the <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita#GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B/GUID-808E9D5B-9F41-3450-B48C-3312E4296E8E"><apiname>CMsvSession::DeInstallMtmGroup()</apiname></xref> function. </p> <p> <b>Result:</b> The <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita#GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B/GUID-808E9D5B-9F41-3450-B48C-3312E4296E8E"><apiname>CMsvSession::DeInstallMtmGroup()</apiname></xref> function dynamically notifies the running client processes about the non-availability
       
    92 of the MTM. </p><note> The <xref href="GUID-C8FBC95B-223A-31E5-8D4C-D45B61BD078F.dita"><apiname>InstallMtmGroup()</apiname></xref> and <xref href="GUID-D32B5980-3046-31D7-A516-5556B4FED834.dita"><apiname>DeInstallMtmGroup()</apiname></xref> functions
       
    93 must be used only by an MTM installation application.</note> </section>
       
    94 <section><title>See also</title> <p><xref href="GUID-92D6CC11-C597-5D00-AAE5-866289B7462F.dita">MTM
       
    95 Resource File</xref>  </p> </section>
       
    96 </conbody></concept>