messagingapp/msgutils/unidatamodel/unismsdataplugin/inc/unismsdataplugin_p.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
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: Private implementaion of sms data model plugin.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef UNISMSDATAPLUGINPRIVATE_H_
       
    19 #define UNISMSDATAPLUGINPRIVATE_H_
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 //Forward Declarations
       
    26 class CClientMtmRegistry;
       
    27 class ConvergedMessage;
       
    28 class UniSMSDataPlugin;
       
    29 class CSmsClientMtm;
       
    30 class CMsvSession;
       
    31 class SessionEventHandler;
       
    32 
       
    33 /**
       
    34  * Symbian specific implementation of the uni SMS plugin
       
    35  */
       
    36 class UniSMSDataPluginPrivate
       
    37 {
       
    38 
       
    39 public:
       
    40     /**
       
    41      * Constructor
       
    42      */
       
    43     UniSMSDataPluginPrivate(UniSMSDataPlugin* plugin);
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      */
       
    48     ~UniSMSDataPluginPrivate();
       
    49 
       
    50     /**
       
    51      *  Resets the datamodel
       
    52      */
       
    53     void reset();
       
    54 
       
    55     /**
       
    56      * sets the message id for which details needs to be fetched
       
    57      * @param message id
       
    58      */
       
    59     int setMessageId(int mId);
       
    60 
       
    61     /**
       
    62      * Get the body of the message
       
    63      * @param aBodyText, for message body
       
    64      */
       
    65     void body(QString& aBodyText);
       
    66 
       
    67     int messageSize();
       
    68 
       
    69     /**
       
    70      * List of the message TO recipients
       
    71      * @param list of the recipients
       
    72      */
       
    73     void toRecipientList(ConvergedMessageAddressList& mAddressList);
       
    74 
       
    75     /**
       
    76      * Address from which the message was received
       
    77      * @param messageAddress
       
    78      */
       
    79     void fromAddress(QString& messageAddress);
       
    80 
       
    81     /**
       
    82      * Time stamp of the message
       
    83      * @return time stamp of the created/received message
       
    84      */
       
    85     int timeStamp();
       
    86 
       
    87 	/**
       
    88 	 * Session with the Messaging server
       
    89 	 * @return CMsvSession*
       
    90 	 */
       
    91     CMsvSession* session();
       
    92     
       
    93 private:
       
    94     /**
       
    95      *  Extracts the name and address from the CMsvRecipientList
       
    96      */
       
    97     void extractNameAndAddress(const TDesC& aMsvAddress, TPtrC& aName,
       
    98                                TPtrC& aAddress);
       
    99     void initL();
       
   100     
       
   101     void setMessageIdL(int mId);
       
   102 
       
   103 private:
       
   104     CMsvSession* iMSession;
       
   105     CClientMtmRegistry* iMtmReg;
       
   106     CSmsClientMtm* iSmsClient;
       
   107     TMsvId iMessageId;
       
   108     UniSMSDataPlugin* q_ptr;
       
   109     TBool done;
       
   110     SessionEventHandler *iSessionHandler;
       
   111 };
       
   112 #endif