root/_FilesPanel/BF_GUI_FilesPanel_Tasks.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef __BF_GUI_FILESPANEL_TASKS_H__
   2 #define __BF_GUI_FILESPANEL_TASKS_H__
   3 
   4 #include "BF_GUI_NodePanel.h"
   5 #include "BF_GUI_OperRoster.h"
   6 
   7 /////////////////////////////////////////////////////////////////////////
   8 
   9 class BF_GUI_FilesPanel_Task:public BF_GUI_OperTask{
  10 public:
  11                                                                                 BF_GUI_FilesPanel_Task(const char *pc_Name,int32 i_Styles = BF_GUI_OPERTASK_STYLE_CANMINIMASE);
  12 protected:
  13                         bool                                                    Check_DestFolder(BF_FilesPath &oPathDest);
  14                         
  15                         void                                                    RenameNodes(
  16                                                                                                 const BF_NodeCollection & lo_Node,
  17                                                                                                 const BF_FilesPath & o_SrcPath,
  18                                                                                                 const BL_String &s_NewName);
  19 };
  20 
  21 /////////////////////////////////////////////////////////////////////////
  22 
  23 typedef enum{
  24         BF_FILESPANEL_DELETE_TO_TRASH,
  25         BF_FILESPANEL_DELETE_TO_VOID
  26 }BF_GUI_FilesPanel_DeleteTask_Type;
  27 
  28 class BF_GUI_FilesPanel_DeleteTask:public BF_GUI_OperTask{
  29 public:
  30                                                                                         BF_GUI_FilesPanel_DeleteTask(
  31                                                                                                                                 BF_FilesPath o_Path,
  32                                                                                                                                 BF_NodeCollection & lo_Node,
  33                                                                                                                                 BF_GUI_FilesPanel_DeleteTask_Type i_DeleteType);
  34 virtual void                                                            Run();                                                          
  35 private:
  36                 uint64                                                          iOperIndex,iOperCount;                                                          
  37                 BF_FilesPath                                            oPath;
  38                 BF_NodeList                                             loNode;
  39                 BF_GUI_FilesPanel_DeleteTask_Type       iDeleteType;
  40                                 
  41                 BL_String                                                       sTrashPath;
  42                 BL_List                                                         lsSysPath;
  43                                 
  44                 bool                                                            PrepareTrashPath();
  45                 bool                                                            DeleteList(BF_NodeCollection & lo_Node);
  46                 
  47                 bool                                                            CheckFolder_ForSys(const char *pc_Folder);
  48 };      
  49 /////////////////////////////////////////////////////////////////////////
  50 
  51 //#define BF_GUI_FILESPANEL_COPY_BUFFER_SIZE (uint64)16384
  52 #define BF_GUI_FILESPANEL_COPY_BUFFER_SIZE (uint64)65536
  53 //#define BF_GUI_FILESPANEL_COPY_BUFFER_SIZE (uint64)393216
  54 //#define BF_GUI_FILESPANEL_COPY_BUFFER_SIZE (uint64)1024000
  55 
  56 class BF_GUI_FilesPanel_CopyTask:public BF_GUI_FilesPanel_Task{
  57 public:
  58                                                                                         BF_GUI_FilesPanel_CopyTask(
  59                                                                                                                                 BF_FilesPath& o_PathSrc,
  60                                                                                                                                 BF_FilesPath& o_PathDest,
  61                                                                                                                                 BF_NodeCollection & lo_Node,
  62                                                                                                                                 bool b_FilesMove
  63                                                                                                                                 );
  64 virtual void                                                            Run();
  65 private:
  66                 uint64                                                          iOperIndex,iOperCount;                                                          
  67                 BF_FilesPath                                            oPathSrc,oPathDest;
  68                 BF_NodeList                                             loNode;
  69                 bool                                                            bFilesMove;
  70                 char                                                            pcBuffer[BF_GUI_FILESPANEL_COPY_BUFFER_SIZE];
  71                 
  72                 bool                                                            Copy_Nodes(     BF_NodeCollection *plo_Node,
  73                                                                                                                 BString& s_NewPath,
  74                                                                                                                 bool b_DeleteAfterCopy);
  75                 bool                                                            Copy_Atributes(BNode & o_NodeSrc,BNode & o_NodeDest);
  76                                                                                                                 
  77                 void                                                            Move_Nodes();           
  78 };
  79 /////////////////////////////////////////////////////////////////////////
  80 class BF_GUI_FilesPanel_ChangeCaseTask:public BF_GUI_OperTask{
  81 public:
  82                                                                                         BF_GUI_FilesPanel_ChangeCaseTask(
  83                                                                                                                                 BF_FilesPath& o_Path,
  84                                                                                                                                 BF_NodeCollection & lo_Node,                                                                                                                            
  85                                                                                                                                 int32 i_CaseType);
  86 virtual void                                                            Run();
  87 private:
  88                 uint64                                                          iOperIndex,iOperCount;                                                          
  89                 BF_NodeList                                             loNode;
  90                 BF_FilesPath                                            oPath;
  91                 int32                                                           iCaseType;                                      
  92 };      
  93 /////////////////////////////////////////////////////////////////////////
  94 class BF_GUI_FilesPanel_Rename:public BF_GUI_FilesPanel_Task{
  95 public:
  96                                                                                         BF_GUI_FilesPanel_Rename(
  97                                                                                                                                 BF_FilesPath& o_Path,
  98                                                                                                                                 BF_NodeCollection & lo_Node,                                                                                                                            
  99                                                                                                                                 BL_String & s_NewName);
 100 virtual void                                                            Run();
 101 private:                
 102                 BF_NodeList                                             loNode;
 103                 BF_FilesPath                                            oPath;
 104                 BL_String                                                       sNewName;
 105 };      
 106 /////////////////////////////////////////////////////////////////////////
 107 class BF_GUI_FilesPanel_MakeLinksTask:public BF_GUI_FilesPanel_Task{
 108 public:
 109                                                                                         BF_GUI_FilesPanel_MakeLinksTask(
 110                                                                                                                                 BF_FilesPath& o_PathSrc,
 111                                                                                                                                 BF_FilesPath& o_PathDest,
 112                                                                                                                                 BF_NodeCollection & lo_Node
 113                                                                                                                                 );
 114 virtual void                                                            Run();
 115 private:
 116                 BF_FilesPath                                            oPathSrc,oPathDest;
 117                 BF_NodeList                                             loNode; 
 118                 BL_String                                                       sMask;  
 119 };
 120 /////////////////////////////////////////////////////////////////////////

/* [previous][next][first][last][top][bottom][index][help] */