+++ /dev/null
-// wingit.h\r
-//\r
-// Windows GIT wrapper (under msysgit)\r
-//\r
-// This is NOT a full git API, it only exposes a few helper functions that\r
-// third party windows apps might find useful, to avoid having to parse\r
-// console output from the command-line tools.\r
-//\r
-// Make sure wingit.dll is placed in the bin directory of the msysgit installation.\r
-//\r
-// Created by Georg Fischer\r
-\r
-#ifndef _WINGIT_H_\r
-#define _WINGIT_H_\r
-\r
-#define WG_VERSION "0.1.7"\r
-\r
-\r
-#define DLLIMPORT __declspec(dllimport) __stdcall\r
-#define DLLEXPORT __declspec(dllexport) __stdcall\r
-\r
-#ifdef WINGIT_EXPORTS\r
-#define WINGIT_API DLLEXPORT\r
-#else // GAME_EXPORTS\r
-#define WINGIT_API DLLIMPORT\r
-#endif // GAME_EXPORTS\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-\r
-// Flags for wgEnumFiles\r
-enum WGENUMFILEFLAGS\r
-{\r
- WGEFF_NoRecurse = (1<<0), // only enumerate files directly in the specified path\r
- WGEFF_FullPath = (1<<1), // enumerated filenames are specified with full path (instead of relative to proj root)\r
- WGEFF_DirStatusDelta= (1<<2), // include directories, in enumeration, that have a recursive status != WGFS_Normal (may have a slightly better performance than WGEFF_DirStatusAll)\r
- WGEFF_DirStatusAll = (1<<3), // include directories, in enumeration, with recursive status\r
- WGEFF_EmptyAsNormal = (1<<4), // report sub-directories, with no versioned files, as WGFS_Normal instead of WGFS_Empty\r
- WGEFF_SingleFile = (1<<5) // indicates that the status of a single file or dir, specified by pszSubPath, is wanted\r
-};\r
-\r
-// NOTE: Special behavior for directories when specifying WGEFF_SingleFile:\r
-//\r
-// * when combined with WGEFF_SingleFile the returned status will only reflect the immediate files in the dir,\r
-// NOT the recusrive status of immediate sub-dirs\r
-// * unlike a normal enumeration where the project root dir always is returned as WGFS_Normal regardless\r
-// of WGEFF_EmptyAsNormal, the project root will return WGFS_Empty if no immediate versioned files\r
-// unless WGEFF_EmptyAsNormal is specified\r
-// * WGEFF_DirStatusDelta and WGEFF_DirStatusAll are ignored and can be omitted even for dirs\r
-\r
-\r
-// File status\r
-enum WGFILESTATUS\r
-{\r
- WGFS_Normal,\r
- WGFS_Modified,\r
- //WGFS_Staged,\r
- //WGFS_Added,\r
- WGFS_Conflicted,\r
- WGFS_Deleted,\r
-\r
- WGFS_Unknown = -1,\r
- WGFS_Empty = -2\r
-};\r
-\r
-\r
-// File flags\r
-enum WGFILEFLAGS\r
-{\r
- WGFF_Directory = (1<<0) // enumerated file is a directory\r
-};\r
-\r
-\r
-struct wgFile_s\r
-{\r
- const char *sFileName; // filename or directory relative to project root (using forward slashes)\r
- int nStatus; // the WGFILESTATUS of the file\r
- int nFlags; // a combination of WGFILEFLAGS\r
-\r
- const BYTE* sha1; // points to the BYTE[20] sha1 (NULL for directories, WGFF_Directory)\r
-};\r
-\r
-\r
-// Application-defined callback function for wgEnumFiles, returns TRUE to abort enumeration\r
-// NOTE: do NOT store the pFile pointer or any pointers in wgFile_s for later use, the data is only valid for a single callback call\r
-typedef BOOL (__cdecl WGENUMFILECB)(const struct wgFile_s *pFile, void *pUserData);\r
-\r
-\r
-// Init git framework\r
-BOOL WINGIT_API wgInit(void);\r
-\r
-// Get the lib version\r
-LPCSTR WINGIT_API wgGetVersion(void);\r
-\r
-// Get the git version that is used in this lib\r
-LPCSTR WINGIT_API wgGetGitVersion(void);\r
-\r
-// Enumerate files in a git project\r
-// Ex: wgEnumFiles("C:\\Projects\\MyProject", "src/core", WGEFF_NoRecurse, MyEnumFunc, NULL)\r
-BOOL WINGIT_API wgEnumFiles(const char *pszProjectPath, const char *pszSubPath, unsigned int nFlags, WGENUMFILECB *pEnumCb, void *pUserData);\r
-\r
-// Get the SHA1 of pszName (NULL is same as "HEAD", "HEAD^" etc. expression allowed), returns NULL on failure\r
-// NOTE: do not store returned pointer for later used, data must be used/copied right away before further wg calls\r
-LPBYTE WINGIT_API wgGetRevisionID(const char *pszProjectPath, const char *pszName);\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-#endif\r