--- a/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp Fri May 28 17:03:06 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp Mon Jul 12 18:51:05 2010 +0300
@@ -32,8 +32,6 @@
#include <mtmuidef.hrh>
#include <mtclreg.h>
-#include <obexutilsuilayer.h>
-#include <Obexutils.rsg>
#include <msvuids.h>
#include <msvids.h>
#include <obexconstants.h>
@@ -81,6 +79,7 @@
{
FLOG( _L( "[CBtMtmUi] CBtMtmUi: ~CBtMtmUi\t" ) );
delete iClientRegistry;
+ delete iDialog;
}
// Symbian OS default constructor can leave.
@@ -88,6 +87,7 @@
{
FLOG( _L( "[CBtMtmUi] CBtMtmUi: ConstructL\t" ) );
CBaseMtmUi::ConstructL();
+ iDialog = CObexUtilsDialog::NewL(this);
}
// ---------------------------------------------------------
@@ -98,9 +98,8 @@
void CBtMtmUi::GetResourceFileName( TFileName& aFileName ) const
{
FLOG( _L( "[CBtMtmUi] CBtMtmUi: GetResourceFileName\t" ) );
- aFileName = KObexUtilsFileDrive;
- aFileName += KDC_RESOURCE_FILES_DIR;
- aFileName += KObexUtilsResourceFileName;
+ (void)aFileName;
+ //todo: This function should be removed it is using avkon resource file.
}
// ---------------------------------------------------------
@@ -278,8 +277,11 @@
}
if ( retVal != KErrNone ||iState != KErrNone )
{
- resourceId = R_BT_DEV_NOT_AVAIL;
- TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //resourceId = R_BT_DEV_NOT_AVAIL;
+ //TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //todo: Need to use Localized string.
+ _LIT(KText, "Cannot establish Bluetooth connection");
+ iDialog->ShowInformationNoteL(KText);
CleanupStack::PopAndDestroy(3); // BtDevice, BtConnection, password
return CMsvCompletedOperation::NewL(
Session(),
@@ -515,8 +517,12 @@
const TInt error = progress.iError;
if ( error == KErrInUse )
{
- resourceId = R_BT_DEV_NOT_AVAIL;
- TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //resourceId = R_BT_DEV_NOT_AVAIL;
+ //TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //todo: Need to use Localized string.
+ _LIT(KText, "Cannot establish Bluetooth connection");
+ iDialog->ShowInformationNoteL(KText);
+
return KErrNone;
}
@@ -526,8 +532,12 @@
{
FLOG( _L( "[CBtMtmUi] CBtMtmUi:DisplayProgressSummaryL: EDisconnected\t" ) );
// Allowed to send again.
- resourceId = R_BT_DATA_SENT;
- TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //resourceId = R_BT_DATA_SENT;
+ //TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //todo: Need to use Localized string.
+ _LIT(KText, "Message sent!");
+ iDialog->ShowInformationNoteL(KText);
+
break;
}
case TObexMtmProgress::ESendError:
@@ -535,13 +545,21 @@
FLOG( _L( "[CBtMtmUi] CBtMtmUi:DisplayProgressSummaryL: ESendError\t" ) );
if( error == KErrIrObexClientNoDevicesFound )
{
- resourceId = R_BT_DEV_NOT_AVAIL;
- TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //resourceId = R_BT_DEV_NOT_AVAIL;
+ //TObexUtilsUiLayer::ShowInformationNoteL( resourceId );
+ //todo: Need to use Localized string.
+ _LIT(KText, "Cannot establish Bluetooth connection");
+ iDialog->ShowInformationNoteL(KText);
+
}
else
{
- resourceId = R_BT_FAILED_TO_SEND;
- TObexUtilsUiLayer::ShowErrorNoteL( resourceId );
+ //resourceId = R_BT_FAILED_TO_SEND;
+ //TObexUtilsUiLayer::ShowErrorNoteL( resourceId );
+ //todo: Need to use Localized string.
+ _LIT(KText, "Failed to send message");
+ iDialog->ShowErrorNoteL(KText);
+
}
break;
}
@@ -666,9 +684,13 @@
CMsvSession& aSession)
{
FLOG( _L( "[CommonMtmUi] CBtMtmUi: LaunchEditorApplicationL\t" ) );
- CMsvEntry* message;
- message = &iBaseMtm.Entry();
- return TObexUtilsUiLayer::LaunchEditorApplicationOperationL( aSession, message, aStatus );
+ (void)aStatus;
+ (void)aSession;
+ //CMsvEntry* message;
+ //message = &iBaseMtm.Entry();
+ //todo: need to replace this
+ //return TObexUtilsUiLayer::LaunchEditorApplicationOperationL( aSession, message, aStatus );
+ return NULL;
}
// ---------------------------------------------------------
@@ -805,4 +827,9 @@
iWaiter.AsyncStop();
}
+void CBtMtmUi::DialogDismissed(TInt /*aButtonId*/)
+ {
+
+ }
+
// End of File