meetingrequest/mrcalremoteattachment/api/inc/ccalremoteattachmentapi.h
branchRCL_3
changeset 12 4ce476e64c59
child 16 b5fbb9b25d57
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 CCALREMOTEATTACHMENTAPI_H
       
    19 #define CCALREMOTEATTACHMENTAPI_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <bamdesca.h>
       
    23 
       
    24 class MCalRemoteAttachment;
       
    25 class MCalRemoteAttachmentInfo;
       
    26 class MCalRemoteAttachmentOperation;
       
    27 class MCalRemoteAttachmentOperationObserver;
       
    28 
       
    29 /**
       
    30  * CCalRemoteAttachmentApi defines calendar attachment download operations.
       
    31  */
       
    32 class CCalRemoteAttachmentApi : public CBase
       
    33     {
       
    34 public: // Construction and destruction
       
    35 
       
    36     /**
       
    37 	 * Creates and initializes new CCalRemoteAttachmentApi object. Ownership 
       
    38 	 * is transferred to caller. 
       
    39 	 * @param aUri
       
    40 	 */
       
    41 	static CCalRemoteAttachmentApi* NewL( const TDesC8& aUri );
       
    42 	
       
    43 	/**
       
    44 	 * Destructor
       
    45 	 */
       
    46 	virtual ~CCalRemoteAttachmentApi();
       
    47 	
       
    48 public: // Interface
       
    49 	
       
    50 	/**
       
    51 	 * Fetches attachment information.
       
    52 	 * @param aAttachmentInfo Reference to attachment info array
       
    53 	 * @param aAttachmentUrlArray List of attachment URIs which information is wanted 
       
    54 	 */
       
    55 	virtual void AttachmentInfo(
       
    56 	        MCalRemoteAttachmentInfo& aAttachmentInfo,
       
    57 	        MDesCArray& aAttachmentUrlArray ) const = 0;
       
    58 	
       
    59 	/**
       
    60 	 * Downloads attachment. Ownership of created operation is transferred
       
    61 	 * to caller. Created operations are stored to <aOperations> array.
       
    62 	 * 
       
    63 	 * @param aAttachments Attachments to be downloaded index
       
    64 	 * @param aOperations Operation array.
       
    65 	 * @param aObserver Reference to attachment observer
       
    66 	 */
       
    67 	virtual void DownloadAttachmentsL(
       
    68 	        const RPointerArray<MCalRemoteAttachment>& aAttachments,
       
    69 	        RPointerArray<MCalRemoteAttachmentOperation>& aOperations,
       
    70 	        MCalRemoteAttachmentOperationObserver& aObserver ) = 0;
       
    71 
       
    72 private:
       
    73         /** iDtor_ID_Key Instance identifier key. When instance of an
       
    74          *               implementation is created by ECOM framework, the
       
    75          *               framework will assign UID for it. The UID is used in
       
    76          *               destructor to notify framework that this instance is
       
    77          *               being destroyed and resources can be released.
       
    78          */
       
    79         TUid iDtor_ID_Key;	
       
    80 	};
       
    81 
       
    82 #include <ccalremoteattachmentapi.inl>
       
    83 	
       
    84 #endif // CCALREMOTEATTACHMENTAPI_H
       
    85 
       
    86 // EOF