btobexprofiles/obexreceiveservices/opp/src/oppcontroller.cpp
changeset 67 16e4b9007960
parent 57 5ebadcda06cb
child 70 f5508c13dfe0
equal deleted inserted replaced
65:001a94c71129 67:16e4b9007960
     1 /*
     1 /*
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-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".
    28 #include    <msvids.h>
    28 #include    <msvids.h>
    29 #include    <driveinfo.h>
    29 #include    <driveinfo.h>
    30 #include    <es_sock.h>
    30 #include    <es_sock.h>
    31 #include    <bt_sock.h>
    31 #include    <bt_sock.h>
    32 #include    <bluetoothdevicedialogs.h>
    32 #include    <bluetoothdevicedialogs.h>
       
    33 #include    "btconversationviewlauncher.h"
    33 
    34 
    34 // CONSTANTS
    35 // CONSTANTS
    35 
    36 
    36 const TInt    KBufferSize = 0x10000;  // 64 kB
    37 const TInt    KBufferSize = 0x10000;  // 64 kB
    37 const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
    38 const TInt KFileManagerUID3 = 0x101F84EB; /// File Manager application UID3
    66     iResultArray = new (ELeave) CBTDeviceArray(1);
    67     iResultArray = new (ELeave) CBTDeviceArray(1);
    67     // Get default folder from CenRep 
    68     // Get default folder from CenRep 
    68     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, 
    69     TObexUtilsMessageHandler::GetCenRepKeyStringValueL(KCRUidBluetoothEngine, 
    69                                                        KLCReceiveFolder,
    70                                                        KLCReceiveFolder,
    70                                                        iCenRepFolder);
    71                                                        iCenRepFolder);
       
    72     iBtCnvViewLauncher = CBtConversationViewLauncher::NewL();
    71 	} 
    73 	} 
    72 
    74 
    73 COPPController::~COPPController()
    75 COPPController::~COPPController()
    74     {
    76     {
    75     TRACE_FUNC
    77     TRACE_FUNC
    87 
    89 
    88     delete iProgressDialog;
    90     delete iProgressDialog;
    89     delete iFailureDialog;
    91     delete iFailureDialog;
    90     delete iRecvDoneDialog;
    92     delete iRecvDoneDialog;
    91     delete iMemoryFullDailog;
    93     delete iMemoryFullDailog;
       
    94     delete iBtCnvViewLauncher;
    92     }
    95     }
    93 
    96 
    94 // ---------------------------------------------------------
    97 // ---------------------------------------------------------
    95 // ErrorIndication()
    98 // ErrorIndication()
    96 // ---------------------------------------------------------
    99 // ---------------------------------------------------------
  1007                  //Use choose to hide the progress dialog.
  1010                  //Use choose to hide the progress dialog.
  1008                  CloseReceivingIndicator(EFalse);
  1011                  CloseReceivingIndicator(EFalse);
  1009                  }break;
  1012                  }break;
  1010                  
  1013                  
  1011              case TBluetoothDialogParams::EShow:
  1014              case TBluetoothDialogParams::EShow:
       
  1015                  {
       
  1016                  TRAP_IGNORE(iBtCnvViewLauncher->LaunchConversationViewL());
       
  1017                  }
       
  1018              //No break statement after the preview case since the receive dialog must be closed anyway    
  1012              case TBluetoothDialogParams::ECancelShow:
  1019              case TBluetoothDialogParams::ECancelShow:
  1013                  {
  1020                  {
  1014                  //In case of Show, the device dialog will handle the opening of conversation view.
  1021                  //In case of Show, the device dialog will handle the opening of conversation view.
  1015                  iRecvDoneDialog->Cancel();
  1022                  iRecvDoneDialog->Cancel();
  1016                  delete iRecvDoneDialog;
  1023                  delete iRecvDoneDialog;