| 1 | 
 | 
|---|
| 2 | /***********************************************************************
 | 
|---|
| 3 | 
 | 
|---|
| 4 |   $Id: filldir.h 1444 2009-07-22 23:24:23Z gyoung $
 | 
|---|
| 5 | 
 | 
|---|
| 6 |   filldir.c definitions
 | 
|---|
| 7 | 
 | 
|---|
| 8 |   Copyright (c) 1993-98 M. Kimes
 | 
|---|
| 9 |   Copyright (c) 2001, 2008 Steven H. Levine
 | 
|---|
| 10 | 
 | 
|---|
| 11 |   05 Jan 08 SHL Split from fm3dll.h
 | 
|---|
| 12 |   25 Dec 08 GKY Add ProcessDirectoryThread to allow optional recursive drive scan at startup.
 | 
|---|
| 13 |   08 Mar 09 GKY Additional strings move to PCSZs
 | 
|---|
| 14 |   06 Jun 09 GKY Add option to show file system type or drive label in tree
 | 
|---|
| 15 |   22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning
 | 
|---|
| 16 | 
 | 
|---|
| 17 | ***********************************************************************/
 | 
|---|
| 18 | 
 | 
|---|
| 19 | #if !defined(FILLDIR_H)
 | 
|---|
| 20 | 
 | 
|---|
| 21 | #define FILLDIR_H
 | 
|---|
| 22 | 
 | 
|---|
| 23 | #if !defined(OS2_INCLUDED)
 | 
|---|
| 24 | #define INCL_WINSTDCNR                  // dircnrs.h
 | 
|---|
| 25 | #include <os2.h>
 | 
|---|
| 26 | #else
 | 
|---|
| 27 | #if !defined(INCL_WINSTDCNR)
 | 
|---|
| 28 | #error INCL_WINSTDCNR required
 | 
|---|
| 29 | #endif
 | 
|---|
| 30 | #endif
 | 
|---|
| 31 | 
 | 
|---|
| 32 | #include "dircnrs.h"                    // DIRCNRDATA
 | 
|---|
| 33 | 
 | 
|---|
| 34 | VOID EmptyCnr(HWND hwnd);
 | 
|---|
| 35 | const PSZ FileAttrToString(ULONG fileAttr);
 | 
|---|
| 36 | VOID FillDirCnr(HWND hwndCnr, CHAR *pszDirectory, DIRCNRDATA *pdcd,
 | 
|---|
| 37 |                 PULONGLONG pullBytes);
 | 
|---|
| 38 | VOID FillTreeCnr(HWND hwndCnr, HWND hwndParent);
 | 
|---|
| 39 | VOID ProcessDirectory(const HWND hwndCnr, const PCNRITEM pciParent,
 | 
|---|
| 40 |                       const CHAR *szDirBase, const BOOL filestoo,
 | 
|---|
| 41 |                       const BOOL recurse, const BOOL partial,
 | 
|---|
| 42 |                       CHAR *stopflag, DIRCNRDATA *pdcd,
 | 
|---|
| 43 |                       PULONG pullTotalFiles, PULONGLONG pullTotalBytes);
 | 
|---|
| 44 | ULONGLONG FillInRecordFromFFB(HWND hwndCnr, PCNRITEM pci,
 | 
|---|
| 45 |                               const PSZ pszDirectory,
 | 
|---|
| 46 |                               const PFILEFINDBUF4L pffb, const BOOL partial,
 | 
|---|
| 47 |                               DIRCNRDATA *pdcd);
 | 
|---|
| 48 | ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci,
 | 
|---|
| 49 |                               const PSZ pszFileName, const PFILESTATUS4L pfsa4,
 | 
|---|
| 50 |                               const BOOL partial, CHAR *szFSType, DIRCNRDATA *pdcd);
 | 
|---|
| 51 | VOID FreeCnrItem(HWND hwnd, PCNRITEM pci);
 | 
|---|
| 52 | VOID FreeCnrItemList(HWND hwnd, PCNRITEM pciFirst);
 | 
|---|
| 53 | VOID FreeCnrItemData(PCNRITEM pci);
 | 
|---|
| 54 | INT RemoveCnrItems(HWND hwnd, PCNRITEM pci, USHORT usCnt, USHORT usFlags);
 | 
|---|
| 55 | VOID ProcessDirectoryThread(VOID * arg);
 | 
|---|
| 56 | 
 | 
|---|
| 57 | // Data declarations
 | 
|---|
| 58 | extern PCSZ FM3Tools;
 | 
|---|
| 59 | extern PCSZ WPProgram;
 | 
|---|
| 60 | extern HPOINTER hptrEnv;
 | 
|---|
| 61 | extern HPOINTER hptrHidden;
 | 
|---|
| 62 | extern HPOINTER hptrReadonly;
 | 
|---|
| 63 | extern HPOINTER hptrSystem;
 | 
|---|
| 64 | 
 | 
|---|
| 65 | typedef struct {
 | 
|---|
| 66 | 
 | 
|---|
| 67 |   HWND     hwndCnr;
 | 
|---|
| 68 |   PCNRITEM pciParent;
 | 
|---|
| 69 |   CHAR     *szDirBase;
 | 
|---|
| 70 |   BOOL     filestoo;
 | 
|---|
| 71 |   BOOL     recurse;
 | 
|---|
| 72 |   BOOL     partial;
 | 
|---|
| 73 |   CHAR           *stopflag;
 | 
|---|
| 74 |   DIRCNRDATA     *dcd;                // Optional
 | 
|---|
| 75 |   ULONG          *pulTotalFiles;       // Optional
 | 
|---|
| 76 |   PULONGLONG     pullTotalBytes;      // Optional
 | 
|---|
| 77 | }
 | 
|---|
| 78 | PROCESSDIR;
 | 
|---|
| 79 | 
 | 
|---|
| 80 | #endif // FILLDIR_H
 | 
|---|