bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp
changeset 63 bcf742120177
parent 52 4545c04e61e1
--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp	Wed Aug 18 09:59:05 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp	Fri Sep 17 08:30:56 2010 +0300
@@ -32,12 +32,14 @@
 #include "btsenddialogwidget.h"
 #include "btdevicedialogrecvquerywidget.h"
 #include "btrecvcompleteddialogwidget.h"
+#include "btdeviceinfowidget.h"
 #include <hbtranslator.h>
 
 Q_EXPORT_PLUGIN2(btdevicedialogplugin, BtDeviceDialogPlugin)
 
 const char* BTDIALOG_TRANSLATION = "btdialogs";
-const char* BTVIEW_TRANSLATION = "btviews";        
+const char* BTVIEW_TRANSLATION = "btviews";
+const char* COMMON_ERRORS_TRANSLATION = "common_errors";
 
 // This plugin implements one device dialog type
 static const struct {
@@ -65,7 +67,7 @@
     BtDeviceDialogPlugin Constructor
  */
 BtDeviceDialogPlugin::BtDeviceDialogPlugin():
- mDialogTranslator(0),mViewTranslator(0)
+ mDialogTranslator(0),mViewTranslator(0),mCommonErrorsTranslator(0)
 {
     d = new BtDeviceDialogPluginPrivate;
 }
@@ -78,6 +80,7 @@
     delete d;
     delete mDialogTranslator;
     delete mViewTranslator;
+    delete mCommonErrorsTranslator;
 }
 
 /*! 
@@ -114,6 +117,11 @@
         {
         mViewTranslator = new HbTranslator(BTVIEW_TRANSLATION);
         }
+    if(!mCommonErrorsTranslator)
+        {
+        mCommonErrorsTranslator = new HbTranslator(COMMON_ERRORS_TRANSLATION);
+        }
+    
     // verify that requested dialog type is supported
     const int numTypes = sizeof(noteInfos) / sizeof(noteInfos[0]);
     for(i = 0; i < numTypes; i++) {
@@ -233,6 +241,9 @@
         case TBluetoothDialogParams::EReceiveDone:
             deviceDialog = new BTRecvcompletedDialogWidget(parameters);
             break;
+        case TBluetoothDialogParams::EInformationDialog:
+            deviceDialog = new BtDeviceInfoWidget(parameters);
+            break;
         default:
             d->mError = UnknownDeviceDialogError;
             break;