emailservices/emailclientapi/inc/emailmultipart.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".
    17 
    17 
    18 
    18 
    19 #ifndef EMAILMULTIPART_H_
    19 #ifndef EMAILMULTIPART_H_
    20 #define EMAILMULTIPART_H_
    20 #define EMAILMULTIPART_H_
    21 // INCLUDES
    21 // INCLUDES
    22 #include "cfsmailclient.h"
    22 #include "CFSMailClient.h"
    23 #include <memailcontent.h>
    23 #include <memailcontent.h>
    24 #include "emailapiutils.h"
    24 #include "emailapiutils.h"
    25 
    25 
    26 using namespace EmailInterface;
    26 using namespace EmailInterface;
    27 
    27 
    40             const TDataOwner aOwner );
    40             const TDataOwner aOwner );
    41     
    41     
    42     ~CEmailMultipart();
    42     ~CEmailMultipart();
    43     
    43     
    44 public: // from MEmailInterface
    44 public: // from MEmailInterface
    45     virtual TEmailTypeId InterfaceId() const;
    45     TEmailTypeId InterfaceId() const;
    46     
    46     
    47     virtual void Release();
    47     void Release();
    48 
    48 
    49 public: // from MEmailMessageContent
    49 public: // from MEmailMessageContent
    50     
    50     
    51     virtual TMessageContentId Id() const;
    51     TMessageContentId Id() const;
    52 
    52 
    53     virtual TPtrC ContentType() const;
    53     TPtrC ContentType() const;
    54 
    54 
    55     virtual void SetContentType( const TDesC& aContentType );
    55     void SetContentType( const TDesC& aContentType );
    56 
    56 
    57     virtual TPtrC ContentId() const;
    57     TPtrC ContentId() const;
    58 
    58 
    59     virtual void SetContentId( const TDesC& aContentId );
    59     void SetContentId( const TDesC& aContentId );
    60 
    60 
    61     virtual TPtrC ContentDescription() const;
    61     TPtrC ContentDescription() const;
    62 
    62 
    63     virtual void SetContentDescription( const TDesC& aContentDescription );
    63     void SetContentDescription( const TDesC& aContentDescription );
    64 
    64 
    65     virtual TPtrC ContentDisposition() const;
    65     TPtrC ContentDisposition() const;
    66 
    66 
    67     virtual void SetContentDisposition( const TDesC& aContentDisposition );
    67     void SetContentDisposition( const TDesC& aContentDisposition );
    68 
    68 
    69     virtual TPtrC ContentClass() const;
    69     TPtrC ContentClass() const;
    70 
    70 
    71     virtual void SetContentClass( const TDesC& aContentClass );
    71     void SetContentClass( const TDesC& aContentClass );
    72 
    72 
    73     virtual TInt AvailableSize() const;
    73     TInt AvailableSize() const;
    74 
    74 
    75     virtual TInt TotalSize() const;
    75     TInt TotalSize() const;
    76 
    76 
    77     virtual TPtrC ContentL() const;
    77     TPtrC ContentL() const;
    78 
    78 
    79     virtual void SetContentL( const TDesC& aContent );
    79     void SetContentL( const TDesC& aContent );
    80 
    80 
    81     virtual void FetchL( MEmailFetchObserver& aObserver );
    81     void FetchL( MEmailFetchObserver& aObserver );
    82 
    82 
    83     virtual void CancelFetch();
    83     void CancelFetch();
    84 
    84 
    85     virtual void SaveToFileL( const TDesC& aPath );
    85     void SaveToFileL( const TDesC& aPath );
    86 
    86 
    87     virtual MEmailMultipart* AsMultipartOrNull() const;
    87     MEmailMultipart* AsMultipartOrNull() const;
    88     
    88     
    89     virtual MEmailTextContent* AsTextContentOrNull() const;
    89     MEmailTextContent* AsTextContentOrNull() const;
    90 
    90 
    91     virtual MEmailAttachment* AsAttachmentOrNull() const;
    91     MEmailAttachment* AsAttachmentOrNull() const;
    92     
    92     
    93 public: // from MEmailMultipart
    93 public: // from MEmailMultipart
    94     virtual TInt PartCountL();
    94     TInt PartCountL();
    95 
    95 
    96     virtual MEmailMessageContent* PartByIndexL( const TUint aIndex ) const;
    96     MEmailMessageContent* PartByIndexL( const TUint aIndex ) const;
    97 
    97 
    98     virtual void DeletePartL( const TUint aIndex );
    98     void DeletePartL( const TUint aIndex );
    99 
    99 
   100     virtual void AddPartL(
   100     void AddPartL(
   101         const MEmailMessageContent& aPart,
   101         const MEmailMessageContent& aPart,
   102         const TUint aPos );
   102         const TUint aPos );
   103     
   103     
   104 public: // for internal usage
   104 public: // for internal usage
   105     void SetOwner( const TDataOwner aOwner );
   105     void SetOwner( const TDataOwner aOwner );
   106     
   106     
   107     
   107     
   108 private:
   108 private:
   109     CEmailMultipart( const TDataOwner aOwner );
   109     CEmailMultipart( const TDataOwner aOwner );
   110     
   110     
   111     void ConstructL( CPluginData& aPluginData, const TMessageContentId& aMsgContentId, CFSMailMessagePart* aPart);
   111     void ConstructL( CPluginData& aPluginData, const TMessageContentId& aMsgContentId, CFSMailMessagePart* aPart );
   112     
   112     
   113 private: // Private data        
   113 private: // Private data        
   114     CEmailMessageContent* iEmailMsgContent;
   114     CEmailMessageContent* iEmailMsgContent;
   115     RArray<TFSMailMsgId> iChildParts;
   115     RArray<TFSMailMsgId> iChildParts;
   116     TUint iChildPartCount;
   116     TUint iChildPartCount;
   117     TDataOwner iOwner;
   117     TDataOwner iOwner;
   118 };
   118 };
   119 
   119 
   120 #endif /* EMAILMULTIPART_H_ */
   120 #endif // EMAILMULTIPART_H_
       
   121 
       
   122 // End of file
       
   123