messagingapp/msgutils/unidatautils/unidatamodelplugins/unibiomessagedataplugin/inc/unibiomessagedataplugin.h
changeset 25 84d9eb65b26f
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
       
     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: SMS data model plugin.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef UNIBIOMESSAGEDATAPLUGIN_H_
       
    19 #define UNIBIOMESSAGEDATAPLUGIN_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include "unidatamodelplugininterface.h"
       
    23 
       
    24 /**
       
    25  * SMS data model plugin.
       
    26  * Implements the processing of a SMS message in Message Store.
       
    27  */
       
    28 
       
    29 class UniBioMessageDataPluginPrivate;
       
    30 
       
    31 class UniBioMessageDataPlugin : public QObject, public UniDataModelPluginInterface
       
    32 {
       
    33 Q_OBJECT
       
    34     Q_INTERFACES(UniDataModelPluginInterface)
       
    35 
       
    36 public:
       
    37     /**
       
    38      * constructor
       
    39      */
       
    40     UniBioMessageDataPlugin(QObject* parent = 0);
       
    41 
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     ~UniBioMessageDataPlugin();
       
    46     
       
    47     /**
       
    48      * Creates the new instance of the plugin
       
    49      * @return plugin instance
       
    50      */    
       
    51     QObject* createInstance();
       
    52 
       
    53     /**
       
    54      *  Reset the datamodel
       
    55      */
       
    56     void reset();
       
    57 
       
    58     /**
       
    59      * sets the message id for which details needs to be fetched
       
    60      * @param message id
       
    61      */
       
    62     int setMessageId(int mId);
       
    63 
       
    64     /**
       
    65      * Get the body of the message
       
    66      * @param aBodyText, for message body
       
    67      */
       
    68     void body(QString& aBodyText);
       
    69 
       
    70     /**
       
    71      * size of the message
       
    72      * @return size
       
    73      */
       
    74     int messageSize();
       
    75 
       
    76     /**
       
    77      * List of the message TO recipients
       
    78      * @param list of the recipients
       
    79      */
       
    80     void toRecipientList(ConvergedMessageAddressList& mAddressList);
       
    81     /**
       
    82      * List of the message cc recipients
       
    83      * @param list of the recipients
       
    84      */
       
    85     void ccRecipientList(ConvergedMessageAddressList& mAddressList);
       
    86 
       
    87     /**
       
    88      * List of the message bCC recipients
       
    89      * @param list of the recipients
       
    90      */
       
    91     void bccRecipientList(ConvergedMessageAddressList& mAddressList);
       
    92 
       
    93     /**
       
    94      * Address from which the message was received
       
    95      * @param messageAddress
       
    96      */
       
    97     void fromAddress(QString& messageAddress);
       
    98 
       
    99     /**
       
   100      * No. of attachments with the message
       
   101      * @return attachment count 
       
   102      */
       
   103     int attachmentCount();
       
   104 
       
   105     /**
       
   106      *  To check if the message has attachments
       
   107      *  @return true if attachment is present
       
   108      */
       
   109     bool hasAttachment();
       
   110 
       
   111     /**
       
   112      * list of attachments for a message 
       
   113      * @return attachemnt list
       
   114      */
       
   115     UniMessageInfoList attachmentList();
       
   116 
       
   117     /**
       
   118      *  Message type (SMS/MMS etc..)
       
   119      *  @return type of message 
       
   120      */
       
   121     QString messageType();
       
   122 
       
   123     /**
       
   124      * Priority of the message (high/low/medium)
       
   125      */
       
   126     MsgPriority messagePriority();
       
   127 
       
   128     /**
       
   129      * Number of objects asociated with a MMS message
       
   130      * @return count of objects
       
   131      */
       
   132     int objectCount();
       
   133 
       
   134     /**
       
   135      * The MMS object list
       
   136      * @return object list 
       
   137      */
       
   138     UniMessageInfoList objectList();
       
   139 
       
   140     /**
       
   141      * Number of slides associated with a MMS message
       
   142      * @return count of slides
       
   143      */
       
   144     int slideCount();
       
   145 
       
   146     /**
       
   147      * The MMS slide content 
       
   148      * @return slide list
       
   149      */
       
   150     UniMessageInfoList slideContent(int slidenum);
       
   151 
       
   152     /**
       
   153      * Time stamp of the message
       
   154      * @return time stamp of the created/received message
       
   155      */
       
   156     QDateTime timeStamp();
       
   157 
       
   158 
       
   159     /**
       
   160      * @see UniDataModelPluginInterface
       
   161      */
       
   162     void restore(CBaseMtm& mtm);
       
   163 
       
   164     /**
       
   165      * @see UniDataModelPluginInterface 
       
   166      */
       
   167 		QString subject();
       
   168     
       
   169 	/**
       
   170      * @see UniDataModelPluginInterface 
       
   171      */
       
   172 		CMsvSession* session();
       
   173 
       
   174 private:
       
   175     UniBioMessageDataPluginPrivate* d_ptr;
       
   176 };
       
   177 
       
   178 #endif