Note: This example is designed to work with Techview and there is no guarantee that it will work on other interfaces
Click on the following link to download the example:.TextMTM.zip
Click: browse to view the example code.
The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.
The txtu project demonstrates a User Interface MTM. The central class is CTextMtmUi, derived from the User Interface MTM base class CBaseMtmUi.
Note that the txtu project has dependencies on some GUI components that might not be present on all SDKs.
txtu implements the following MTM functionality:
Create(): this creates a new local message in the Draft folder, with description field set to "New Text", and then invokes edit.
Edit(): no UI for editing and viewing text messages is implemented. A simple stub is provided that simply appends the text "Edited document" to the message and puts up an information message.
If an edit command is invoked on a remote message entry (an entry under a Text service entry), the MTM offers to copy it to the local Inbox first. This is performed by class CEditRemoteOperation. and dialog resource r_dialog_refuse_edit_remote_message.
Open() and View(): these functions for a message context simply calls the edit function.
CopyToL(), MoveToL(), CopyFromL(), MoveFromL() and DeleteL(): simple implementations of these functions are provided that use the CMsvEntry copy, move and delete functions. These commands are passed to the Message Server, which then passes them on to the Server-side Text MTM.
ReplyL() and ForwardL(): there is no UI support for message replies and forwarding.
Create() and Edit(): when requested to create a new Text service entry, a dialog pops up allowing the user to specify the folder associated with the service. This is performed by class CTextMtmEditServiceDialog and resource r_dialog_service_settings. The service entry can then be edited later on, to change the folder.
After the service entry is created or changed, an automatic refresh will be triggered.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.