messagingapp/msgui/appengine/tsrc/testconversationengine/inc/testconversationengine.h
changeset 27 e4592d119491
child 34 84197e66a4bd
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
       
     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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef T_CONVERSATIONENGINE_H_
       
    19 #define T_CONVERSATIONENGINE_H_
       
    20 #ifdef BUILD_TEST_DLL
       
    21 #define TEST_EXPORT Q_DECL_EXPORT
       
    22 #else
       
    23 #define TEST_EXPORT Q_DECL_IMPORT
       
    24 #endif
       
    25 
       
    26 // INCLUDES
       
    27 #include <QtTest/QtTest>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class TConversationUpdateHandler;
       
    31 
       
    32 
       
    33 class TEST_EXPORT TConversationEngine: public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 private slots:
       
    38 
       
    39     /**
       
    40      * Intializes component for testing
       
    41      */
       
    42     void initTestCase();
       
    43 
       
    44     /**
       
    45      * Initilazes the test case data to be executed
       
    46      */
       
    47     void init();
       
    48 
       
    49     /**
       
    50      *  Fetches the conversation list from server
       
    51      */
       
    52     void GetConversationsFromServer();
       
    53 
       
    54     /**
       
    55      *  Fetches the conversation list and 
       
    56      *  updates conversation view 
       
    57      */
       
    58     void FetchConversationsAndUpdateCV();
       
    59 
       
    60     /**
       
    61      *  Checks current conversaton Id 
       
    62      */
       
    63     void CheckCurrentConversationID();
       
    64     
       
    65     /**
       
    66      *  Mark the conversation status read 
       
    67      *  and update conversation view  
       
    68      */
       
    69     void MarkConversationReadAndUpdateCV();
       
    70     
       
    71     /**
       
    72      *  Delete the conversation and 
       
    73      *  update conversation view  
       
    74      */
       
    75     void DeleteConversationAndUpdateCV();
       
    76 
       
    77     /**
       
    78      *  Notify new conversation entry and 
       
    79      *  update conversation view  
       
    80      */
       
    81     void NotifyNewConversationEntryAndUpdateCV();
       
    82 
       
    83     /**
       
    84      *  Notify recieved conversation client list 
       
    85      *  and update conversation list/summary view  
       
    86      */
       
    87     void NotifyConversationClientListAndUpdateCLV();
       
    88 
       
    89     /**
       
    90      *  Get contact details from conversation id 
       
    91      */
       
    92     void GetContactDetailsFromConversationID();
       
    93 
       
    94     /**
       
    95      *  Get conversation id from contact ID  
       
    96      */
       
    97     void GetConversationIDFromContatcID();
       
    98 
       
    99     /**
       
   100      *  Notify Modified conversation client and update
       
   101      *  conversation summary list/summary view 
       
   102      */
       
   103     void NotifyModifyConversationClientAndUpdateCLV();
       
   104 
       
   105     /**
       
   106      *  Notify Deleted conversation client 
       
   107      *  and update conversation list/summary view    
       
   108      */
       
   109     void NotifyDeleteConversationClientAndUpdateCLV();
       
   110 
       
   111     /**
       
   112      *  Notify new conversation client 
       
   113      *  and update conversation list/summary view    
       
   114      */
       
   115     void NotifyNewConversationClientAndUpdateCLV();
       
   116 
       
   117     /**
       
   118      *  Get conversation id from contact address 
       
   119      */
       
   120     void GetConversationIDFromAddress();
       
   121 
       
   122     /**
       
   123      *  Fetch more conversations from server  
       
   124      */
       
   125     void FetchMoreConversations();
       
   126 
       
   127     /**
       
   128      *  Clear conversation from conversation view
       
   129      */
       
   130     void ClearConversations();
       
   131 
       
   132     /**
       
   133      *  Get drafts model from conversation engine
       
   134      */
       
   135     void GetDraftsModelFromConversationEngine();
       
   136 
       
   137     /**
       
   138      * Clean the test case data
       
   139      */
       
   140     void cleanup();
       
   141 
       
   142     /**
       
   143      * Delete the initialized component for testing
       
   144      */
       
   145     void cleanupTestCase();
       
   146     
       
   147 private:
       
   148     
       
   149     TConversationUpdateHandler* iConvUpdateHandler; 
       
   150 };
       
   151 #endif /* T_CONVERSATIONENGINE_H_ */