wvuing/wvuiprocess/Inc/MCAConversationMessage.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Interface for handling one message
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCACONVERSATIONMESSAGE_H
       
    20 #define MCACONVERSATIONMESSAGE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <badesca.h>
       
    24 
       
    25 #include "TEnumsPC.h"
       
    26 
       
    27 //	FORWARD CLASS DECLERATIONS
       
    28 class CFbsBitmap;
       
    29 
       
    30 
       
    31 // MDesCArray must not be fwd declared, or compiling test code will break
       
    32 // since it's a MACRO. hence the include to badesca.h
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  *  Interface for handling one message
       
    38  *
       
    39  *  @lib wvuiprocessng.dll
       
    40  *  @since 3.2
       
    41  */
       
    42 class MCAConversationMessage
       
    43     {
       
    44     public: // Definitions
       
    45         /**
       
    46          * Get timestamp when this message has been created.
       
    47          * For prioritization of message deletion and timestamping
       
    48          * chat messages
       
    49          */
       
    50         virtual const TTime& TimeStamp() const = 0;
       
    51 
       
    52 
       
    53     public: // Type of message
       
    54         /**
       
    55          * Type of message
       
    56          * @return Type of message. EMessageGroup, EMessagePersonal,
       
    57          *         EMessageSystem
       
    58          */
       
    59         virtual TEnumsPC::TMessageType MessageType() const = 0;
       
    60 
       
    61         /**
       
    62          * Type of messager
       
    63          * @return Type of message. EMessageFrom, EMessageTo, EMessageOther
       
    64          */
       
    65         virtual TEnumsPC::TMessagerType MessagerType() const = 0;
       
    66 
       
    67         /**
       
    68          * Type of content of message
       
    69          * @return Type of message. EMessageText, EMessagePicture
       
    70          */
       
    71         virtual TEnumsPC::TContentType ContentType() const = 0;
       
    72 
       
    73 
       
    74         /**
       
    75          * Returns the type of system message.
       
    76          * @return type of system message or
       
    77          *         TSystemMessageNone if not system message
       
    78          */
       
    79         virtual TEnumsPC::TSystemMessage SystemMessageType() = 0;
       
    80 
       
    81     public: // Content of message
       
    82 
       
    83         /**
       
    84          * Recipient of message.
       
    85          * @return Recipient of message. To whom the message is sent.
       
    86          */
       
    87         virtual const TDesC& Recipient() const = 0;
       
    88 
       
    89         /**
       
    90          * Sender of message
       
    91          * @return Sender of message. To who has sent the message.
       
    92          */
       
    93         virtual const TDesC& Sender() const = 0;
       
    94 
       
    95         /**
       
    96          * Textual content of message
       
    97          * @return Textual content.
       
    98          */
       
    99         virtual const TDesC& Text() const = 0;
       
   100 
       
   101         /**
       
   102          * Mime type of content.
       
   103          * @return Mime type of content.
       
   104          */
       
   105         virtual const TDesC8& MimeType() const = 0;
       
   106 
       
   107         /**
       
   108          * Content data in decriptor
       
   109          * @return Content data in descriptor
       
   110          */
       
   111         virtual const TDesC8& ContentData() const = 0;
       
   112 
       
   113         /**
       
   114          * Set content data for message
       
   115          * @param aContent. Ownership is transferred.
       
   116          */
       
   117         virtual void SetContentData( HBufC8* aContent ) = 0;
       
   118 
       
   119         /**
       
   120          * Current processing state. Might be different for different
       
   121          * content types
       
   122          * @return Processing state of message.
       
   123          */
       
   124         virtual TEnumsPC::TContentProcessState ContentProcessState() const = 0;
       
   125 
       
   126         /**
       
   127          * Set current processing state.
       
   128          * @aNewState New processing state
       
   129          */
       
   130         virtual void SetProcessState( TEnumsPC::TContentProcessState aNewState ) = 0;
       
   131 
       
   132         /**
       
   133          * Set the part of message to be forwarded,
       
   134          * used when forwarding a highlighted item from a message.
       
   135          * @param aFwdPart pointer to highlighted item descriptor,
       
   136          *                 use NULL to clear forward message part.
       
   137          */
       
   138         virtual void SetForwardPartL( const HBufC* aFwdPart ) = 0;
       
   139 
       
   140         /**
       
   141          * Forwarded part of message.
       
   142          * @return forwarded part of message or NULL if not set
       
   143          */
       
   144         virtual const HBufC* ForwardPart() const = 0;
       
   145 
       
   146 
       
   147     public: // Content processing.
       
   148 
       
   149         /**
       
   150          * Add content processor for message
       
   151          * @param aThumbSize
       
   152          * @ returns void
       
   153          */
       
   154         virtual void AddContentProcessorL( TSize aThumbSize ) = 0;
       
   155 
       
   156 
       
   157         /**
       
   158          * Release temporary content data
       
   159          */
       
   160         virtual void ReleaseTemporaryContentData() = 0;
       
   161 
       
   162 
       
   163         /**
       
   164          * Request processing remove. If processing is already started. Cancels processing.
       
   165          */
       
   166         virtual void RemoveProcessingL() = 0;
       
   167 
       
   168 
       
   169         /**
       
   170          * Get thumbnail bitmap
       
   171          * @return Thumbnail. Ownership is not tranferred
       
   172          */
       
   173         virtual CFbsBitmap* Thumbnail() const = 0;
       
   174 
       
   175     public:
       
   176 
       
   177         //fix - refer Ui Spec Approved Version 1.0
       
   178         //(Instant Messaging NG 001 151006.pdf)
       
   179         //Section 10.2.10 Pg 131 -
       
   180         //"In case user has saved the image already or sent it
       
   181         //by himself, this option(save) is not available."
       
   182 
       
   183         //The following API's are used, if message content is a image
       
   184         //This is part of new implementation required for wvuing
       
   185         //While merging with wvui20, please make sure you preserve
       
   186         //this change also.
       
   187         /**
       
   188          * API used to set the iSaved Flag to ETrue
       
   189          * if the image is saved by the user.
       
   190          * @param aSaved - ETrue if Image is Saved by the user
       
   191          * @return void
       
   192          */
       
   193         virtual void SetImageAsSaved( const TBool aSaved ) = 0;
       
   194 
       
   195         /**
       
   196          * API used to check whether the image was
       
   197          * SAVED or not.
       
   198          * @return TBool - ETrue if the user has already saved the image
       
   199          *   else EFalse
       
   200          */
       
   201         virtual TBool IsImageSaved() = 0;
       
   202 
       
   203         /**
       
   204          * Is message failed or not
       
   205          * @return ETrue if is, EFalse if not.
       
   206          */
       
   207         virtual TBool FailedMessage() const = 0;
       
   208 
       
   209     public: // For deletion of message
       
   210 
       
   211         /**
       
   212          * Virtual destructor
       
   213          */
       
   214         virtual ~MCAConversationMessage() {};
       
   215     };
       
   216 
       
   217 #endif      // MCACONVERSATIONMESSAGE_H
       
   218 
       
   219 // End of File
       
   220