meetingrequest/mrcalremoteattachment/remoteattachment/inc/ccalremoteattachment.h
branchRCL_3
changeset 33 da5135c61bad
equal deleted inserted replaced
32:a3a1ae9acec6 33:da5135c61bad
       
     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 CCALREMOTEATTACHMENT_H
       
    19 #define CCALREMOTEATTACHMENT_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "mcalremoteattachment.h"
       
    23 
       
    24 /**
       
    25  * CCalRemoteAttachment encapsulates one attachment information
       
    26  */
       
    27 NONSHARABLE_CLASS( CCalRemoteAttachment ) : 
       
    28     public CBase,
       
    29     public MCalRemoteAttachment
       
    30     {
       
    31 public: // Construction and destruction
       
    32     
       
    33     /**
       
    34      * Creates and initializes new CCalRemoteAttachment object.
       
    35      * Ownership is transferred to caller.
       
    36      * 
       
    37      * @param aAttachmentIdentifier Attachment identifier
       
    38      * @param aAttachmentLabel Attachment label
       
    39      * @param aAttachmentSizeInBytes of attachment
       
    40      * @param aState state of attachment download
       
    41      */
       
    42     IMPORT_C static CCalRemoteAttachment* NewL(
       
    43             const TDesC& aAttachmentIdentifier,
       
    44             const TDesC& aAttachmentLabel,
       
    45             TInt aAttachmentSizeInBytes,
       
    46             MCalRemoteAttachment::TCalRemoteAttachmentState aState );
       
    47     
       
    48     /**
       
    49      * C++ destructor 
       
    50      */
       
    51     IMPORT_C ~CCalRemoteAttachment();
       
    52     
       
    53 public: // From MCalRemoteAttachment
       
    54     void SetAttachmentLabelL(
       
    55             const TDesC& aAttachmentLabel );
       
    56     const TDesC& AttachmentLabel() const;
       
    57     void SetAttachmentIdentifierL(
       
    58             const TDesC& aAttachmentIdentifier );
       
    59     const TDesC& AttachmentIdentifier() const;
       
    60     void SetAttachmentSize(
       
    61             TInt aAttachmentSizeInBytes );
       
    62     TInt AttachmentSizeInBytes() const;
       
    63     void SetAttachmentState(
       
    64             MCalRemoteAttachment::TCalRemoteAttachmentState aAttachmentState );
       
    65     MCalRemoteAttachment::TCalRemoteAttachmentState AttachmenState() const;
       
    66     
       
    67 private: // Implementation
       
    68     CCalRemoteAttachment(
       
    69             TInt aAttachmentSizeInBytes,
       
    70             MCalRemoteAttachment::TCalRemoteAttachmentState aState );
       
    71     void ConstructL(
       
    72             const TDesC& aAttachmentIdentifier,
       
    73             const TDesC& aAttachmentLabel );
       
    74     
       
    75 private: // Data
       
    76     /// Own: Attachment identifier
       
    77     HBufC* iIdentifier;
       
    78     /// Own: Attachment label
       
    79     HBufC* iLabel;
       
    80     /// Own: Attachment size in bytes
       
    81     TInt iSizeInBytes;
       
    82     /// Own: Attachment download state
       
    83     MCalRemoteAttachment::TCalRemoteAttachmentState iState;
       
    84     };
       
    85 
       
    86 #endif // CCALREMOTEATTACHMENT_H
       
    87 
       
    88 // EOF