typedef enum  _BG_JOB_STATE{
  BG_JOB_STATE_QUEUED,
  BG_JOB_STATE_CONNECTING,
  BG_JOB_STATE_TRANSFERRING,
  BG_JOB_STATE_SUSPENDED,
  BG_JOB_STATE_ERROR,
  BG_JOB_STATE_TRANSIENT_ERROR,
  BG_JOB_STATE_TRANSFERRED,
  BG_JOB_STATE_ACKNOWLEDGED,
  BG_JOB_STATE_CANCELLED
} BG_JOB_STATE;


typedef enum  _BG_JOB_PROXY_USAGE{
  BG_JOB_PROXY_USAGE_PRECONFIG,
  BG_JOB_PROXY_USAGE_NO_PROXY,
  BG_JOB_PROXY_USAGE_OVERRIDE,
  BG_JOB_PROXY_USAGE_AUTODETECT
} BG_JOB_PROXY_USAGE;


typedef enum  _BG_JOB_PRIORITY{
  BG_JOB_PRIORITY_FOREGROUND,
  BG_JOB_PRIORITY_HIGH,
  BG_JOB_PRIORITY_NORMAL,
  BG_JOB_PRIORITY_LOW
} BG_JOB_PRIORITY;

typedef enum  _BG_ERROR_CONTEXT{
  BG_ERROR_CONTEXT_NONE                        = 0,
  BG_ERROR_CONTEXT_UNKNOWN                     = 1,
  BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER       = 2,
  BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION  = 3,
  BG_ERROR_CONTEXT_LOCAL_FILE                  = 4,
  BG_ERROR_CONTEXT_REMOTE_FILE                 = 5,
  BG_ERROR_CONTEXT_GENERAL_TRANSPORT           = 6,
  BG_ERROR_CONTEXT_REMOTE_APPLICATION          = 7
} BG_ERROR_CONTEXT;

typedef enum  _BG_JOB_TYPE{
  BG_JOB_TYPE_DOWNLOAD,
  BG_JOB_TYPE_UPLOAD,
  BG_JOB_TYPE_UPLOAD_REPLY
} BG_JOB_TYPE;

typedef struct _BG_FILE_PROGRESS {
  UINT64 BytesTotal;
  UINT64 BytesTransferred;
  BOOL   Completed;
} BG_FILE_PROGRESS;


typedef struct _BG_JOB_PROGRESS {
  UINT64 BytesTotal;
  UINT64 BytesTransferred;
  ULONG  FilesTotal;
  ULONG  FilesTransferred;
} BG_JOB_PROGRESS;


typedef struct _BG_FILE_INFO {
  LPWSTR RemoteName;
  LPWSTR LocalName;
} BG_FILE_INFO;


typedef struct _BG_JOB_TIMES {
  FILETIME CreationTime;
  FILETIME ModificationTime;
  FILETIME TransferCompletionTime;
} BG_JOB_TIMES;