// Fsa.idl : IDL source for Fsa.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (Fsa.tlb) and marshalling code.
import "oaidl.idl";

typedef [v1_enum] enum _FSA_REQUEST_ACTION {
    FSA_REQUEST_ACTION_NONE = 0,
    FSA_REQUEST_ACTION_DELETE = 1,
    FSA_REQUEST_ACTION_FILTER_RECALL = 2,
    FSA_REQUEST_ACTION_PREMIGRATE = 3,
    FSA_REQUEST_ACTION_RECALL = 4,
    FSA_REQUEST_ACTION_VALIDATE = 5,
    FSA_REQUEST_ACTION_FILTER_READ = 6,
    FSA_REQUEST_ACTION_VALIDATE_FOR_TRUNCATE = 7,
} FSA_REQUEST_ACTION;

typedef [v1_enum] enum _FSA_RESULT_ACTION {
    FSA_RESULT_ACTION_NONE = 0,                 // NOP
    FSA_RESULT_ACTION_DELETE = 1,               // Delete file
    FSA_RESULT_ACTION_DELETEPLACEHOLDER = 2,    // Delete reparse point
    FSA_RESULT_ACTION_LIST = 3,                 // Create reparse point, add to premigration list, save migrate time
    FSA_RESULT_ACTION_OPEN = 4,                 // Rewrite reparse point (not truncated), tell filter to open
    FSA_RESULT_ACTION_PEEK = 5,                 // Rewrite reparse point (not truncated), tell filter to open & truncate on close
    FSA_RESULT_ACTION_REPARSE = 6,              // Tell filter to open a file with the specified path
    FSA_RESULT_ACTION_TRUNCATE = 7,             // Create reparse point, truncate file, save migrate time
    FSA_RESULT_ACTION_REWRITEPLACEHOLDER = 8,   // Rewrite reparse point
    FSA_RESULT_ACTION_RECALLEDDATA = 9,         // Rewrite reparse point (not truncated), update recall count, save recall time
    FSA_RESULT_ACTION_NORECALL = 10,            // Just tell the filter the read is complete
    FSA_RESULT_ACTION_FAIL = 11,                // Fail the request action (for demand recalls)
    FSA_RESULT_ACTION_VALIDATE_OK = 12,         // Item is OK in engine DBs
    FSA_RESULT_ACTION_VALIDATE_BAD = 13,        // Item is not OK in engine DBs
    FSA_RESULT_ACTION_VALIDATE_FOR_TRUNCATE_OK = 14,         // Item is OK in engine DBs
    FSA_RESULT_ACTION_VALIDATE_FOR_TRUNCATE_BAD = 15         // Item is not OK in engine DBs
} FSA_RESULT_ACTION;

typedef struct _FSA_PLACEHOLDER {
    BOOL        isTruncated;        // Set by:  FSA - Is the file truncated
    BOOL        truncateOnClose;    //          FSA - Tells k-mode filter to let FSA know when close happens (truncate action)
    BOOL        premigrateOnClose;  //          FSA - Tells k-mode filter to let FSA know when close happens (premigrate action)
    FILETIME    migrationTime;      //          FSA - Date/Time of premigration
    GUID        hsmId;              //          HSM - HSM containing premigrated data
    GUID        bagId;              //          HSM - BAG within HSM containing the data
    LONGLONG    fileStart;          //          HSM - Start location of file data within the bag
    LONGLONG    fileSize;           //          HSM - Size of the file data
    LONGLONG    dataStart;          //          HSM - Start location of the unnamed data stream within the file data
    LONGLONG    dataSize;           //          FSA - Logical size of the unnamed data stream
    LONGLONG    fileVersionId;      //          FSA - Indicates a particular version of the file
    LONGLONG    verificationData;   //          HSM - Data integrity check value
    ULONG       verificationType;   //          HSM - Type of integrity check
    ULONG       recallCount;        //          FSA - Number of recalls for this file
    FILETIME    recallTime;         //          FSA - Date/time of last recall
    LONGLONG    dataStreamStart;    //          FSA - starting location of data within the stream
    LONGLONG    dataStreamSize;     //          FSA - size of data within the stream (bytes)
    LONG        dataStream;         //          FSA - identifier of the datastream 
    ULONG       dataStreamCRCType;  //          MOVER - Type of CRC algorithm for datastream CRC
    LONGLONG    dataStreamCRC;      //          MOVER - Datastream CRC
} FSA_PLACEHOLDER, *PFSA_PLACEHOLDER;


