btobexprofiles/obexreceiveservices/mtmuiinfrared/inc/irmtmui.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *     Infrared Mtm Ui part.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef CIRMTMUI_H
       
    22 #define CIRMTMUI_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <mtmuibas.h>
       
    26 // CLASS DECLARATION
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CClientMtmRegistry;
       
    30 class CMtmUiLayer;
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35 *  CCommonMtmUi
       
    36 */
       
    37 class CIrMtmUi : public CBaseMtmUi
       
    38 	{
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CIrMtmUi* NewL(
       
    45             CBaseMtm& aBaseMtm, 
       
    46             CRegisteredMtmDll& aRegisteredMtmDll );
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51 	    virtual ~CIrMtmUi();
       
    52 
       
    53     public: // Functions from base classes
       
    54 
       
    55         /**
       
    56         * From CBaseMtmUi Entry Creation.
       
    57         * @param aEntry reference to entry
       
    58         * @param aParent parent entry
       
    59         * @return CMsvOperation pointer to Msg operation.
       
    60         */
       
    61 	    virtual CMsvOperation* CreateL(
       
    62             const TMsvEntry& aEntry, 
       
    63             CMsvEntry& aParent, 
       
    64             TRequestStatus& aStatus );
       
    65 
       
    66         /**
       
    67         * From CBaseMtmUi Open entry.
       
    68         * @param aStatus Status for operation.
       
    69         * @return CMsvOperation pointer to Msg operation.
       
    70         */
       
    71 	    virtual CMsvOperation* OpenL( TRequestStatus& aStatus ); 
       
    72 
       
    73         /**
       
    74         * From CBaseMtmUi Close entry.
       
    75         * @param aStatus Status for operation.
       
    76         * @return CMsvOperation pointer to Msg operation.
       
    77         */
       
    78 	    virtual CMsvOperation* CloseL( TRequestStatus& aStatus ); 
       
    79 
       
    80         /**
       
    81         * From CBaseMtmUi Launches editor/settings dialog as appropriate. 
       
    82         * @param aStatus Status for operation.
       
    83         * @return CMsvOperation pointer to Msg operation.
       
    84         */
       
    85 	    virtual CMsvOperation* EditL( TRequestStatus& aStatus ); 
       
    86 	
       
    87         /**
       
    88         * From CBaseMtmUi Launches viewer/settings dialog as appropriate
       
    89         * @param aStatus Status for operation.
       
    90         * @return CMsvOperation pointer to Msg operation.
       
    91         */
       
    92         virtual CMsvOperation* ViewL( TRequestStatus& aStatus );
       
    93 
       
    94         /**
       
    95         * From CBaseMtmUi Deletes selection from current context
       
    96 	    * Deletes entries from the current context, 
       
    97         * which must be a folder or service of the relevant MTM  
       
    98         * @param aSelection reference to entry.
       
    99         * @param aStatus Status for operation.
       
   100         * @return CMsvOperation pointer to Msg operation.
       
   101         */
       
   102 	    virtual CMsvOperation* DeleteFromL(
       
   103             const CMsvEntrySelection& aSelection, 
       
   104             TRequestStatus& aStatus );
       
   105 
       
   106         /**
       
   107         * From CBaseMtmUi Deletes service, which need not 
       
   108         * be the current context.
       
   109         * @param aService reference to entry.
       
   110         * @param aStatus Status for operation.
       
   111         * @return CMsvOperation pointer to Msg operation.
       
   112         */
       
   113 	    virtual CMsvOperation* DeleteServiceL(
       
   114             const TMsvEntry& aService, 
       
   115             TRequestStatus& aStatus );
       
   116 
       
   117         /**
       
   118         * From CBaseMtmUi Remove remaining message of deleted service. 
       
   119         * @param aChildren reference to entry selection.
       
   120         * @return None.
       
   121         */
       
   122 	    void DeleteRecursivelyL( CMsvEntrySelection& aChildren );
       
   123 	
       
   124 
       
   125         /**
       
   126         * From CBaseMtmUi Reply entry
       
   127         * @param aDestination id for msv.
       
   128         * @param aPartlist partlist id.
       
   129         * @param aCompletionStatus status for operation.
       
   130         * @return CMsvOperation pointer to Msg operation.
       
   131         */
       
   132         virtual CMsvOperation* ReplyL(
       
   133             TMsvId aDestination, 
       
   134             TMsvPartList aPartlist, 
       
   135             TRequestStatus& aCompletionStatus );
       
   136 	
       
   137 
       
   138         /**
       
   139         * From CBaseMtmUi forward entry
       
   140         * @param aDestination id for msv.
       
   141         * @param aPartlist partlist id.
       
   142         * @param aCompletionStatus status for operation.
       
   143         * @return CMsvOperation pointer to Msg operation.
       
   144         */
       
   145         virtual CMsvOperation* ForwardL(
       
   146             TMsvId aDestination, 
       
   147             TMsvPartList aPartList, 
       
   148             TRequestStatus& aCompletionStatus );
       
   149 
       
   150 
       
   151         /**
       
   152         * From CBaseMtmUi Open entry
       
   153         * @param aStatus status for operation.
       
   154         * @return CMsvOperation pointer to Msg operation.
       
   155         */
       
   156         virtual CMsvOperation* OpenL(
       
   157             TRequestStatus& aStatus, 
       
   158             const CMsvEntrySelection& aSelection ); 
       
   159 
       
   160         /**
       
   161         * From CBaseMtmUi Close entry
       
   162         * @param aStatus status for operation.
       
   163         * @return CMsvOperation pointer to Msg operation.
       
   164         */
       
   165         virtual CMsvOperation* CloseL(
       
   166             TRequestStatus& aStatus, 
       
   167             const CMsvEntrySelection& aSelection ); 
       
   168 
       
   169         /**
       
   170         * From CBaseMtmUi Handles sending.
       
   171         * @param aStatus status for operation.
       
   172         * @return CMsvOperation pointer to Msg operation.
       
   173         */
       
   174         virtual CMsvOperation* EditL(
       
   175             TRequestStatus& aStatus, 
       
   176             const CMsvEntrySelection& aSelection );
       
   177 
       
   178         /**
       
   179         * From CBaseMtmUi Launches viewer/settings dialog as appropriate
       
   180         * @param aStatus status for operation.
       
   181         * @return CMsvOperation pointer to Msg operation.
       
   182         */
       
   183         virtual CMsvOperation* ViewL(
       
   184             TRequestStatus& aStatus, 
       
   185             const CMsvEntrySelection& aSelection );
       
   186 
       
   187 	
       
   188         /**
       
   189         * From CBaseMtmUi Context should be MTM folder/service to copy to
       
   190         * @param aStatus status for operation.
       
   191         * @return CMsvOperation pointer to Msg operation.
       
   192         */
       
   193         virtual CMsvOperation* CopyToL(
       
   194             const CMsvEntrySelection& aSelection, 
       
   195             TRequestStatus& aStatus );
       
   196 
       
   197         /**
       
   198         * From CBaseMtmUi Context should be MTM folder/service to Move to
       
   199         * @param aStatus status for operation.
       
   200         * @return CMsvOperation pointer to Msg operation.
       
   201         */
       
   202         virtual CMsvOperation* MoveToL(
       
   203             const CMsvEntrySelection& aSelection, 
       
   204             TRequestStatus& aStatus );
       
   205 
       
   206         /**
       
   207         * From CBaseMtmUi Context should be MTM folder/service to copy from
       
   208         * @param aStatus status for operation.
       
   209         * @return CMsvOperation pointer to Msg operation.
       
   210         */
       
   211         virtual CMsvOperation* CopyFromL(
       
   212             const CMsvEntrySelection& aSelection, 
       
   213             TMsvId aTargetId, 
       
   214             TRequestStatus& aStatus ); 
       
   215 
       
   216         /**
       
   217         * From CBaseMtmUi Context should be MTM folder/service to move from
       
   218         * @param aStatus status for operation.
       
   219         * @return CMsvOperation pointer to Msg operation.
       
   220         */
       
   221         virtual CMsvOperation* MoveFromL(
       
   222             const CMsvEntrySelection& aSelection, 
       
   223             TMsvId aTargetId, 
       
   224             TRequestStatus& aStatus );
       
   225 	
       
   226 
       
   227 
       
   228         /**
       
   229         * From CBaseMtmUi Display progress summary.
       
   230         * @param aProgress reference to summary text.
       
   231         * @return TInt error code.
       
   232         */
       
   233         TInt DisplayProgressSummary( const TDesC8& aProgress ) const;
       
   234 
       
   235         /**
       
   236         * From CBaseMtmUi return progress status.
       
   237         * @param aProgress reference to progress packet.
       
   238         * @param aReturnString returned progress text.
       
   239         * @param aTotalEntryCount entry count.
       
   240         * @param aEntriesDone completed entries.
       
   241         * @param aCurrentEntrySize size of the entry.
       
   242         * @param aCurrentBytesTrans transferred bytes.
       
   243         * @return TInt error code.
       
   244         */
       
   245         virtual TInt GetProgress(
       
   246             const TDesC8& aProgress, 
       
   247             TBuf<EProgressStringMaxLen>& aReturnString, 
       
   248             TInt& aTotalEntryCount, 
       
   249             TInt& aEntriesDone,
       
   250 		    TInt& aCurrentEntrySize, 
       
   251             TInt& aCurrentBytesTrans ) const;
       
   252 
       
   253 
       
   254         /**
       
   255         * From CBaseMtmUi Return capability.
       
   256         * @param aCapability UID for capability.
       
   257         * @return TInt error code.
       
   258         */
       
   259         virtual TInt QueryCapability( TUid aCapability, TInt& aResponse );
       
   260 
       
   261         /**
       
   262         * From CBaseMtmUi Synchronous MTM function operation.
       
   263         * @param aFunctionId Function ID.
       
   264         * @param CMsvEntrySelection entry reference.
       
   265         * @param aParam parameter for function.
       
   266         * @return None.
       
   267         */
       
   268         virtual void InvokeSyncFunctionL(
       
   269             TInt aFunctionId, 
       
   270             const CMsvEntrySelection& aSelection, 
       
   271             TDes8& aParameter );
       
   272 
       
   273         /**
       
   274         * From CBaseMtmUi Cancel sending.
       
   275         * @param aStatus Async status for operation.
       
   276         * @param CMsvEntrySelection entry reference.
       
   277         * @return CMsvOperation pointer to Msg operation.
       
   278         */
       
   279         virtual CMsvOperation* CancelL(
       
   280             TRequestStatus& aStatus, 
       
   281             const CMsvEntrySelection& aSelection );
       
   282 
       
   283     protected:
       
   284 
       
   285         /**
       
   286         * C++ default constructor.
       
   287         */ 
       
   288         CIrMtmUi( CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll );
       
   289 
       
   290         /**
       
   291         * By default Symbian OS constructor is private.
       
   292         */
       
   293         virtual void ConstructL();
       
   294 
       
   295     protected: // Functions from base classes
       
   296 
       
   297         /**
       
   298         * From CBaseMtmUi return resource filename.
       
   299         * @param aProgress reference to summary text.
       
   300         * @return TInt error code.
       
   301         */
       
   302         virtual void GetResourceFileName( TFileName& aFileName ) const;
       
   303 
       
   304         /**
       
   305         * From CBaseMtmUi Launch viewer for received message.
       
   306         * @param aStatus Async status for operation.
       
   307         * @param aSession session reference.
       
   308         * @return CMsvOperation pointer to Msg operation.
       
   309         */
       
   310         CMsvOperation*	LaunchEditorApplicationL(
       
   311             TRequestStatus& aStatus, 
       
   312             CMsvSession& aSession );
       
   313 
       
   314     protected:  // New functions
       
   315 
       
   316         /**
       
   317         * Register MTM.
       
   318         * @param aMtmType MTM UID.
       
   319         * @return CBaseMtm pointer.
       
   320         */
       
   321         CBaseMtm* GetClientMtmLC( TUid aMtmType );
       
   322 
       
   323         /**
       
   324         * Display progress summary.
       
   325         * @param aProgress reference to summary text.
       
   326         * @return TInt error code.
       
   327         */
       
   328         TInt DisplayProgressSummaryL( const TDesC8& aProgress ) const;
       
   329  
       
   330     protected: // data
       
   331         TBuf<EProgressStringMaxLen>     iConnectingText;
       
   332         TBuf<EProgressStringMaxLen>     iSendingText;
       
   333         CClientMtmRegistry*	        	iClientRegistry;    // pointer to registration.
       
   334         TBool				         	iCurrentlySending;  // Sending state
       
   335 	};
       
   336 
       
   337 #endif  // CIRMTMUI_H
       
   338 
       
   339 // End of File