meetingrequest/mrcalremoteattachment/api/inc/mcalremoteattachmentoperationobserver.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2009 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 *
       
    16 */
       
    17 
       
    18 #ifndef MCALREMOTEATTACHMENTOPERATIONOBSERVER_H
       
    19 #define MCALREMOTEATTACHMENTOPERATIONOBSERVER_H
       
    20 
       
    21 #include <e32def.h>
       
    22 
       
    23 class MCalRemoteAttachmentOperation;
       
    24 class RFile;
       
    25 
       
    26 /**
       
    27  * MCalRemoteAttachmentOperationObserver is used for indicating
       
    28  * attachment download operation progress and completion.
       
    29  */
       
    30 class MCalRemoteAttachmentOperationObserver
       
    31     {
       
    32 public: // Destruction
       
    33     
       
    34 	/**
       
    35 	 * Virtual desttructor
       
    36 	 */
       
    37 	virtual ~MCalRemoteAttachmentOperationObserver() {}
       
    38 	
       
    39 public: // Interface	
       
    40 	
       
    41 	/**
       
    42 	 * Indicates about operation progress.
       
    43 	 * @param aOperation Pointer to operation that was completed.
       
    44 	 * @param aPercentageCompleted how many percent is done.
       
    45 	 */
       
    46 	virtual void Progress(
       
    47 	         MCalRemoteAttachmentOperation* aOperation,
       
    48 			 TInt aPercentageCompleted ) = 0;
       
    49 	
       
    50 	/**
       
    51 	 * Called when operation is completed. Command is allowed to close file handle
       
    52 	 * after calling this method. Observer needs to duplicate file handle if 
       
    53 	 * needed afterwards.
       
    54 	 * 
       
    55 	 * @param aOperation Pointer to operation that was completed.
       
    56 	 */ 
       
    57 	virtual void OperationCompleted(
       
    58 	        MCalRemoteAttachmentOperation* aOperation,
       
    59             RFile& aAttachment ) = 0;
       
    60 			
       
    61 	/**
       
    62 	 * Called when operation error occured.
       
    63 	 * @param aOperation Pointer to operation.
       
    64 	 * @param aErrorCode Defines operation error code.
       
    65 	 */ 
       
    66 	virtual void OperationError(
       
    67 	        MCalRemoteAttachmentOperation* aOperation,
       
    68             TInt aErrorCode ) = 0;	
       
    69 	};
       
    70 
       
    71 #endif // MCALREMOTEATTACHMENTOPERATIONOBSERVER_H
       
    72 
       
    73 // EOF