btobexprofiles/obexreceiveservices/bip/inc/BIPController.h
changeset 40 997690c3397a
parent 37 91746b151f97
child 41 0b2439c3e397
--- a/btobexprofiles/obexreceiveservices/bip/inc/BIPController.h	Fri Jun 11 13:48:51 2010 +0300
+++ b/btobexprofiles/obexreceiveservices/bip/inc/BIPController.h	Wed Jun 23 18:23:52 2010 +0300
@@ -24,22 +24,33 @@
 #include <e32base.h>
 #include <obex.h>
 #include <obexutilsmessagehandler.h>
-#include <obexutilsuilayer.h>
-#include <obexutilsdialog.h>
 #include "obexutilspropertynotifier.h"
 #include "debug.h"
 #include <SrcsInterface.h>
 #include <obexutilspropertynotifier.h>
-#include <obexutilsglobalprogressdialog.h>
 #include <btengsettings.h>
 #include "btengdevman.h"
 #include <obexutilsdialog.h>
+#include <hbdevicedialogsymbian.h>
+#include <hbsymbianvariant.h>
 
 // FORWARD DECLARATIONS
 
 class CBIPCapabilityHandler;
 class CBIPImageHandler;
 
+/**
+* Backup status.
+* The value is controlled by FileManager
+*/
+enum TFileManagerBkupStatusType
+    {
+    EFileManagerBkupStatusUnset   = 0x00000000,
+    EFileManagerBkupStatusBackup  = 0x00000001,
+    EFileManagerBkupStatusRestore = 0x00000002
+    };
+
+const TUid KUidMsgTypeBt                 = {0x10009ED5};
 
 // CLASS DECLARATION
 
@@ -48,8 +59,9 @@
 */
 NONSHARABLE_CLASS (CBIPController): public CSrcsInterface, public MObexServerNotify,
                                     public MObexUtilsPropertyNotifyHandler, 
-                                    public MGlobalProgressCallback, public MGlobalNoteCallback,
-                                    public MBTEngDevManObserver
+                                    public MObexUtilsDialogObserver,
+                                    public MBTEngDevManObserver,
+                                    public MHbDeviceDialogObserver
     {
 public:
     static CBIPController* NewL();
@@ -78,15 +90,13 @@
 private: // from MObexUtilsPropertyNotifyHandler
     void HandleNotifyL(TMemoryPropertyCheckType aCheckType);
     
-private: // from MGlobalProgressCallback
-    void HandleGlobalProgressDialogL(TInt aSoftkey); 
-    
-private: // from MGlobalNoteCallback
-    void HandleGlobalNoteDialogL(TInt aSoftkey);
     
 private: // from MBTEngDevManObserver
     void HandleGetDevicesComplete(TInt aErr, CBTDeviceArray* aDeviceArray);
     
+private: //from MObexUtilsDialogObserver
+    void DialogDismissed(TInt aButtonId);
+    
 private:
     CBIPController();
     void ConstructL();
@@ -101,10 +111,16 @@
     
     TBool CheckCapacityL();
     void LaunchReceivingIndicatorL();
-    inline TBool ReceivingIndicatorActive() const { return (iProgressDialog || iWaitDialog); }
-    void UpdateReceivingIndicator();
+    inline TBool ReceivingIndicatorActive() const { return (iDialogActive); }
+    void UpdateReceivingIndicatorL();
     void CloseReceivingIndicator(TBool aResetDisplayedState = ETrue);
     TInt GetDriveWithMaximumFreeSpaceL();
+    TBool IsBackupRunning();
+    TBool ProcessExists( const TSecureId& aSecureId );
+    
+private:
+    void DataReceived(CHbSymbianVariantMap& aData);
+    void DeviceDialogClosed(TInt aCompletionCode);
     
 private:
     enum TBipTransferState
@@ -117,6 +133,7 @@
         ETransferPutCancel,
         };
     
+    
 private: // Data
     CBIPCapabilityHandler*      iBIPCapabilityHandler;
     CObexBufObject*             iBTObject;
@@ -138,14 +155,15 @@
     CBufFlat                    *iBuf;
     TBool                       iLengthHeaderReceived;
     TInt                        iTotalSizeByte;
-    CGlobalProgressDialog*      iProgressDialog;
-    CGlobalDialog*              iWaitDialog;
     TBool                       iNoteDisplayed;
     CBTEngDevMan*               iDevMan;
     CBTDeviceArray*             iResultArray;
     TBTDeviceName               iRemoteDeviceName;
     TFileName                   iReceivingFileName;
     TFileName                   iCenRepFolder;
+    CObexUtilsDialog*           iDialog;
+    CHbDeviceDialogSymbian*     iProgressDialog;
+    TBool                       iDialogActive;
     };
     
 _LIT(KBipPanicCategory, "BIP");