diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita --- a/Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,96 +1,81 @@ - - - - - -Installing -an MTM -

This section explains how to install MTMs during build time to include -them in ROM and how to install MTMs at run time on to a target phone (not -in ROM).

-
Build time

To install an MTM during build time, -complete the following steps:

    -
  1. Build the MTM DLLs to -a \sys\bin directory on any drive. For example, c:\sys\bin.

  2. -
  3. Build the MTM resource -file to resource\messaging\mtm.

    You can do -this manually or use the mmp file syntax to export it to the \resource\messaging\mtm directory -automatically at build time.
  4. -

Example

// mtm.mmp -// -// Copyright 2006-2009 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 "Symbian Foundation License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -/** -@file - -@SYMPurpose mtm.dll -*/ - -TARGET mtm.dll -TARGETTYPE dll -TARGETPATH sys/bin - -CAPABILITY ReadDeviceData WriteDevicedata -UID 0x1000008d 0x10204286 -VENDORID 0x70000001 - -SOURCEPATH ../src - -USERINCLUDE ../inc -SYSTEMINCLUDE /epoc32/include - -LIBRARY euser.lib -LIBRARY msgs.lib -LIBRARY bafl.lib -LIBRARY efsrv.lib - -SOURCEPATH . -start resource mtm.rss -TARGET mtm.rsc -TARGETPATH resource/messaging/mtm -end - -
-
Run time

After creating a group of MTMs, you have -to write an MTM installation application to install and register the MTMs -with the Message Server using the MTM -resource file. A program to do this would typically be run at the end -of installation.

Procedure

To install an MTM at run -time on to a target phone, complete the following steps:

    -
  1. Create a session with -the Message Server using the CMsvSession class.

  2. -
  3. Call CMsvSession::InstallMtmGroup() to -install a new group of MTMs.

    Result: The CMsvSession::InstallMtmGroup() function -notifies the Message Server about the availability of a new MTM. When this -is done, all running client processes are also notified about the availability -of a new MTM.

    // Creating a Message Server session -CDummyObserver ob; -iSession=CMsvSession::OpenSyncL(ob); -CleanupStack::PushL(iSession); -//Install an MTM using a resource file -iSession->InstallMtmGroup(ResourceFileName);
  4. -

To remove an MTM, call the CMsvSession::DeInstallMtmGroup() function.

Result: The CMsvSession::DeInstallMtmGroup() function dynamically notifies the running client processes about the non-availability -of the MTM.

The InstallMtmGroup() and DeInstallMtmGroup() functions -must be used only by an MTM installation application.
-
See also

MTM -Resource File

+ + + + + +Installing +an MTM +

This section explains how to install MTMs during build time to include +them in ROM and how to install MTMs at run time on to a target phone (not +in ROM).

+
Build time

To install an MTM during build time, +complete the following steps:

    +
  1. Build the MTM DLLs to +a \sys\bin directory on any drive. For example, c:\sys\bin.

  2. +
  3. Build the MTM resource +file to resource\messaging\mtm.

    You can do +this manually or use the mmp file syntax to export it to the \resource\messaging\mtm directory +automatically at build time.
  4. +

Example

// mtm.mmp +// +/** +@file + +@SYMPurpose mtm.dll +*/ + +TARGET mtm.dll +TARGETTYPE dll +TARGETPATH sys/bin + +CAPABILITY ReadDeviceData WriteDevicedata +UID 0x1000008d 0x10204286 +VENDORID 0x70000001 + +SOURCEPATH ../src + +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include + +LIBRARY euser.lib +LIBRARY msgs.lib +LIBRARY bafl.lib +LIBRARY efsrv.lib + +SOURCEPATH . +start resource mtm.rss +TARGET mtm.rsc +TARGETPATH resource/messaging/mtm +end + +
+
Run time

After creating a group of MTMs, you have +to write an MTM installation application to install and register the MTMs +with the Message Server using the MTM +resource file. A program to do this would typically be run at the end +of installation.

Procedure

To install an MTM at run +time on to a target phone, complete the following steps:

    +
  1. Create a session with +the Message Server using the CMsvSession class.

  2. +
  3. Call CMsvSession::InstallMtmGroup() to +install a new group of MTMs.

    Result: The CMsvSession::InstallMtmGroup() function +notifies the Message Server about the availability of a new MTM. When this +is done, all running client processes are also notified about the availability +of a new MTM.

    // Creating a Message Server session +CDummyObserver ob; +iSession=CMsvSession::OpenSyncL(ob); +CleanupStack::PushL(iSession); +//Install an MTM using a resource file +iSession->InstallMtmGroup(ResourceFileName);
  4. +

To remove an MTM, call the CMsvSession::DeInstallMtmGroup() function.

Result: The CMsvSession::DeInstallMtmGroup() function dynamically notifies the running client processes about the non-availability +of the MTM.

The InstallMtmGroup() and DeInstallMtmGroup() functions +must be used only by an MTM installation application.
+
See also

MTM +Resource File

\ No newline at end of file