messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/inc/unismsdataplugin_p.h
changeset 25 84d9eb65b26f
child 48 4f501b74aeb1
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 
       
    32 /**
       
    33  * Symbian specific implementation of the uni SMS plugin
       
    34  */
       
    35 class UniSMSDataPluginPrivate :public MMsvSessionObserver
       
    36 {
       
    37 
       
    38 public:
       
    39     /**
       
    40      * Constructor
       
    41      */
       
    42     UniSMSDataPluginPrivate(UniSMSDataPlugin* plugin);
       
    43 
       
    44     /**
       
    45      * Destructor
       
    46      */
       
    47     ~UniSMSDataPluginPrivate();
       
    48 
       
    49     /**
       
    50      *  Resets the datamodel
       
    51      */
       
    52     void reset();
       
    53 
       
    54     /**
       
    55      * sets the message id for which details needs to be fetched
       
    56      * @param message id
       
    57      */
       
    58     int setMessageId(int mId);
       
    59 
       
    60     /**
       
    61      * Get the body of the message
       
    62      * @param aBodyText, for message body
       
    63      */
       
    64     void body(QString& aBodyText);
       
    65 
       
    66     int messageSize();
       
    67 
       
    68     /**
       
    69      * List of the message TO recipients
       
    70      * @param list of the recipients
       
    71      */
       
    72     void toRecipientList(ConvergedMessageAddressList& mAddressList);
       
    73 
       
    74     /**
       
    75      * Address from which the message was received
       
    76      * @param messageAddress
       
    77      */
       
    78     void fromAddress(QString& messageAddress);
       
    79 
       
    80     /**
       
    81      * Time stamp of the message
       
    82      * @return time stamp of the created/received message
       
    83      */
       
    84     int timeStamp();
       
    85 
       
    86 	/**
       
    87 	 * Session with the Messaging server
       
    88 	 * @return CMsvSession*
       
    89 	 */
       
    90     CMsvSession* session();
       
    91     
       
    92 private:
       
    93     /**
       
    94      *  Extracts the name and address from the CMsvRecipientList
       
    95      */
       
    96     void extractNameAndAddress(const TDesC& aMsvAddress, TPtrC& aName,
       
    97                                TPtrC& aAddress);
       
    98     void initL();
       
    99     
       
   100     void setMessageIdL(int mId);
       
   101     
       
   102     /**
       
   103      * @see MMsvSessionObserver
       
   104      */
       
   105     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2,
       
   106            TAny* aArg3);
       
   107 
       
   108 private:
       
   109     CMsvSession* iMSession;
       
   110     CClientMtmRegistry* iMtmReg;
       
   111     CSmsClientMtm* iSmsClient;
       
   112     TMsvId iMessageId;
       
   113     UniSMSDataPlugin* q_ptr;
       
   114     TBool done;   
       
   115 };
       
   116 #endif