btobexprofiles/obexreceiveservices/bip/inc/BIPController.h
changeset 57 5ebadcda06cb
parent 47 9e2a905b887f
child 67 16e4b9007960
equal deleted inserted replaced
51:625f43ae9362 57:5ebadcda06cb
    28 #include "debug.h"
    28 #include "debug.h"
    29 #include <SrcsInterface.h>
    29 #include <SrcsInterface.h>
    30 #include <obexutilspropertynotifier.h>
    30 #include <obexutilspropertynotifier.h>
    31 #include <btengsettings.h>
    31 #include <btengsettings.h>
    32 #include "btengdevman.h"
    32 #include "btengdevman.h"
    33 #include <obexutilsdialog.h>
       
    34 #include <hbdevicedialogsymbian.h>
    33 #include <hbdevicedialogsymbian.h>
    35 #include <hbsymbianvariant.h>
    34 #include <hbsymbianvariant.h>
    36 
    35 
    37 // FORWARD DECLARATIONS
    36 // FORWARD DECLARATIONS
    38 
    37 
    56 
    55 
    57 /**
    56 /**
    58 *  The main controller for Basic Imaging Profile.
    57 *  The main controller for Basic Imaging Profile.
    59 */
    58 */
    60 NONSHARABLE_CLASS (CBIPController): public CSrcsInterface, public MObexServerNotify,
    59 NONSHARABLE_CLASS (CBIPController): public CSrcsInterface, public MObexServerNotify,
    61                                     public MObexUtilsPropertyNotifyHandler, 
    60                                     public MObexUtilsPropertyNotifyHandler,
    62                                     public MObexUtilsDialogObserver,
       
    63                                     public MBTEngDevManObserver,
    61                                     public MBTEngDevManObserver,
    64                                     public MHbDeviceDialogObserver
    62                                     public MHbDeviceDialogObserver
    65     {
    63     {
    66 public:
    64 public:
    67     static CBIPController* NewL();
    65     static CBIPController* NewL();
    92     
    90     
    93     
    91     
    94 private: // from MBTEngDevManObserver
    92 private: // from MBTEngDevManObserver
    95     void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
    93     void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
    96     
    94     
    97 private: //from MObexUtilsDialogObserver
       
    98     void DialogDismissed(TInt aButtonId);
       
    99     
       
   100 private:
    95 private:
   101     CBIPController();
    96     CBIPController();
   102     void ConstructL();
    97     void ConstructL();
   103     
    98     
   104     void CancelTransfer();
    99     void CancelTransfer();
   115     void UpdateReceivingIndicatorL();
   110     void UpdateReceivingIndicatorL();
   116     void CloseReceivingIndicator(TBool aResetDisplayedState = ETrue);
   111     void CloseReceivingIndicator(TBool aResetDisplayedState = ETrue);
   117     TInt GetDriveWithMaximumFreeSpaceL();
   112     TInt GetDriveWithMaximumFreeSpaceL();
   118     TBool IsBackupRunning();
   113     TBool IsBackupRunning();
   119     TBool ProcessExists( const TSecureId& aSecureId );
   114     TBool ProcessExists( const TSecureId& aSecureId );
       
   115     
       
   116     void LaunchFailureDialogL();
       
   117     void LaunchMemoryFullDialogL(TInt aDrive);
       
   118     void AddParamL(const TInt aKey, const TAny* aValue, 
       
   119             CHbSymbianVariant::TType aValueType, CHbSymbianVariantMap& aVariantMap);
   120     
   120     
   121 private:
   121 private:
   122     void DataReceived(CHbSymbianVariantMap& aData);
   122     void DataReceived(CHbSymbianVariantMap& aData);
   123     void DeviceDialogClosed(TInt aCompletionCode);
   123     void DeviceDialogClosed(TInt aCompletionCode);
   124     
   124     
   159     CBTEngDevMan*               iDevMan;
   159     CBTEngDevMan*               iDevMan;
   160     CBTDeviceArray*             iResultArray;
   160     CBTDeviceArray*             iResultArray;
   161     TBTDeviceName               iRemoteDeviceName;
   161     TBTDeviceName               iRemoteDeviceName;
   162     TFileName                   iReceivingFileName;
   162     TFileName                   iReceivingFileName;
   163     TFileName                   iCenRepFolder;
   163     TFileName                   iCenRepFolder;
   164     CObexUtilsDialog*           iDialog;
       
   165     CHbDeviceDialogSymbian*     iProgressDialog;
   164     CHbDeviceDialogSymbian*     iProgressDialog;
   166     TBool                       iDialogActive;
   165     TBool                       iDialogActive;
   167     TInt                        iFileCount;
   166     TInt                        iFileCount;
       
   167     CHbDeviceDialogSymbian*     iFailureDialog;
   168     TBool                       iReceivingFailed;
   168     TBool                       iReceivingFailed;
   169     CHbDeviceDialogSymbian*     iRecvDoneDialog;
   169     CHbDeviceDialogSymbian*     iRecvDoneDialog;
   170     TBool                       iShowRecvCompleteDialog;
   170     TBool                       iShowRecvCompleteDialog;
       
   171     CHbDeviceDialogSymbian*     iMemoryFullDailog;
   171     };
   172     };
   172     
   173     
   173 _LIT(KBipPanicCategory, "BIP");
   174 _LIT(KBipPanicCategory, "BIP");
   174 enum TBipPanicCode
   175 enum TBipPanicCode
   175     {
   176     {