messagingapp/msgui/unifiedviewer/inc/univiewerfeeder_p.h
branchRCL_3
changeset 26 ebe688cedc25
equal deleted inserted replaced
25:fa1df4b99609 26:ebe688cedc25
       
     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: Feeder Private class for unified viewer. Fetches data from the
       
    15  *              message store for the given message id.
       
    16  *
       
    17  */
       
    18 #ifndef UNIVIEWER_FEEDER_PRIVATE_H
       
    19 #define UNIVIEWER_FEEDER_PRIVATE_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include <msvapi.h>
       
    25 
       
    26 #include "convergedmessage.h"
       
    27 #include "unidatamodelplugininterface.h"
       
    28 
       
    29 class QDateTime;
       
    30 class UniViewerFeeder;
       
    31 class CMsvSession;
       
    32 class UniDataModelPluginInterface;
       
    33 class UniDataModelLoader;
       
    34 
       
    35 /**
       
    36  * UniViewerFeederPrivate
       
    37  * Feeder Private class for unified viewer. Fetches data from the
       
    38  * message store for the given message id.
       
    39  */
       
    40 class UniViewerFeederPrivate
       
    41 {
       
    42 public:
       
    43     /**
       
    44      * Destructor.
       
    45      */
       
    46     ~UniViewerFeederPrivate();
       
    47 
       
    48     /**
       
    49      * Constructor
       
    50      * @param msgId message id.
       
    51      * @param feeder feeder object.
       
    52      */
       
    53     UniViewerFeederPrivate(qint32 msdId,
       
    54                            UniViewerFeeder* feeder);
       
    55 
       
    56     /**
       
    57      * Fetches message details from the store.
       
    58      */
       
    59     void fetchDetails();
       
    60 
       
    61     /**
       
    62      * Returns the message type.
       
    63      * @return  message type.
       
    64      */
       
    65     qint32 msgType();
       
    66 
       
    67     /**
       
    68      * Returns the time stamp.
       
    69      * @return  time stamp of the message.
       
    70      */
       
    71     QDateTime timeStamp();
       
    72 
       
    73     /**
       
    74      * hasAttachments
       
    75      * @return true/false based on if message has attachments
       
    76      */
       
    77     bool hasAttachments();
       
    78 
       
    79     /**
       
    80      * attachmentList
       
    81      * @return list of current message's attachments, with size and mimetype info
       
    82      */
       
    83     UniMessageInfoList attachmentsList();
       
    84 
       
    85     /**
       
    86      * attachmentCount
       
    87      * @return number of attachments in the message
       
    88      */
       
    89     int attachmentCount();
       
    90 
       
    91     /**
       
    92      * objectsList
       
    93      * @return list of current message's objects, with size and mimetype info
       
    94      */
       
    95     UniMessageInfoList objectsList();
       
    96 
       
    97     /**
       
    98      * objectCount
       
    99      * @return count of media objects in SMIL presentation.
       
   100      * NOTE: Smil attachment is _not_ counted as object.
       
   101      */
       
   102     int objectCount();
       
   103 
       
   104     /**
       
   105      * slideCount
       
   106      * @return count of slides in SMIL presentation.
       
   107      */
       
   108     int slideCount();
       
   109 
       
   110     /**
       
   111      * slideContent
       
   112      * @return list of media objects in given slide
       
   113      */
       
   114     UniMessageInfoList slideContent(int slidenum);
       
   115 
       
   116     /**
       
   117      * Updates  the content by fetching new details
       
   118      * @param msgId message id
       
   119      * @param msgType message type
       
   120      */
       
   121     void updateContent(qint32 msgId);
       
   122 
       
   123     /**
       
   124      * toAddressList
       
   125      * @return list of to address list
       
   126      */
       
   127     ConvergedMessageAddressList toAddressList();
       
   128 
       
   129     /**
       
   130      * ccAddressList
       
   131      * @return list of cc address list
       
   132      */
       
   133     ConvergedMessageAddressList ccAddressList();
       
   134 
       
   135     /**
       
   136      * bccAddressList
       
   137      * @return list of Bcc address list
       
   138      */
       
   139     ConvergedMessageAddressList bccAddressList();
       
   140 
       
   141     /**
       
   142      * Finds total recipient count
       
   143      * @return total recipient count
       
   144      */
       
   145     int recipientCount();
       
   146 
       
   147     /**
       
   148      * messageSize
       
   149      * @return int
       
   150      */
       
   151     int messageSize();
       
   152 
       
   153     /**
       
   154      * clearContent
       
   155      * @void
       
   156      */
       
   157     void clearContent();
       
   158 
       
   159     /**
       
   160      * get the from address and alias of a message
       
   161      * @param from address
       
   162      * @param alias
       
   163      * @void 
       
   164      */
       
   165     void fromAddressAndAlias(QString& from, QString& alias);
       
   166     
       
   167     /**
       
   168       * whether the message is incoming Or outgoing.
       
   169       * @return bool
       
   170       */
       
   171     bool isIncoming();
       
   172     
       
   173     /**
       
   174       * returns the priority of the message.
       
   175       * @return int
       
   176       */
       
   177     int priority();
       
   178     
       
   179     /**
       
   180       * gets the subject of the message
       
   181       */
       
   182     QString subject();
       
   183     
       
   184     /**
       
   185      * Returns the sending state of the message.
       
   186      */
       
   187     int sendingState();
       
   188 
       
   189 private:
       
   190     /**
       
   191      * initialise the symbian constructions.
       
   192      */
       
   193     void initL(qint32 msgId);
       
   194 
       
   195 private:
       
   196     /**
       
   197      * Ptr to QT class UniViewerFeeder.
       
   198      * Not Own.
       
   199      */
       
   200     UniViewerFeeder* q_ptr;
       
   201 
       
   202     /**
       
   203      * MessageType
       
   204      */
       
   205     int mMessageType;
       
   206 
       
   207     /**
       
   208      * Msv Entry
       
   209      */
       
   210     TMsvEntry mEntry;
       
   211 
       
   212     /**
       
   213      * Message Id
       
   214      */
       
   215     qint32 mMsgId;
       
   216 
       
   217     /**
       
   218      * Slide Count.
       
   219      */
       
   220     int mSlideCount;
       
   221 
       
   222     /**
       
   223      * interface to fetch data
       
   224      */
       
   225     UniDataModelPluginInterface* mPluginInterface;
       
   226 
       
   227     /**
       
   228      * plugin loader
       
   229      */
       
   230     UniDataModelLoader* mPluginLoader;
       
   231     /**
       
   232      * To address list
       
   233      * owned.
       
   234      */
       
   235     ConvergedMessageAddressList mToAddressList;
       
   236 
       
   237     /**
       
   238      * CC address list
       
   239      * owned.
       
   240      */
       
   241     ConvergedMessageAddressList mCcAddressList;
       
   242 
       
   243     /**
       
   244      * CC address list
       
   245      * owned.
       
   246      */
       
   247     ConvergedMessageAddressList mBccAddressList;
       
   248 
       
   249     /**
       
   250      * Msv Session.
       
   251      * not Owned.
       
   252      */
       
   253     CMsvSession* mSession;
       
   254       
       
   255 };
       
   256 
       
   257 #endif // UNIVIEWER_FEEDER_PRIVATE_H
       
   258 // EOF