mobilemessaging/audiomsg/uiinc/audiomessageui.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   UI part of the AudioMessage MTM type to Symbian OS Messaging
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef AUDIOMESSAGEUI_H
       
    21 #define AUDIOMESSAGEUI_H
       
    22 
       
    23 #include <mtmuibas.h>
       
    24 #include <MuiuMsgEditorLauncher.h>
       
    25 #include <mmsconst.h>
       
    26 #include "mmssettingshandler.h"
       
    27 
       
    28 enum TEditorType
       
    29     {
       
    30     EReadOnly,
       
    31     EEditExisting,
       
    32     ECreateNewMessage,
       
    33     ESpecialEditor
       
    34     };
       
    35 
       
    36 /**
       
    37  *
       
    38  *  UI part of the AudioMessage MTM type to Symbian OS Messaging
       
    39  *
       
    40  *  @lib audiomessageui.lib
       
    41  *  @since S60 v3.1
       
    42  */
       
    43 class CAudioMessageUi : public CBaseMtmUi
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         
       
    47         /**
       
    48          * Symbian OS constructor
       
    49          * @param aBaseMtm client MTM
       
    50          * @param aRegisteredMtmDll registry dll
       
    51          * @return a new AMS MTM UI object.
       
    52          */
       
    53         static CAudioMessageUi* NewL(
       
    54             CBaseMtm& aBaseMtm,
       
    55             CRegisteredMtmDll& aRegisteredMtmDll );
       
    56         
       
    57         /**
       
    58          * Destructor.
       
    59          */
       
    60         ~CAudioMessageUi();
       
    61         
       
    62     public: // Functions from base classes
       
    63         
       
    64         /**
       
    65          * From CBaseMtmUi: Create a new entry. Launches MMS editor.
       
    66          * Asynchronous.
       
    67          * @param aEntry entry to be created
       
    68          * @param aParent parent entry
       
    69          * @param aStatus follows the operation progress
       
    70          * @return started operation
       
    71          */
       
    72         CMsvOperation* CreateL(
       
    73             const TMsvEntry& aEntry,
       
    74             CMsvEntry& aParent,
       
    75             TRequestStatus& aStatus );
       
    76         
       
    77         /**
       
    78          * From CBaseMtmUi:
       
    79          * Not supported (leaves with KErrNotSupported)
       
    80          */
       
    81         CMsvOperation* CancelL(
       
    82             TRequestStatus& aStatus,
       
    83             const CMsvEntrySelection& aSelection );
       
    84         
       
    85         /**
       
    86          * From CBaseMtmUi: 
       
    87          * Not supported (leaves with KErrNotSupported)
       
    88          */
       
    89         CMsvOperation* OpenL( TRequestStatus& aStatus );
       
    90         
       
    91         /**
       
    92          * From CBaseMtmUi:
       
    93          * Not supported (leaves with KErrNotSupported)
       
    94          */
       
    95         CMsvOperation* OpenL(
       
    96             TRequestStatus& aStatus,
       
    97             const CMsvEntrySelection& aSelection );
       
    98         
       
    99         /**
       
   100          * From CBaseMtmUi: not supported in Series 60
       
   101          */
       
   102         CMsvOperation* CloseL( TRequestStatus& aStatus );
       
   103         
       
   104         /**
       
   105          * From CBaseMtmUi: not supported in Series 60
       
   106          */
       
   107         CMsvOperation* CloseL(
       
   108             TRequestStatus& aStatus,
       
   109             const CMsvEntrySelection& aSelection );
       
   110         
       
   111         /**
       
   112          * From CBaseMtmUi: Opens MmsEditor for editing a message. If
       
   113          * service entry opens MMS Settings dialog for editing MMS settings.
       
   114          * @param aStatus follows the operation progress
       
   115          * @return started operation
       
   116          */
       
   117         CMsvOperation* EditL( TRequestStatus& aStatus );
       
   118         
       
   119         /**
       
   120          * From CBaseMtmUi: As the other EditL(), but gets the first entry in
       
   121          * a selection and edits it.
       
   122          */
       
   123         CMsvOperation* EditL(
       
   124             TRequestStatus& aStatus,
       
   125             const CMsvEntrySelection& aSelection );
       
   126         
       
   127         /**
       
   128          * From CBaseMtmUi: 
       
   129          * Not supported (leaves with KErrNotSupported)
       
   130          */
       
   131         CMsvOperation* ViewL( TRequestStatus& aStatus );
       
   132         
       
   133         /**
       
   134          * From CBaseMtmUi:
       
   135          * Not supported (leaves with KErrNotSupported)
       
   136          */
       
   137         CMsvOperation* ViewL(
       
   138             TRequestStatus& aStatus,
       
   139             const CMsvEntrySelection& aSelection );
       
   140         
       
   141         /**
       
   142          * From CBaseMtmUi:
       
   143          * Not supported (leaves with KErrNotSupported)
       
   144          */
       
   145         CMsvOperation* ReplyL(
       
   146             TMsvId aDestination,
       
   147             TMsvPartList aPartlist,
       
   148             TRequestStatus& aCompletionStatus );
       
   149         
       
   150         /**
       
   151          * From CBaseMtmUi: 
       
   152          * Not supported (leaves with KErrNotSupported)
       
   153          */
       
   154         CMsvOperation* ForwardL(
       
   155             TMsvId aDestination,
       
   156             TMsvPartList aPartList,
       
   157             TRequestStatus& aCompletionStatus );
       
   158         
       
   159     protected:  // New functions
       
   160     
       
   161         /**
       
   162          * Handles the actual launching of editor when editing a message.
       
   163          * @param aStatus follows the operation progress.
       
   164          * @param aSession Message server session to be used.
       
   165          * @param aEditorType Editor type used to launch the correct application. 
       
   166          *                    Defaults to EEditExisting.
       
   167          * @return started operation
       
   168          */        
       
   169         CMsvOperation* LaunchEditorApplicationL(
       
   170             TRequestStatus& aStatus,
       
   171             CMsvSession& aSession,
       
   172             TEditorType aEditorType = EEditExisting );
       
   173     
       
   174     protected:  // Functions from base classes
       
   175     
       
   176         /**
       
   177          * From CBaseMtmUi: Returns resource file
       
   178          * @param OUT aFileName Store resource file here
       
   179          */
       
   180         void GetResourceFileName( TFileName& aFileName ) const;
       
   181     
       
   182     private:
       
   183     
       
   184         /**
       
   185          * From CBaseMtmUi: construction.
       
   186          * @param
       
   187          * @return
       
   188          */
       
   189         void ConstructL();
       
   190     
       
   191         /**
       
   192          * From CBaseMtmUi: constructor.
       
   193          * @param aBaseMtm client MTM reference
       
   194          * @param aRegisteredMtmDll Registry DLL
       
   195          * @return
       
   196          */
       
   197         CAudioMessageUi( CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll );
       
   198     
       
   199         /**
       
   200          * Opens settings dialog for the MMS service.
       
   201          * @param aCompletionStatus follows the operation progress
       
   202          * @return started operation
       
   203          */
       
   204         CMsvOperation* OpenServiceSettingsDialogL(
       
   205             TRequestStatus& aCompletionStatus );
       
   206     
       
   207         /**
       
   208          * Checks whether or not MMS service settings are OK. Open settings
       
   209          * dialog if not.
       
   210          * @param aExitCode settings dialog exit code
       
   211          * @return are settings ok or not
       
   212          */
       
   213         TBool CheckSettingsL( CMmsSettingsDialog::TMmsExitCode& aExitCode ) const;
       
   214     
       
   215         /**
       
   216          * Creates completed operation after settings dialog closing with
       
   217          * appropriate parameters.
       
   218          * @param aCompletionStatus the operation progress
       
   219          * @param aExitCode settings dialog exit code
       
   220          * @return completed operation
       
   221          */
       
   222         CMsvOperation* CompleteSettingsOperationL(
       
   223             TRequestStatus& aCompletionStatus,
       
   224             const CMmsSettingsDialog::TMmsExitCode& aExitCode = CMmsSettingsDialog::EMmsExternalInterrupt );
       
   225     
       
   226         /**
       
   227          * Actual settings dialog launcher
       
   228          * @param aExitCode out: the exit code causing dialog to close
       
   229          */
       
   230         void LaunchSettingsDialogL(
       
   231             CMmsSettingsDialog::TMmsExitCode& aExitCode ) const;
       
   232 
       
   233         /**
       
   234          * Checks if ap exists
       
   235          * @param aAp, access point id
       
   236          */
       
   237         TBool ApExistsL( TUint32 aAp );
       
   238 
       
   239         /**
       
   240          * Checks if there's enough diskspace
       
   241          * If there is, just returns;
       
   242          * If there is not, leaves with KErrDiskFull
       
   243          */
       
   244         void CheckDiskSpaceL( );
       
   245 
       
   246     private:    // Data
       
   247         /**
       
   248          * Pointer to settingshandler
       
   249          * Own.  
       
   250 		 */
       
   251         CMmsSettingsHandler*    iSettingsHandler;
       
   252         TUid                    iAmsAppId;
       
   253     };
       
   254     
       
   255 #endif      // AUDIOMESSAGEUI_H
       
   256     
       
   257