home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / NETCLB35.ZIP / NETCLB35.EXE / INCLUDE / NWQUEUE.H < prev    next >
C/C++ Source or Header  |  1996-01-03  |  4KB  |  120 lines

  1. #ifndef NWQUEUE_H
  2. #define NWQUEUE_H
  3.  
  4. /***************************/
  5. /* QMS Job Entry structure */
  6. /***************************/
  7.  
  8. typedef struct {
  9.    byte client_station;
  10.    byte client_task_number;
  11.    long client_id_number;
  12.    long target_server_id_number;   /* -1 = non specified */
  13.    byte target_execution_time[6];  /* year,month,day,hours,minutes,seconds */
  14.    byte job_entry_time[6];         /* year,month,day,hours,minutes,seconds */
  15.    word job_number;
  16.    word job_type;
  17.    byte job_position;
  18.    byte job_control_flags;
  19.    byte job_file_name[14];
  20.    byte job_file_handle[6];
  21.    byte server_station;
  22.    byte server_task_number;
  23.    long server_id_number;
  24.    char text_job_description[50];
  25.    byte client_record_area[152];
  26.    } QUEUE_JOB_ENTRY;
  27.  
  28. /*************************/
  29. /* QMS job control flags */
  30. /*************************/
  31.  
  32. #define QF_OPERATOR_HOLD  0x80
  33. #define QF_USER_HOLD      0x40
  34. #define QF_ENTRY_OPEN     0x20
  35. #define QF_ENTRY_RESTART  0x10
  36. #define QF_AUTO_START     0x08
  37.  
  38. /**********************************/
  39. /* print queue client record area */
  40. /**********************************/
  41.  
  42. typedef struct {
  43.    byte   version;
  44.    byte   tab_size;
  45.    nw_int copies;
  46.    word   control_flags;
  47.    int    maximum_lines;
  48.    int    maximum_characters;
  49.    char   form_name[16];
  50.    byte   reserved[6];
  51.    char   banner_name[13];
  52.    char   fname_on_banner[13];
  53.    char   fname_in_header[14];
  54.    char   directory_path[80];
  55.    } PSRV_CLIENT_AREA;
  56.  
  57. /*****************************/
  58. /* print queue control flags */
  59. /*****************************/
  60.  
  61. #define PSRVF_TEXT        0x4000
  62. #define PSRVF_BANNER      0x8000
  63. #define PSRVF_NOFF        0x0800
  64.  
  65. /*****************************/
  66. /* Queue Services prototypes */
  67. /*****************************/
  68.  
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. int   AbortServicingQueueJobAndFile(long queueID,word jobNumber,
  73.                  int fileHandle);
  74. int   AttachQueueServerToQueue(long queueID);
  75. int   ChangeQueueJobEntry(long queueID,
  76.                  QUEUE_JOB_ENTRY *jobEntry);
  77. int   ChangeQueueJobPosition(long queueID,word jobNumber,
  78.                  byte newPosition);
  79. int   ChangeToClientRights(long queueID,word jobNumber);
  80. int   CloseFileAndAbortQueueJob(long queueID,word jobNumber,
  81.                  int fileHandle);
  82. int   CloseFileAndStartQueueJob(long queueID,word jobNumber,
  83.                  int fileHandle);
  84. int   CreateQueue(char *queueName,int queueType,
  85.                  char directoryHandle,char *pathName,
  86.                  long *queueID);
  87. int   CreateQueueJobAndFile(long queueID,
  88.                  QUEUE_JOB_ENTRY *jobEntry,
  89.                  int *fileHandle);
  90. int   DestroyQueue(long queueID);
  91. int   DetachQueueServerFromQueue(long queueID);
  92. int   FinishServicingQueueJobAndFile(long queueID,
  93.                  word jobNumber,long charge,int fileHandle);
  94. int   GetQueueJobList(long queueID,word *jobCount,
  95.                  word *jobNumbers );
  96. int   GetQueueJobsFileSize(long queueID,word jobNumber,
  97.                  long *fileSize);
  98. int   ReadQueueCurrentStatus(long queueID,
  99.                  byte *queueStatus,byte *numberOfJobs,
  100.                  byte *numberOfServers,
  101.                  long *serverIDList,
  102.                  word *serverStationList);
  103. int   ReadQueueJobEntry(long queueID,word jobNumber,
  104.                  QUEUE_JOB_ENTRY *jobEntry);
  105. int   ReadQueueServerCurrentStatus(long queueID,long serverID,
  106.                  byte serverStation,byte *serverStatusRecord);
  107. int   RemoveJobFromQueue(long queueID,word jobNumber);
  108. int   RestoreQueueServerRights(void);
  109. int   ServiceQueueJobAndOpenFile(long queueID,word targetJobType,
  110.                  QUEUE_JOB_ENTRY *jobEntry,
  111.                  int *fileHandle);
  112. int   SetQueueCurrentStatus(long queueID,byte queueStatus);
  113. int   SetQueueServerCurrentStatus(long queueID,
  114.                  byte *serverStatusRecord);
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118.      
  119. #endif
  120.