1#ifndef __printing_h__ 2#define __printing_h__ 3 4#include "beCompat.h" 5#include "betalk.h" 6 7 8typedef struct 9{ 10 char printerName[MAX_NAME_LENGTH]; 11 char deviceName[B_FILE_NAME_LENGTH]; 12 char deviceType[MAX_NAME_LENGTH]; 13 char spoolDir[B_PATH_NAME_LENGTH]; 14 15 bool killed; 16 bool used; 17 18 bt_user_rights *rights; 19 int security; 20 21 HANDLE handlerID; 22} bt_printer; 23 24 25typedef struct printJob 26{ 27 char jobName[MAX_DESC_LENGTH + 1]; 28 char jobFile[B_PATH_NAME_LENGTH + 1]; 29 uint32 sourceAddr; 30 char sourceUser[MAX_USERNAME_LENGTH + 1]; 31 char status[MAX_DESC_LENGTH + 1]; 32 struct printJob *next; 33} bt_print_job; 34 35 36// Although there is no maximum number of entries that can be queued for 37// printing, except as limited by available disk space, for simplicity 38// BeServed will only report on the first MAX_PRINT_JOBS in the queue. 39// This keeps the print job query from requiring repeated calls to handle 40// large volume. 41 42#define MAX_PRINT_JOBS (BT_MAX_IO_BUFFER / sizeof(bt_print_job)) 43 44int btPrintJobNew(char *printerName, char *user, char *password, int client_s_addr, char *jobName, char *jobId); 45int btPrintJobData(char *printerName, char *jobId, char *jobData, int dataLen); 46int btPrintJobCommit(char *printerName, char *jobId); 47int btPrintJobQuery(char *printerName, bt_print_job *jobList); 48 49#endif