emailservices/emailclientapi/inc/emailattachment.h
branchRCL_3
changeset 24 d189ee25cf9d
parent 8 e1b6206813b4
child 25 3533d4323edc
equal deleted inserted replaced
23:dcf0eedfc1a3 24:d189ee25cf9d
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    21 
    21 
    22 // INCLUDES
    22 // INCLUDES
    23 #include <e32std.h>
    23 #include <e32std.h>
    24 #include <e32base.h>
    24 #include <e32base.h>
    25 
    25 
    26 #include "cfsmailclient.h"
    26 #include "CFSMailClient.h"
    27 #include <memailcontent.h>
    27 #include <memailcontent.h>
    28 #include "emailapiutils.h"
    28 #include "emailapiutils.h"
    29 
    29 
    30 using namespace EmailInterface;
    30 using namespace EmailInterface;
    31 
    31 
    64         const TMessageContentId& aMsgContentId,    
    64         const TMessageContentId& aMsgContentId,    
    65         CFSMailMessagePart *aAtt,
    65         CFSMailMessagePart *aAtt,
    66         const TDataOwner aOwner );    
    66         const TDataOwner aOwner );    
    67 
    67 
    68 public: // from MEmailInterface
    68 public: // from MEmailInterface
    69     virtual TEmailTypeId InterfaceId() const;
    69     TEmailTypeId InterfaceId() const;
    70     
    70     
    71     virtual void Release();
    71     void Release();
    72 
    72 
    73 public: // from MEmailAttachment
    73 public: // from MEmailAttachment
    74     /**
    74     /**
    75     * Returns file handle of this attachment. If the attachment is
    75     * Returns file handle of this attachment. If the attachment is
    76     * not associated with a file, null file handle is returned.
    76     * not associated with a file, null file handle is returned.
    77     */
    77     */
    78     virtual RFile FileL() const;
    78     RFile FileL() const;
    79 
    79 
    80     /**
    80     /**
    81     * Sets file name field
    81     * Sets file name field
    82     */
    82     */
    83     virtual void SetFileNameL( const TDesC& aFileName );
    83     void SetFileNameL( const TDesC& aFileName );
    84 
    84 
    85     /**
    85     /**
    86     * Returns file name or null pointer descriptor if attachment
    86     * Returns file name or null pointer descriptor if attachment
    87     * is not associated with any file
    87     * is not associated with any file
    88     */
    88     */
    89     virtual TPtrC FileNameL() const;
    89     TPtrC FileNameL() const;
    90     
    90     
    91     
    91     
    92 public: // from MEmailMessageContent
    92 public: // from MEmailMessageContent
    93     
    93     
    94     virtual TMessageContentId Id() const;
    94     TMessageContentId Id() const;
    95 
    95 
    96     virtual TPtrC ContentType() const;
    96     TPtrC ContentType() const;
    97 
    97 
    98     virtual void SetContentType( const TDesC& aContentType );
    98     void SetContentType( const TDesC& aContentType );
    99 
    99 
   100     virtual TPtrC ContentId() const;
   100     TPtrC ContentId() const;
   101 
   101 
   102     virtual void SetContentId( const TDesC& aContentId );
   102     void SetContentId( const TDesC& aContentId );
   103 
   103 
   104     virtual TPtrC ContentDescription() const;
   104     TPtrC ContentDescription() const;
   105 
   105 
   106     virtual void SetContentDescription( const TDesC& aContentDescription );
   106     void SetContentDescription( const TDesC& aContentDescription );
   107 
   107 
   108     virtual TPtrC ContentDisposition() const;
   108     TPtrC ContentDisposition() const;
   109 
   109 
   110     virtual void SetContentDisposition( const TDesC& aContentDisposition );
   110     void SetContentDisposition( const TDesC& aContentDisposition );
   111 
   111 
   112     virtual TPtrC ContentClass() const;
   112     TPtrC ContentClass() const;
   113 
   113 
   114     virtual void SetContentClass( const TDesC& aContentClass );
   114     void SetContentClass( const TDesC& aContentClass );
   115 
   115 
   116     virtual TInt AvailableSize() const;
   116     TInt AvailableSize() const;
   117 
   117 
   118     virtual TInt TotalSize() const;
   118     TInt TotalSize() const;
   119 
   119 
   120     virtual TPtrC ContentL() const;
   120     TPtrC ContentL() const;
   121 
   121 
   122     virtual void SetContentL( const TDesC& aContent );
   122     void SetContentL( const TDesC& aContent );
   123 
   123 
   124     virtual void FetchL( MEmailFetchObserver& aObserver );
   124     void FetchL( MEmailFetchObserver& aObserver );
   125 
   125 
   126     virtual void CancelFetch();
   126     void CancelFetch();
   127 
   127 
   128     virtual void SaveToFileL( const TDesC& aPath );
   128     void SaveToFileL( const TDesC& aPath );
   129 
   129 
   130     virtual MEmailMultipart* AsMultipartOrNull() const;
   130     MEmailMultipart* AsMultipartOrNull() const;
   131     
   131     
   132     virtual MEmailTextContent* AsTextContentOrNull() const;
   132     MEmailTextContent* AsTextContentOrNull() const;
   133 
   133 
   134     virtual MEmailAttachment* AsAttachmentOrNull() const;
   134     MEmailAttachment* AsAttachmentOrNull() const;
   135     
   135     
   136 private:
   136 private:
   137 
   137 
   138     /**
   138     /**
   139      * Constructor for performing 1st stage construction
   139      * Constructor for performing 1st stage construction
   156     CEmailMessageContent*   iEmailMsgContent;
   156     CEmailMessageContent*   iEmailMsgContent;
   157     TDataOwner iOwner;
   157     TDataOwner iOwner;
   158     };
   158     };
   159 
   159 
   160 #endif // EMAILATTACHMENT_H
   160 #endif // EMAILATTACHMENT_H
       
   161 
       
   162 // End of file