bluetoothengine/btnotif/btdevicedialogplugin/src/btdevicedialogplugin.cpp
changeset 70 f5508c13dfe0
parent 57 5ebadcda06cb
child 71 083fd884d7dd
equal deleted inserted replaced
67:16e4b9007960 70:f5508c13dfe0
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    31 #include "btmoredevicesdialogwidget.h"
    31 #include "btmoredevicesdialogwidget.h"
    32 #include "btsenddialogwidget.h"
    32 #include "btsenddialogwidget.h"
    33 #include "btdevicedialogrecvquerywidget.h"
    33 #include "btdevicedialogrecvquerywidget.h"
    34 #include "btrecvcompleteddialogwidget.h"
    34 #include "btrecvcompleteddialogwidget.h"
    35 #include "btdeviceinfowidget.h"
    35 #include "btdeviceinfowidget.h"
       
    36 #include "btdevicedialogwaitingwidget.h"
       
    37 #include "btdeviceokonlydialogwidget.h"
    36 #include <hbtranslator.h>
    38 #include <hbtranslator.h>
    37 
    39 
    38 Q_EXPORT_PLUGIN2(btdevicedialogplugin, BtDeviceDialogPlugin)
    40 Q_EXPORT_PLUGIN2(btdevicedialogplugin, BtDeviceDialogPlugin)
    39 
    41 
    40 const char* BTDIALOG_TRANSLATION = "btdialogs";
    42 const char* BTDIALOG_TRANSLATION = "btdialogs";
   208     // item with key EDialogType is found
   210     // item with key EDialogType is found
   209     // generate specified widget based on the dialog type value.
   211     // generate specified widget based on the dialog type value.
   210     HbDeviceDialogInterface *deviceDialog = NULL;
   212     HbDeviceDialogInterface *deviceDialog = NULL;
   211     switch ( i.value().toInt() ) {
   213     switch ( i.value().toInt() ) {
   212         case TBluetoothDialogParams::ENote:
   214         case TBluetoothDialogParams::ENote:
       
   215         case TBluetoothDialogParams::bt_054_d_entered_popup:
   213             deviceDialog =
   216             deviceDialog =
   214                 new BtDeviceDialogNotifWidget(parameters);
   217                 new BtDeviceDialogNotifWidget(parameters);
   215             break;
   218             break;
   216         case TBluetoothDialogParams::EQuery:
   219         case TBluetoothDialogParams::EQuery:
   217             deviceDialog =
   220             deviceDialog =
   241         case TBluetoothDialogParams::EReceiveDone:
   244         case TBluetoothDialogParams::EReceiveDone:
   242             deviceDialog = new BTRecvcompletedDialogWidget(parameters);
   245             deviceDialog = new BTRecvcompletedDialogWidget(parameters);
   243             break;
   246             break;
   244         case TBluetoothDialogParams::EInformationDialog:
   247         case TBluetoothDialogParams::EInformationDialog:
   245             deviceDialog = new BtDeviceInfoWidget(parameters);
   248             deviceDialog = new BtDeviceInfoWidget(parameters);
       
   249             break;
       
   250         case TBluetoothDialogParams::bt_052_d_entering:
       
   251             deviceDialog = new BtDeviceDialogWaitingWidget(parameters);
       
   252             break;
       
   253         case TBluetoothDialogParams::bt_053_d_unable_to_use_no_sim:
       
   254         case TBluetoothDialogParams::bt_053_d_unable_to_use:
       
   255             deviceDialog =
       
   256                 new BtDeviceOkOnlyDialogWidget(HbMessageBox::MessageTypeWarning,parameters);
   246             break;
   257             break;
   247         default:
   258         default:
   248             d->mError = UnknownDeviceDialogError;
   259             d->mError = UnknownDeviceDialogError;
   249             break;
   260             break;
   250     }
   261     }