btobexprofiles/obexreceiveservices/bip/src/BIPController.cpp
changeset 67 16e4b9007960
parent 57 5ebadcda06cb
child 70 f5508c13dfe0
equal deleted inserted replaced
65:001a94c71129 67:16e4b9007960
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-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".
    32 #include    <es_sock.h>
    32 #include    <es_sock.h>
    33 #include    <bt_sock.h>
    33 #include    <bt_sock.h>
    34 #include    <msvids.h>
    34 #include    <msvids.h>
    35 #include    "debug.h"
    35 #include    "debug.h"
    36 #include    <bluetoothdevicedialogs.h>
    36 #include    <bluetoothdevicedialogs.h>
       
    37 #include    "btconversationviewlauncher.h"
    37         
    38         
    38 // CONSTANTS
    39 // CONSTANTS
    39 _LIT8(KBipCapabilityType, "x-bt/img-capabilities\0");
    40 _LIT8(KBipCapabilityType, "x-bt/img-capabilities\0");
    40 const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
    41 const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
    41 const TInt    KBufferSize = 0x10000;  // 64 kB
    42 const TInt    KBufferSize = 0x10000;  // 64 kB
    75     iLowMemoryActiveMMC = CObexUtilsPropertyNotifier::NewL(this, ECheckMMCMemory);
    76     iLowMemoryActiveMMC = CObexUtilsPropertyNotifier::NewL(this, ECheckMMCMemory);
    76     iDevMan = CBTEngDevMan::NewL(this);
    77     iDevMan = CBTEngDevMan::NewL(this);
    77     iResultArray = new(ELeave) CBTDeviceArray(1);
    78     iResultArray = new(ELeave) CBTDeviceArray(1);
    78     // Get default folder from CenRep 
    79     // Get default folder from CenRep 
    79     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, KLCReceiveFolder, iCenRepFolder);
    80     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, KLCReceiveFolder, iCenRepFolder);
       
    81     iBtCnvViewLauncher = CBtConversationViewLauncher::NewL();
    80     TRACE_FUNC_EXIT
    82     TRACE_FUNC_EXIT
    81     }
    83     }
    82 
    84 
    83 // ---------------------------------------------------------
    85 // ---------------------------------------------------------
    84 // ~CBIPController()
    86 // ~CBIPController()
   104     
   106     
   105     delete iProgressDialog;
   107     delete iProgressDialog;
   106     delete iFailureDialog;
   108     delete iFailureDialog;
   107     delete iRecvDoneDialog;
   109     delete iRecvDoneDialog;
   108     delete iMemoryFullDailog;
   110     delete iMemoryFullDailog;
       
   111     delete iBtCnvViewLauncher;
   109     
   112     
   110     TRACE_FUNC_EXIT    
   113     TRACE_FUNC_EXIT    
   111     }
   114     }
   112 
   115 
   113 // ---------------------------------------------------------
   116 // ---------------------------------------------------------
  1054                  //Use choose to hide the progress dialog.
  1057                  //Use choose to hide the progress dialog.
  1055                  CloseReceivingIndicator(EFalse);
  1058                  CloseReceivingIndicator(EFalse);
  1056                  }break;
  1059                  }break;
  1057                  
  1060                  
  1058              case TBluetoothDialogParams::EShow:
  1061              case TBluetoothDialogParams::EShow:
       
  1062                  {
       
  1063                  TRAP_IGNORE(iBtCnvViewLauncher->LaunchConversationViewL());
       
  1064                  }
       
  1065              //No break statement after the preview case since the receive dialog must be closed anyway    
  1059              case TBluetoothDialogParams::ECancelShow:
  1066              case TBluetoothDialogParams::ECancelShow:
  1060                  {
  1067                  {
  1061                  //In case of Show, the device dialog will handle the opening of conversation view.
  1068                  //In case of Show, the device dialog will handle the opening of conversation view.
  1062                  iRecvDoneDialog->Cancel();
  1069                  iRecvDoneDialog->Cancel();
  1063                  delete iRecvDoneDialog;
  1070                  delete iRecvDoneDialog;