--- a/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp Fri May 28 17:03:06 2010 +0300
+++ b/bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp Mon Jul 12 18:51:05 2010 +0300
@@ -24,14 +24,20 @@
#include "btdevicedialoginputwidget.h"
#include "btdevicedialogquerywidget.h"
#include "btdevicedialognotifwidget.h"
+#include "btrecvprgrsdialogwidget.h"
#include "btdevicedialogpluginerrors.h"
#include "btdevicesearchdialogwidget.h"
#include "btmoredevicesdialogwidget.h"
#include "btsenddialogwidget.h"
+#include "btdevicedialogrecvquerywidget.h"
+#include <hbtranslator.h>
Q_EXPORT_PLUGIN2(btdevicedialogplugin, BtDeviceDialogPlugin)
+const char* BTDIALOG_TRANSLATION = "btdialogs";
+const char* BTVIEW_TRANSLATION = "btviews";
+
// This plugin implements one device dialog type
static const struct {
const char *mTypeString;
@@ -57,7 +63,8 @@
/*!
BtDeviceDialogPlugin Constructor
*/
-BtDeviceDialogPlugin::BtDeviceDialogPlugin()
+BtDeviceDialogPlugin::BtDeviceDialogPlugin():
+ mDialogTranslator(0),mViewTranslator(0)
{
d = new BtDeviceDialogPluginPrivate;
}
@@ -68,6 +75,8 @@
BtDeviceDialogPlugin::~BtDeviceDialogPlugin()
{
delete d;
+ delete mDialogTranslator;
+ delete mViewTranslator;
}
/*!
@@ -95,6 +104,15 @@
d->mError = NoError;
int i;
+
+ if(!mDialogTranslator)
+ {
+ mDialogTranslator = new HbTranslator(BTDIALOG_TRANSLATION);
+ }
+ if(!mViewTranslator)
+ {
+ mViewTranslator = new HbTranslator(BTVIEW_TRANSLATION);
+ }
// verify that requested dialog type is supported
const int numTypes = sizeof(noteInfos) / sizeof(noteInfos[0]);
for(i = 0; i < numTypes; i++) {
@@ -184,7 +202,7 @@
switch ( i.value().toInt() ) {
case TBluetoothDialogParams::ENote:
deviceDialog =
- new BtDeviceDialogQueryWidget(HbMessageBox::MessageTypeInformation, parameters);
+ new BtDeviceDialogNotifWidget(parameters);
break;
case TBluetoothDialogParams::EQuery:
deviceDialog =
@@ -205,6 +223,12 @@
case TBluetoothDialogParams::EGlobalNotif:
deviceDialog = new BtDeviceDialogNotifWidget(parameters);
break;
+ case TBluetoothDialogParams::EUserAuthorization:
+ deviceDialog = new BTRecvQueryDialogWidget(parameters);
+ break;
+ case TBluetoothDialogParams::EReceiveProgress:
+ deviceDialog = new BTRecvPrgrsDialogWidget(parameters);
+ break;
default:
d->mError = UnknownDeviceDialogError;
break;