localconnectivityservice/obexreceiveservices/mtmuibluetooth/src/btmtmui.cpp
changeset 25 c4f07256ff37
parent 0 c3e98f10fcf4
child 26 d74a43a4aa59
equal deleted inserted replaced
0:c3e98f10fcf4 25:c4f07256ff37
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include "btmtmui.h"
    21 #include "btmtmui.h"
    22 #include "btmtmuidebug.h"
    22 #include "btmtmuidebug.h"
    23 
    23 
    24 //#include <obexmtmuilayer.h>
    24 //#include <obexmtmuilayer.h>
       
    25 #ifdef NO101APPDEPFIXES
    25 #include <MuiuMsvProgressReporterOperation.h>
    26 #include <MuiuMsvProgressReporterOperation.h>
       
    27 #endif  //NO101APPDEPFIXES
    26 #include <btcmtm.h>
    28 #include <btcmtm.h>
    27 #include <mtmuidef.hrh>
    29 #include <mtmuidef.hrh>
    28 #include <mtclreg.h>
    30 #include <mtclreg.h>
    29 #include <obexutilsuilayer.h>
    31 #include <obexutilsuilayer.h>
    30 #include <obexutils.rsg>
    32 #include <obexutils.rsg>
    32 #include <msvids.h>
    34 #include <msvids.h>
    33 #include <obexconstants.h>
    35 #include <obexconstants.h>
    34 
    36 
    35 
    37 
    36 // CONSTANTS
    38 // CONSTANTS
       
    39 #ifdef NO101APPDEPFIXES
    37 const TInt KBtMtmUiToFromFieldBuffer     = 80;
    40 const TInt KBtMtmUiToFromFieldBuffer     = 80;
    38 const TInt KBtMtmUiConnectionTimeout     = 20000000;
    41 const TInt KBtMtmUiConnectionTimeout     = 20000000;
    39 const TInt KBtMtmUiConnectionPutTimeout  = 0;
    42 const TInt KBtMtmUiConnectionPutTimeout  = 0;
    40 const TInt KBtMtmUiObexPort              = 1;
    43 const TInt KBtMtmUiObexPort              = 1;
    41 const TInt KBtMtmUiAddressMaxLength      = 3;
    44 const TInt KBtMtmUiAddressMaxLength      = 3;
       
    45 #endif  //NO101APPDEPFIXES
    42 
    46 
    43 // ENUMS
    47 // ENUMS
    44 enum TBtMtmAsyncCmds
    48 enum TBtMtmAsyncCmds
    45     {
    49     {
    46     EBtMtmCmdSend
    50     EBtMtmCmdSend
   221 // ---------------------------------------------------------
   225 // ---------------------------------------------------------
   222 //
   226 //
   223 CMsvOperation* CBtMtmUi::EditL( TRequestStatus& aStatus )
   227 CMsvOperation* CBtMtmUi::EditL( TRequestStatus& aStatus )
   224 	{
   228 	{
   225 	FLOG( _L( "[BtMtmUi] CBtMtmUi: EditL 2 \t" ) );
   229 	FLOG( _L( "[BtMtmUi] CBtMtmUi: EditL 2 \t" ) );
   226     TInt resourceId;
       
   227     TInt retVal=0;
       
   228 	switch( iBaseMtm.Entry().Entry().iType.iUid )
   230 	switch( iBaseMtm.Entry().Entry().iType.iUid )
   229 		{
   231 		{
   230 	    case KUidMsvMessageEntryValue:
   232 	    case KUidMsvMessageEntryValue:
   231 		    {
   233 		    {
   232 		    if( iBaseMtm.Entry().Entry().Parent() != KMsvDraftEntryId &&
   234 		    if( iBaseMtm.Entry().Entry().Parent() != KMsvDraftEntryId &&
   233 		       iBaseMtm.Entry().Entry().Parent() != KMsvGlobalOutBoxIndexEntryId )
   235 		       iBaseMtm.Entry().Entry().Parent() != KMsvGlobalOutBoxIndexEntryId )
   234 			    {
   236 			    {
   235 			    //   Edit/"use" entries in the Inbox
   237 			    //   Edit/"use" entries in the Inbox
   236 			    return LaunchEditorApplicationL( aStatus, iBaseMtm.Entry().Session() );   
   238 			    return LaunchEditorApplicationL( aStatus, iBaseMtm.Entry().Session() );   
   237 			    }
   239 			    }
       
   240 #ifdef NO101APPDEPFIXES
   238 		    else
   241 		    else
   239 			    {
   242 			    {
       
   243 			    TInt resourceId;
   240                 HBufC* password = HBufC::NewL(1);
   244                 HBufC* password = HBufC::NewL(1);
   241                 CleanupStack::PushL( password );  // 1st push
   245                 CleanupStack::PushL( password );  // 1st push
   242                 BaseMtm().LoadMessageL();
   246                 BaseMtm().LoadMessageL();
   243 
   247 
   244                 TBTDevAddr address;
   248                 TBTDevAddr address;
   252                 iDiscovery = CBTEngDiscovery::NewL(this);
   256                 iDiscovery = CBTEngDiscovery::NewL(this);
   253 				CBTDevice* iDevice = CBTDevice::NewL( );
   257 				CBTDevice* iDevice = CBTDevice::NewL( );
   254 				
   258 				
   255 
   259 
   256                 if ( iDiscovery->SearchRemoteDevice( iDevice ) == KErrNone )
   260                 if ( iDiscovery->SearchRemoteDevice( iDevice ) == KErrNone )
   257 				{ 
   261                     {
       
   262                     TInt retVal=0;
   258 				    iWaiter.Start();
   263 				    iWaiter.Start();
   259 				    
   264 				    
   260 				    if ( iState ==KErrNone)
   265 				    if ( iState ==KErrNone)
   261 				        {
   266 				        {
   262 					    address = iDevice->BDAddr();
   267 					    address = iDevice->BDAddr();
   361 
   366 
   362                 CleanupStack::Pop( reporter );
   367                 CleanupStack::Pop( reporter );
   363                 CleanupStack::PopAndDestroy(3);  // waiter, sel,  password
   368                 CleanupStack::PopAndDestroy(3);  // waiter, sel,  password
   364                 return reporter;
   369                 return reporter;
   365 			    }
   370 			    }
       
   371 #endif  //NO101APPDEPFIXES
   366 		    }
   372 		    }
   367 	    case KUidMsvServiceEntryValue:
   373 	    case KUidMsvServiceEntryValue:
   368 	    case KUidMsvAttachmentEntryValue:
   374 	    case KUidMsvAttachmentEntryValue:
   369 	    case KUidMsvFolderEntryValue:
   375 	    case KUidMsvFolderEntryValue:
   370             {
   376             {