messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h
changeset 70 a15d9966050f
parent 52 12db4185673b
--- a/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h	Thu Sep 02 20:23:03 2010 +0300
+++ b/messagingapp/msgui/unifiedviewer/inc/unifiedviewer.h	Fri Sep 17 08:28:39 2010 +0300
@@ -18,15 +18,17 @@
 #ifndef UNIFIED_VIEWER_H
 #define UNIFIED_VIEWER_H
 
-#ifdef BUILD_UNI_VIEWER_DLL
-#define UNI_VIEWER_DLL Q_DECL_EXPORT
+#ifdef MSGUI_UNIT_TEST
+ #define UNI_VIEWER_DLL
 #else
-#define UNI_VIEWER_DLL Q_DECL_IMPORT
+ #ifdef BUILD_UNI_VIEWER_DLL
+  #define UNI_VIEWER_DLL Q_DECL_EXPORT
+ #else
+  #define UNI_VIEWER_DLL Q_DECL_IMPORT
+ #endif
 #endif
 
-#include <sqldb.h>
 #include "msgbaseview.h"
-
 #include "convergedmessage.h"
 
 class UniViewerFeeder;
@@ -58,7 +60,30 @@
     /**
      * Populates the content on the widget
      */
-    void populateContent(const qint32 messageId, bool update, int msgCount);
+    void populateContent(const qint32 messageId, bool update, int msgCount, qint64 conversationId = -1);
+
+    /**
+     * Event handler
+     * @param key Key code
+     * @return true if key event handled else false.
+     * @see MsgBaseView
+     */
+    bool handleKeyEvent(int key);
+
+public slots:
+
+    /**
+     * Clears the content on the widget
+     */
+    void clearContent();
+
+    // Used for internal testing will be removed
+    void handleFwdAction();
+
+    /**
+     * Handle delete
+     */
+    void handleDeleteAction();
 
 protected:
 
@@ -87,20 +112,11 @@
      */
     void launchEditor(MsgBaseView::UniEditorOperation operation);
 
-public slots:
-
     /**
-     * Clears the content on the widget
+     * Launches the dialer interface.
+     * @args number Number to be called.
      */
-    void clearContent();
-
-    // Used for internal testing will be removed
-    void handleFwdAction();
-    
-    /**
-     * Handle delete 
-     */     
-    void handleDeleteAction();
+    void call(const QString &number);
 
 private slots:
     /**
@@ -146,6 +162,11 @@
     UniContentsWidget* mContentsWidget;
 
     /**
+     * Conversation ID
+     */
+    qint64 mConversationID;
+
+    /**
      * Contact id
      */
     qint32 mContactId;
@@ -154,11 +175,18 @@
      * Message id
      */
     qint32 mMessageId;
-	
+
     /**
      * Message count
      */
     int mMsgCount;
+
+#ifdef MSGUI_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestUnifiedViewer;
+#endif
 };
 
 #endif