//-----------------------------------------------------------------------
// 
//     Copyright (c) Microsoft Corporation.
// 
//-----------------------------------------------------------------------
namespace Microsoft.Isam.Esent.Interop.Vista
{
    using System;
#if !MANAGEDESENT_ON_WSA
    /// 
    /// Options for .
    /// 
    [Flags]
    public enum SnapshotEndGrbit
    {
        /// 
        /// Default options.
        /// 
        None = 0,
    
        /// 
        /// The snapshot session aborted.
        /// 
        AbortSnapshot = 0x1,
    }
    /// 
    /// Options for .
    /// 
    [Flags]
    public enum SnapshotPrepareInstanceGrbit
    {
        /// 
        /// Default options.
        /// 
        None = 0,
    }
    /// 
    /// Options for 
    /// and .
    /// 
    [Flags]
    public enum SnapshotTruncateLogGrbit
    {
        /// 
        /// No truncation will occur.
        /// 
        None = 0,
        /// 
        /// All the databases are attached so the storage engine can compute
        /// and do the log truncation.
        /// 
        AllDatabasesSnapshot = 0x1,
    }
    /// 
    /// Options for .
    /// 
    [Flags]
    public enum SnapshotGetFreezeInfoGrbit
    {
        /// 
        /// Default options.
        /// 
        None = 0,
    }
    /// 
    /// Information levels for .
    /// 
    [Flags]
    public enum JET_InstanceMiscInfo
    {
        /// 
        /// Get the signature of the transaction log associated with this sequence.
        /// 
        LogSignature = 0,
    }
#endif // !MANAGEDESENT_ON_WSA
    /// 
    /// Grbits that have been added to the Vista version of ESENT.
    /// 
    public static class VistaGrbits
    {
        /// 
        /// Specifying this flag for an index that has more than one key column
        /// that is a multi-valued column will result in an index entry being
        /// created for each result of a cross product of all the values in
        /// those key columns. Otherwise, the index would only have one entry
        /// for each multi-value in the most significant key column that is a
        /// multi-valued column and each of those index entries would use the
        /// first multi-value from any other key columns that are multi-valued columns.
        /// 
        /// For example, if you specified this flag for an index over column
        /// A that has the values "red" and "blue" and over column B that has
        /// the values "1" and "2" then the following index entries would be
        /// created: "red", "1"; "red", "2"; "blue", "1"; "blue", "2". Otherwise,
        /// the following index entries would be created: "red", "1"; "blue", "1".
        /// 
        /// 
        public const CreateIndexGrbit IndexCrossProduct = (CreateIndexGrbit)0x4000;
        /// 
        /// Specifying this flag will cause any update to the index that would
        /// result in a truncated key to fail with .
        /// Otherwise, keys will be silently truncated.
        /// 
        public const CreateIndexGrbit IndexDisallowTruncation = (CreateIndexGrbit)0x10000;
        /// 
        /// Index over multiple multi-valued columns but only with values of same itagSequence.
        /// 
        public const CreateIndexGrbit IndexNestedTable = (CreateIndexGrbit)0x20000;
#if !MANAGEDESENT_ON_WSA
        /// 
        /// The engine can mark the database headers as appropriate (for example,
        /// a full backup completed), even though the call to truncate was not completed.
        /// 
        public const EndExternalBackupGrbit TruncateDone = (EndExternalBackupGrbit)0x100;
#endif // !MANAGEDESENT_ON_WSA
        /// 
        /// Perform recovery, but halt at the Undo phase. Allows whatever logs are present to
        /// be replayed, then later additional logs can be copied and replayed.
        /// 
        public const InitGrbit RecoveryWithoutUndo = (InitGrbit)0x8;
        /// 
        /// On successful soft recovery, truncate log files.
        /// 
        public const InitGrbit TruncateLogsAfterRecovery = (InitGrbit)0x00000010;
        /// 
        /// Missing database map entry default to same location.
        /// 
        public const InitGrbit ReplayMissingMapEntryDB = (InitGrbit)0x00000020;
        /// 
        /// Transaction logs must exist in the log file directory
        /// (i.e. can't auto-start a new stream).
        /// 
        public const InitGrbit LogStreamMustExist = (InitGrbit)0x40;
#if !MANAGEDESENT_ON_WSA
        /// 
        /// The snapshot session continues after JetOSSnapshotThaw and will
        /// require a JetOSSnapshotEnd function call.
        /// 
        public const SnapshotPrepareGrbit ContinueAfterThaw = (SnapshotPrepareGrbit)0x4;
#endif // !MANAGEDESENT_ON_WSA
        /// 
        /// Specifying this flag will cause the index to use the maximum key size
        /// specified in the cbKeyMost field in the structure. Otherwise, the
        /// index will use JET_cbKeyMost (255) as its maximum key size.
        /// 
        /// 
        /// Set internally when the NATIVE_INDEXCREATE structure is generated.
        /// 
        internal const CreateIndexGrbit IndexKeyMost = (CreateIndexGrbit)0x8000;
        /// 
        /// LCID field of JET_INDEXCREATE actually points to a JET_UNICODEINDEX
        /// struct to allow user-defined LCMapString() flags.
        /// 
        internal const CreateIndexGrbit IndexUnicode = (CreateIndexGrbit)0x00000800;
    }
}