meetingrequest/mrservices/inc/cesmrattachmentinfo.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007-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:  MRUI attachmentinfo definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRATTACHMENTINFO_H
       
    20 #define CESMRATTACHMENTINFO_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "cesmrattachment.h"
       
    24 
       
    25 /**
       
    26  * CESMRAttachmentInfo encapsulates MR attachment information
       
    27  * and handling of CESMRAttachment objects in own RPointerArray
       
    28  *
       
    29  * @lib esmrservices.lib
       
    30  */
       
    31 NONSHARABLE_CLASS( CESMRAttachmentInfo ) : public CBase
       
    32     {
       
    33 public: // Construction and destruction
       
    34     /**
       
    35      * Two-phased constructor. Creates and initializes
       
    36      * CESMRAttachmentInfo object. Ownership transferred to caller.
       
    37      *
       
    38      * @return Pointer to esmr CESMRAttachmentInfo handler object.
       
    39      */
       
    40      IMPORT_C static CESMRAttachmentInfo* NewL();
       
    41 
       
    42      /**
       
    43       * C++ Destructor
       
    44       */
       
    45     IMPORT_C ~CESMRAttachmentInfo();
       
    46 
       
    47 public:
       
    48     /**
       
    49      * Creates new CESMRAttachment object and
       
    50      * adds it to the array owned by this class
       
    51      *
       
    52      * @param aAttachmentName File name of attachment
       
    53      * @param size of attachment
       
    54      * @param aState state of attachment download
       
    55      */
       
    56     IMPORT_C void AddAttachmentInfoL(
       
    57             const TDesC& aAttachmentName,
       
    58             TInt aAttachntSizeInBytes,
       
    59             CESMRAttachment::TESMRAttachmentState aState );
       
    60 
       
    61     /**
       
    62      * adds CESMRAttachment to the array owned by this class
       
    63      *
       
    64      * @param aAttachment object to be added to the array
       
    65      */
       
    66      IMPORT_C void AddAttachmentInfoL(
       
    67              CESMRAttachment* aAttachment );
       
    68 
       
    69      /**
       
    70       * Counts number of CESMRAttachment objects in array
       
    71       * @return number of objects in array
       
    72       */
       
    73      IMPORT_C TInt AttachmentCount() const;
       
    74 
       
    75      /**
       
    76       * Returns CESMRAttachment from array index
       
    77       *
       
    78       *@param aIndex index of CESMRAttachment to be returned
       
    79       *@return object in the index
       
    80       */
       
    81      IMPORT_C const CESMRAttachment& AttachmentL(
       
    82              TInt aIndex ) const;
       
    83 
       
    84      /**
       
    85       * Removes CESMRAttachment from array index
       
    86       *
       
    87       *@param aIndex index of CESMRAttachment to be removed from array
       
    88       */
       
    89      IMPORT_C void RemoveAttachmentAtL(
       
    90              TInt aIndex );
       
    91 
       
    92 private: // Implementation
       
    93 
       
    94     CESMRAttachmentInfo();
       
    95     void ConstructL();
       
    96 
       
    97 private: // Data
       
    98     /// Own: Attachment objects
       
    99     RPointerArray<CESMRAttachment> iAttachments;
       
   100     };
       
   101 
       
   102 #endif // CESMRATTACHMENTINFO_H
       
   103 
       
   104 // EOF