]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/GuidChk/FileSearch.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / GuidChk / FileSearch.h
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/GuidChk/FileSearch.h b/EdkCompatibilityPkg/Sample/Tools/Source/GuidChk/FileSearch.h
new file mode 100644 (file)
index 0000000..bc40265
--- /dev/null
@@ -0,0 +1,108 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:  \r
+\r
+  FileSearch.h\r
+  \r
+Abstract:\r
+\r
+  Header file to support file searching.\r
+  \r
+--*/\r
+\r
+#ifndef _FILE_SEARCH_H_\r
+#define _FILE_SEARCH_H_\r
+\r
+//\r
+// Since the file searching routines are OS dependent, put the\r
+// necessary include paths in this header file so that the non-OS-dependent\r
+// files don't need to include these windows-specific header files.\r
+//\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <ctype.h>\r
+#include <direct.h>\r
+#include <windows.h>\r
+\r
+//\r
+// Return codes of some of the file search routines\r
+//\r
+#define STATUS_NOT_FOUND  0x1000\r
+\r
+//\r
+// Flags for what to search for. Also used in the FileFlags return field.\r
+//\r
+#define FILE_SEARCH_DIR   0x0001\r
+#define FILE_SEARCH_FILE  0x0002\r
+\r
+//\r
+// Here's our class definition\r
+//\r
+typedef struct {\r
+  HANDLE          Handle;\r
+  WIN32_FIND_DATA FindData;\r
+  UINT32          FileSearchFlags;    // DIRS, FILES, etc\r
+  UINT32          FileFlags;\r
+  INT8            FileName[MAX_PATH]; // for portability\r
+  STRING_LIST     *ExcludeDirs;\r
+  STRING_LIST     *ExcludeFiles;\r
+  STRING_LIST     *ExcludeExtensions;\r
+} FILE_SEARCH_DATA;\r
+\r
+//\r
+// Here's our member functions\r
+//\r
+STATUS\r
+FileSearchInit (\r
+  FILE_SEARCH_DATA    *FSData\r
+  )\r
+;\r
+\r
+STATUS\r
+FileSearchDestroy (\r
+  FILE_SEARCH_DATA    *FSData\r
+  )\r
+;\r
+\r
+STATUS\r
+FileSearchStart (\r
+  FILE_SEARCH_DATA    *FSData,\r
+  char                *FileMask,\r
+  UINT32              SearchFlags\r
+  )\r
+;\r
+\r
+STATUS\r
+FileSearchFindNext (\r
+  FILE_SEARCH_DATA    *FSData\r
+  )\r
+;\r
+\r
+STATUS\r
+FileSearchExcludeDirs (\r
+  FILE_SEARCH_DATA    *FSData,\r
+  STRING_LIST         *StrList\r
+  )\r
+;\r
+STATUS\r
+FileSearchExcludeExtensions (\r
+  FILE_SEARCH_DATA    *FSData,\r
+  STRING_LIST         *StrList\r
+  )\r
+;\r
+STATUS\r
+FileSearchExcludeFiles (\r
+  FILE_SEARCH_DATA    *FSData,\r
+  STRING_LIST         *StrList\r
+  )\r
+;\r
+#endif\r