diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita --- a/Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-B79B6DD2-40C5-591B-AF56-5ACD167C66F5.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,81 +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 - -/** -@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