// jobdef.idl : IDL defintions for Jobs.dll
//

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

typedef [v1_enum] enum _HSM_JOB_ACTION {
    HSM_JOB_ACTION_UNKNOWN      = 0,
    HSM_JOB_ACTION_COPY         = 1,
    HSM_JOB_ACTION_DELETE       = 2,
    HSM_JOB_ACTION_MOVE         = 3,
    HSM_JOB_ACTION_NONE         = 4,
    HSM_JOB_ACTION_PREMIGRATE   = 5,
    HSM_JOB_ACTION_RECALL       = 6,
    HSM_JOB_ACTION_RECYCLE      = 7,
    HSM_JOB_ACTION_REPAIR       = 8,
    HSM_JOB_ACTION_SCAN         = 9,
    HSM_JOB_ACTION_TRUNCATE     = 10,
    HSM_JOB_ACTION_UNMANAGE     = 11,
    HSM_JOB_ACTION_VALIDATE     = 12
} HSM_JOB_ACTION;

typedef [v1_enum] enum _HSM_JOB_ACTION_ON_RESOURCE {
    HSM_JOB_ACTION_ON_RESOURCE_PRE_VALIDATE  = 0,
    HSM_JOB_ACTION_ON_RESOURCE_POST_VALIDATE = 1
} HSM_JOB_ACTION_ON_RESOURCE;

typedef [v1_enum] enum _HSM_JOB_EVENT {
    HSM_JOB_EVENT_CANCEL            = 0,
    HSM_JOB_EVENT_FAIL              = 1,
    HSM_JOB_EVENT_LOWER_PRIORITY    = 2,
    HSM_JOB_EVENT_PAUSE             = 3,
    HSM_JOB_EVENT_RAISE_PRIORITY    = 4,
    HSM_JOB_EVENT_RESUME            = 5,
    HSM_JOB_EVENT_START             = 6,
    HSM_JOB_EVENT_SUSPEND           = 7
} HSM_JOB_EVENT;

typedef [v1_enum] enum _HSM_JOB_PHASE {
    HSM_JOB_PHASE_ALL           = 0,
    HSM_JOB_PHASE_SCAN          = 1,
    HSM_JOB_PHASE_FSA_ACTION    = 2,
    HSM_JOB_PHASE_MOVE_ACTION   = 3,
    HSM_JOB_PHASE_POST_ACTION   = 4
} HSM_JOB_PHASE;

typedef [v1_enum] enum _HSM_JOB_PRIORITY {
    HSM_JOB_PRIORITY_IDLE       = 0,
    HSM_JOB_PRIORITY_LOWEST     = 1,
    HSM_JOB_PRIORITY_LOW        = 2,
    HSM_JOB_PRIORITY_NORMAL     = 3,
    HSM_JOB_PRIORITY_HIGH       = 4,
    HSM_JOB_PRIORITY_HIGHEST    = 5,
    HSM_JOB_PRIORITY_CRITICAL   = 6
} HSM_JOB_PRIORITY;

typedef [v1_enum] enum _HSM_JOB_MEDIA_STATE {
    HSM_JOB_MEDIA_STATE_IDLE            = 0,
    HSM_JOB_MEDIA_STATE_UNAVAILABLE     = 1,
    HSM_JOB_MEDIA_STATE_MOUNTING        = 2,
    HSM_JOB_MEDIA_STATE_MOUNTED         = 3,
    HSM_JOB_MEDIA_STATE_TRANSFERRING    = 4,
    HSM_JOB_MEDIA_STATE_TRANSFERRED     = 5,
    HSM_JOB_MEDIA_STATE_DISMOUNTING     = 6,
    HSM_JOB_MEDIA_STATE_DISMOUNTED      = 7,
    HSM_JOB_MEDIA_STATE_BUSY            = 8,
    HSM_JOB_MEDIA_STATE_FAILED          = 9
} HSM_JOB_MEDIA_STATE;

typedef [v1_enum] enum _HSM_JOB_MEDIA_TYPE {
    HSM_JOB_MEDIA_TYPE_UNKNOWN          = 0,
    HSM_JOB_MEDIA_TYPE_FIXED_MAG        = 1,
    HSM_JOB_MEDIA_TYPE_REMOVABLE_MAG    = 2,
    HSM_JOB_MEDIA_TYPE_OPTICAL          = 3,
    HSM_JOB_MEDIA_TYPE_TAPE             = 4
} HSM_JOB_MEDIA_TYPE;

// See job.h for some macros that define groups of states (e.g. HSM_JOB_STATE_IS_ACTIVE()).
typedef [v1_enum] enum _HSM_JOB_STATE {
    HSM_JOB_STATE_ACTIVE        = 0,
    HSM_JOB_STATE_CANCELLED     = 1,
    HSM_JOB_STATE_CANCELLING    = 2,
    HSM_JOB_STATE_DONE          = 3,
    HSM_JOB_STATE_FAILED        = 4,
    HSM_JOB_STATE_IDLE          = 5,
    HSM_JOB_STATE_PAUSED        = 6,
    HSM_JOB_STATE_PAUSING       = 7,
    HSM_JOB_STATE_RESUMING      = 8,
    HSM_JOB_STATE_SKIPPED       = 9,
    HSM_JOB_STATE_STARTING      = 10,
    HSM_JOB_STATE_SUSPENDED     = 11,
    HSM_JOB_STATE_SUSPENDING    = 12
} HSM_JOB_STATE;


cpp_quote( "//" )
cpp_quote( "// There are three types of unmanage jobs:" )
cpp_quote( "//" )
cpp_quote( "//    HSM_JOB_DEF_TYPE_UNMANAGE - Unmanages all files on volume, volume still configured" )
cpp_quote( "//" )
cpp_quote( "//    HSM_JOB_DEF_TYPE_FULL_UNMANAGE - Unmanages all files on volume and unconfigures" )
cpp_quote( "//" )
cpp_quote( "//    HSM_JOB_DEF_TYPE_QUICK_UNMANAGE - Deletes truncated files, unmanages premigrated," )
cpp_quote( "//                                      removes volume from management" )
cpp_quote( "//" )

typedef [v1_enum] enum _HSM_JOB_DEF_TYPE {
    HSM_JOB_DEF_TYPE_MANAGE         = 0,
    HSM_JOB_DEF_TYPE_RECALL         = 1,
    HSM_JOB_DEF_TYPE_TRUNCATE       = 2,
    HSM_JOB_DEF_TYPE_UNMANAGE       = 3,
    HSM_JOB_DEF_TYPE_VALIDATE       = 4,
    HSM_JOB_DEF_TYPE_FULL_UNMANAGE  = 5,
    HSM_JOB_DEF_TYPE_QUICK_UNMANAGE = 6
} HSM_JOB_DEF_TYPE;

