williamr@2: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #if !defined(__MTMUIBAS_H__) williamr@2: #define __MTMUIBAS_H__ williamr@2: williamr@2: #if !defined(__MSVSTD_H__) williamr@2: #include williamr@2: #endif williamr@2: #if !defined(__MTCLBASE_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: // Forward references williamr@2: class CMsvSession; williamr@2: class CMsvOperation; williamr@2: class CCoeEnv; williamr@2: williamr@2: /////////////////////////////////// williamr@2: // CBaseMtmUi - MTMUi base API // williamr@2: /////////////////////////////////// williamr@2: class CBaseMtmUi : public CBase williamr@2: /** Provides MTM-specific user interaction, such as editing, viewing, deleting, williamr@2: and copying of message entries. williamr@2: williamr@2: Message client applications use the class to access such functionality polymorphically. williamr@2: MTM implementers implement a derived class to provide such functionality for williamr@2: their message protocol. williamr@2: williamr@2: The base class is largely an interface definition: it implements little important williamr@2: functionality itself. For implementers, this documentation defines conditions williamr@2: that any implementation must fulfil, plus suggested semantics for behaviour. williamr@2: This still leaves many decisions in the hands of the implementer. A key design williamr@2: time activity is to define how the particular characteristics of the implemented williamr@2: protocol are best mapped to the interface. As this class is concerned with williamr@2: user interfaces, implementers should be sensitive to the look and feel of williamr@2: the target phone. williamr@2: williamr@2: Many functions are required to return an instance of a CMsvOperation-derived williamr@2: class to provide asynchronous control and monitoring to the caller of the williamr@2: operation being performed. williamr@2: williamr@2: The following are some significant groups of functions: williamr@2: williamr@2: Entry manipulation functions: OpenL(), CloseL(), EditL(), and ViewL() are williamr@2: all available in two overloaded versions. The first version operates on the williamr@2: current context. The second version operates upon groups of entries specified williamr@2: by a CMsvEntrySelection argument. All entries must be in same folder and all williamr@2: of the correct MTM type. The context may change after calling these functions. williamr@2: Concrete User Interface MTMs can legally ignore any of the entries within williamr@2: the selection - many may, for example, simply open the first entry. williamr@2: williamr@2: Copying and moving functions: the CopyToL(), CopyFromL(), MoveToL(), and MoveFromL() williamr@2: functions are concerned with copying and moving entries to and from remote williamr@2: servers. MTMs can implement these functions to provide any user interaction williamr@2: needed before copying or moving can proceed, such as dialogs to confirm settings; williamr@2: and, any protocol-specific setup steps that can be done at this stage: for williamr@2: example, a fax MTM could render messages into the required image format. williamr@2: williamr@2: Progress information functions: DisplayProgressSummary() and GetProgress() williamr@2: convert MTM-specific progress information about some asynchronous operation, williamr@2: such as message sending, to a human-readable form. The progress information williamr@2: to pass into these functions is, in general, obtained from an on-going CMsvOperation williamr@2: by calling CMsvOperation::Progress(). The nature of any information provided williamr@2: is MTM-specific. williamr@2: williamr@2: MTM-specific UI functions: MTM components can offer protocol-specific functionality williamr@2: not provided by base class interface functions. MTM components define IDs williamr@2: that correspond to each protocol-specific operation offered, and implement williamr@2: the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients williamr@2: to access these operations by passing in the appropriate ID. Two functions williamr@2: are provided to allow the MTM component to offer both synchronous and asynchronous williamr@2: functionality. Message client applications can dynamically add user-interface williamr@2: features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). williamr@2: MTM developers should document the IDs if they wish to make the operations williamr@2: available to clients. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: // --- enums --- williamr@2: /** Progress information buffer length. */ williamr@2: enum { williamr@2: /** Defines the maximum buffer length used in GetProgress() to hold progress information. */ williamr@2: EProgressStringMaxLen=255}; williamr@2: // williamr@2: // --- Set up functionality --- williamr@2: IMPORT_C void SetPreferences(TUint aFlags); williamr@2: IMPORT_C TUint Preferences() const; williamr@2: // williamr@2: // --- Destruction --- williamr@2: IMPORT_C virtual ~CBaseMtmUi(); williamr@2: // williamr@2: // --- Accessor functions --- williamr@2: IMPORT_C TUid Type() const; williamr@2: IMPORT_C CBaseMtm& BaseMtm() const; williamr@2: // williamr@2: // --- Functions NOT dependent on the current context --- williamr@2: IMPORT_C virtual CMsvOperation* CreateL(const TMsvEntry& aEntry, CMsvEntry& aParent, TRequestStatus& aStatus); williamr@2: // williamr@2: // --- Functions dependent on the current context --- williamr@2: /** Opens an entry. williamr@2: williamr@2: The behaviour that this implies is dependent on the current context: williamr@2: williamr@2: 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only williamr@2: messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. williamr@2: williamr@2: 2. for service contexts, the function may initiate a connection to obtain the williamr@2: service contents from the server, completing asynchronously williamr@2: williamr@2: 3. for remote folder contexts, dependent on implementation, the function may williamr@2: initiate a connection to obtain the folder contents from the server, completing williamr@2: asynchronously williamr@2: williamr@2: The returned CMsvOperation object completes when opening is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: If opening entries is not supported, implementations should leave with KErrNotSupported. williamr@2: Otherwise, implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can open the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: 3. for remote messages, typically, copy the messages to the Inbox williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: williamr@2: @leave KErrNotSupported The User Interface MTM does not support open operations, williamr@2: or opening is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing open operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* OpenL(TRequestStatus& aStatus) = 0; williamr@2: /** Closes an entry. The behaviour that this implies is dependent on the current williamr@2: context: williamr@2: williamr@2: 1. for message contexts, this usually closes any launched editors or viewers williamr@2: williamr@2: 2. for folder contexts, leaves with KErrNotSupported williamr@2: williamr@2: 3. for service contexts, causes closure of a connection to a server williamr@2: williamr@2: The returned CMsvOperation object completes when closing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can close the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: williamr@2: @leave KErrNotSupported The User Interface MTM does not support close operations, williamr@2: or closing is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing close operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* CloseL(TRequestStatus& aStatus) = 0; williamr@2: /** Edits an entry. williamr@2: williamr@2: The behaviour that this implies is dependent on the current williamr@2: context: williamr@2: williamr@2: 1. for message contexts, this usually launches the appropriate message editor, williamr@2: or returns status KErrReadOnly if the message is not editable williamr@2: williamr@2: 2. for remote folder contexts, launches a settings dialog, for example to rename williamr@2: the folder, completing asynchronously williamr@2: williamr@2: 3. for service contexts, launches a service settings dialog, completing asynchronously williamr@2: williamr@2: The returned CMsvOperation object completes when editing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can edit the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: 3. for remote messages, typically, copy the messages to the Inbox williamr@2: williamr@2: 4. follow the leave protocols described in Leave considerations below williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @leave KErrNotSupported The User Interface MTM does not support edit operations, williamr@2: or editing is inappropriate to the current context williamr@2: @leave KErrReadOnly Context is read-only williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing edit operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* EditL(TRequestStatus& aStatus) = 0;// Launches editor/settings dialog as appropriate williamr@2: /** Views an entry. williamr@2: williamr@2: For message contexts, this usually launches the appropriate williamr@2: message viewer. Other context types leave with KErrNotSupported. The returned williamr@2: CMsvOperation object completes when viewing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can view the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @leave KErrNotSupported The User Interface MTM does not support view operations, williamr@2: or viewing is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing view operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* ViewL(TRequestStatus& aStatus) = 0;// Launches viewer/settings dialog as appropriate williamr@2: // williamr@2: // --- Actions upon message selections --- williamr@2: // --- Selections must be in same folder and all of the correct MTM type --- williamr@2: // --- Context may change after calling these functions --- williamr@2: /** Opens a selection of entries. williamr@2: williamr@2: The behaviour that this implies is dependent on the current context: williamr@2: williamr@2: 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only williamr@2: messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. williamr@2: williamr@2: 2. for service contexts, the function may initiate a connection to obtain the williamr@2: service contents from the server, completing asynchronously williamr@2: williamr@2: 3. for remote folder contexts, dependent on implementation, the function may williamr@2: initiate a connection to obtain the folder contents from the server, completing williamr@2: asynchronously williamr@2: williamr@2: The returned CMsvOperation object completes when opening is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: If opening entries is not supported, implementations should leave with KErrNotSupported. williamr@2: Otherwise, implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can open the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: 3. for remote messages, typically, copy the messages to the Inbox williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @param aSelection Selection of message entries williamr@2: @leave KErrNotSupported The User Interface MTM does not support open operations, williamr@2: or opening is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing open operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* OpenL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; williamr@2: /** Closes a selection of entries. williamr@2: williamr@2: The behaviour that this implies is dependent on the current context: williamr@2: williamr@2: 1. for message contexts, this usually closes any launched editors or viewers williamr@2: williamr@2: 2. for folder contexts, leaves with KErrNotSupported williamr@2: williamr@2: 3. for service contexts, causes closure of a connection to a server williamr@2: williamr@2: The returned CMsvOperation object completes when closing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can close the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @param aSelection Selection of message entries williamr@2: @leave KErrNotSupported The User Interface MTM does not support close operations, williamr@2: or closing is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing close operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* CloseL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; williamr@2: /** Edits a selection of entries. williamr@2: williamr@2: The behaviour that this implies is dependent on the current context: williamr@2: williamr@2: 1. for message contexts, this usually launches the appropriate message editor, williamr@2: or returns status KErrReadOnly if the message is not editable williamr@2: williamr@2: 2. for remote folder contexts, launches a settings dialog, for example to rename williamr@2: the folder, completing asynchronously williamr@2: williamr@2: 3. for service contexts, launches a service settings dialog, completing asynchronously williamr@2: williamr@2: The returned CMsvOperation object completes when editing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can edit the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: 3. for remote messages, typically, copy the messages to the Inbox williamr@2: williamr@2: 4. follow the leave protocols described in Leave considerations below williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @param aSelection Selection of message entries williamr@2: @leave KErrNotSupported The User Interface MTM does not support edit operations, williamr@2: or editing is inappropriate to the current context williamr@2: @leave KErrReadOnly Context is read-only williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing edit operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* EditL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches editor/settings dialog as appropriate williamr@2: /** Views a selection of entries. williamr@2: williamr@2: For message contexts, this usually launches the appropriate williamr@2: message viewer. Other context types leave with KErrNotSupported. The returned williamr@2: CMsvOperation object completes when viewing is complete. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: Implementations should: williamr@2: williamr@2: 1. check aEntry.iType.iUid to ensure that they can view the requested type of williamr@2: entry and leave with code KErrNotSupported if they cannot williamr@2: williamr@2: 2. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @param aSelection Selection of message entries williamr@2: @leave KErrNotSupported The User Interface MTM does not support view operations, williamr@2: or viewing is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing view operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* ViewL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches viewer/settings dialog as appropriate williamr@2: /** Cancels the sending of specified messages. williamr@2: williamr@2: @param aStatus The request status to be completed when the operation has finished williamr@2: @param aSelection Selection of message entries williamr@2: @leave KErrNotSupported The User Interface MTM does not support cancel operations, williamr@2: or cancelling is inappropriate to the current context williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing cancel operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* CancelL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; williamr@2: // williamr@2: // --- Deletion --- williamr@2: // --- Deletes entries from the current context, which must be a folder or service of the relevant MTM --- williamr@2: IMPORT_C virtual CMsvOperation* DeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Deletes selection from current context williamr@2: // --- Un-deletes entries from the current context, which must be a folder or service of the relevant MTM --- williamr@2: IMPORT_C virtual CMsvOperation* UnDeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Un-deletes selection from current context williamr@2: // --- Deletes service, which need not be the current context --- williamr@2: IMPORT_C virtual CMsvOperation* DeleteServiceL(const TMsvEntry& aService, TRequestStatus& aStatus); // default implementation simply delegates to the server williamr@2: // williamr@2: // --- Message responding --- williamr@2: /** Creates a reply message to the current message context, and allows the user williamr@2: to edit it through a message-type specific editor. williamr@2: williamr@2: Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the reply. williamr@2: The parent for the new entry is specified in aDestination. The returned CMsvOperation williamr@2: object completes when editing the reply is complete. On completion, the context williamr@2: is set to the reply message. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: A typical implementation for this function would include the following steps: williamr@2: williamr@2: 1. create a new reply entry by calling CBaseMtm::ReplyL() williamr@2: williamr@2: 2. call EditL() allow the user to edit the reply williamr@2: williamr@2: 3. return a CMsvOperation-derived object to provide asynchronous control and williamr@2: monitoring of the operation williamr@2: williamr@2: If message replies are not supported, implementations should leave with KErrNotSupported. williamr@2: williamr@2: @param aDestination The entry to which to assign the reply williamr@2: @param aPartlist Defines the parts which are to be copied from the original williamr@2: message into the reply. See CBaseMtm::ReplyL() for details. williamr@2: @param aCompletionStatus The request status to be completed when the operation williamr@2: has finished williamr@2: @leave KErrNotSupported The User Interface MTM does not support reply operations williamr@2: @leave Other Dependent on implementation williamr@2: @return If successful, this is an asynchronously completing reply operation. williamr@2: If failed, this is a completed operation, with status set to the relevant williamr@2: error code. */ williamr@2: virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus) = 0; williamr@2: /** williamr@2: Creates a forwarded message from the current message context, and allows the user to edit it through a message-type williamr@2: specific editor. williamr@2: williamr@2: Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the williamr@2: forwarded message. The parent for the new entry is specified in aDestination. The returned CMsvOperation williamr@2: object completes when editing the forwarded message is complete. On completion, the context is set to the forwarded message. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: A typical implementation for this function would include the following steps: williamr@2: williamr@2: 1. create a new forwarded message entry by calling CBaseMtm::ForwardL() williamr@2: williamr@2: 2. call EditL() allow the user to edit the forwarded message williamr@2: williamr@2: 3. return a CMsvOperation-derived object to provide asynchronous control and monitoring of the operation williamr@2: williamr@2: If forwarded messages are not supported, implementations should leave with KErrNotSupported. williamr@2: williamr@2: @return If successful, this is an asynchronously completing forward message operation. If failed, williamr@2: this is a completed operation, with status set to the relevant error code. williamr@2: @param aDestination The entry to which to assign the forwarded message williamr@2: @param aPartList Defines the parts which are to be copied from the original message into the forwarded message williamr@2: @param aCompletionStatus The request status to be completed when the operation has finished williamr@2: @leave KErrNotSupported The User Interface MTM does not support message forwarding operations williamr@2: @leave Other Dependent on implementation williamr@2: */ williamr@2: virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus) = 0; williamr@2: williamr@2: // williamr@2: // --- Copy and move functions --- williamr@2: // --- Context should be set to folder or entry of this MTM --- williamr@2: // --- Default implementations imply call the relevant CMsvEntry functions --- williamr@2: IMPORT_C virtual CMsvOperation* CopyToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to copy to williamr@2: IMPORT_C virtual CMsvOperation* MoveToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to move to williamr@2: IMPORT_C virtual CMsvOperation* CopyFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to copy from williamr@2: IMPORT_C virtual CMsvOperation* MoveFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to move from williamr@2: // williamr@2: // --- Interpret transfer progress --- williamr@2: IMPORT_C virtual TInt DisplayProgressSummary(const TDesC8& aProgress) const;// Used for display operation summary (usually completed operations). Default implementation returns KErrNotSupported. williamr@2: IMPORT_C virtual TInt GetProgress(const TDesC8& aProgress, TBuf& aReturnString, TInt& aTotalEntryCount, TInt& aEntriesDone, williamr@2: TInt& aCurrentEntrySize, TInt& aCurrentBytesTrans) const;// Default implementation returns KErrNotSupported williamr@2: // williamr@2: // --- RTTI functions --- williamr@2: IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); williamr@2: IMPORT_C virtual void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); williamr@2: IMPORT_C virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TRequestStatus& aCompletionStatus, williamr@2: TDes8& aParameter); williamr@2: williamr@2: protected: williamr@2: // --- Construction --- williamr@2: IMPORT_C CBaseMtmUi(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll); williamr@2: IMPORT_C virtual void ConstructL(); williamr@2: /** Sets the full path and name of the resource file associated with the User Interface MTM. williamr@2: williamr@2: Client applications do not use this function. It is relevant only to implementers of derived classes. williamr@2: williamr@2: Requirements: williamr@2: williamr@2: The function is called by CBaseMtmUi::ConstructL(), which then loads the resource williamr@2: file. williamr@2: williamr@2: @param aFileName Filename buffer to be filled with the resource file path williamr@2: and name */ williamr@2: virtual void GetResourceFileName(TFileName& aFileName) const = 0; williamr@2: // williamr@2: // --- Utility functions --- williamr@2: IMPORT_C CMsvSession& Session() const; williamr@2: williamr@2: // Method used for extension: called by non virtual methods that need williamr@2: // to have a polymorphic behaviour. williamr@2: IMPORT_C virtual TAny* GetInterface(TUid aUid); williamr@2: williamr@2: protected: williamr@2: // --- Data --- williamr@2: /** The CBaseMtm-derived object (Client-side MTM) that requested the User Interface williamr@2: MTM. It is set by the constructor. */ williamr@2: CBaseMtm& iBaseMtm; williamr@2: /** Control environment object. It is set by the constructor. */ williamr@2: CCoeEnv* iCoeEnv; williamr@2: /** This flag records the preferences as set by SetPreferences(). */ williamr@2: TUint iFlags; williamr@2: williamr@2: private: williamr@2: // --- Data --- williamr@2: CRegisteredMtmDll& iRegisteredMtmDll; williamr@2: TInt iResourceFileOffset; williamr@2: // Extra data member to allow for future extensions williamr@2: TAny* iExtensionData; williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __MTMUIBAS_H__