/*___________________________ opJobStructs.h _____________________________*/ /* */ /* 1 2 3 4 5 6 7 */ /*3456789012345678901234567890123456789012345678901234567890123456789012345678*/ /**************************************|***************************************/ /* */ /* Copyright (c) 2007 Glen Petrie All rights reserved. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, and/or sell copies of the Software, and to permit persons */ /* to whom the Software is furnished to do so, subject to the following */ /* conditions: */ /* */ /* The rights to use, copy, modify, merge, publish, distribute, and/or */ /* sell copies of this Software or any material modification thereof */ /* shall not be further restricted by any means, including, but not */ /* limited to, the GNU General Public License. */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* */ /* */ /**************************************|***************************************/ /* */ /* Open-Printing Embedded Print */ /* */ /* Global 'Job Data Structs' Include (Header) File */ /* */ /**************************************|***************************************/ /* */ /* Contributors: */ /* Glen W. Petrie / The World of Graphics */ /* */ /**************************************|***************************************/ /* */ /* Revision Log */ /* Date Who */ /* 2007.07.27 Glen W. Petrie */ /* # Original code */ /* */ /**************************************|***************************************/ /* */ /* Special Software and/or Usage Information */ /* */ /* # All exposed API's in this file utilize the OPEP global link-list error */ /* structure with the global variable name of op_error. */ /* */ /**************************************|***************************************/ #if !defined _OP_JOB_STRUCTS_H_ #define _OP_JOB_STRUCTS_H_ #ifdef __cplusplus extern "C" { #endif /*-------------------------------- Includes -------------------------------*/ /**************************************|***************************************/ #include "opGeneric.h" #include "opEnums.h" /*------------------------------- Definitions -----------------------------*/ /**************************************|***************************************/ /*--------------------------- Macro Definitions ----------------------------*/ /**************************************|***************************************/ /*--------------------------- Struct Definitions ---------------------------*/ /**************************************|***************************************/ /*** Stitching */ /* ---------------------------------------------------------------------- */ typedef struct _op_stitching_ { OP_STP type; /* Stitch Type (enum)*/ OP_BIT32 count; /* Hole count */ OP_INT32 angle; /* Stitch angle */ OP_RFE refEdge; /* Reference edge for folding (enum)*/ /*** Next Stitching ---------- */ /*** Only Single valued object */ /*** However, a "next" has been added to simplify general software codnig */ void* next; /* Pointer to next event */ } OP_STITCH; typedef OP_STITCH* OP_STITCH_ID; /* 1 2 3 4 5 */ /*** Hole Making */ /* ---------------------------------------------------------------------- */ typedef struct _op_hole_making_ { OP_BIT32 count; /* Hole count */ OP_RFE refEdge; /* Reference edge for folding (enum)*/ /*** Next Hole Making ---------- */ void* next; /* Pointer to next event */ } OP_HOLE_MK; typedef OP_HOLE_MK* OP_HOLE_MK_ID; /* 1 2 3 4 5 */ /*** Folding */ /* ---------------------------------------------------------------------- */ typedef struct _op_folding_ { OP_FDT foldType; /* Folding type (enum)*/ OP_RFE refEdge; /* Reference edge for folding (enum)*/ /*** Next Folding ---------- */ void* next; /* Pointer to next event */ } OP_FOLDING; typedef OP_FOLDING* OP_FOLDING_ID; /* 1 2 3 4 5 */ /*** Destination */ /* ---------------------------------------------------------------------- */ typedef struct _op_destination_ { char* uri; /* Target uri */ /*** Next Destination ---------- */ void* next; /* Pointer to next event */ } OP_DEST; typedef OP_DEST* OP_DEST_ID; /* 1 2 3 4 5 */ /*** Media */ /* ---------------------------------------------------------------------- */ typedef struct _op_media_ { char* name; /* Name for media */ char* description; /* Description for media */ OP_MTP type; /* Type of media (enum)*/ OP_BIT32 precentRecycled; /* Percentage recycled */ char* sizeName; /* Size as a name of media */ OP_BIT32 xDim; /* Dimension in x direction */ OP_BIT32 yDim; /* Dimension in y direction */ OP_MCL color; /* Color for media (enum)*/ char* colorName; /* Name of color media */ OP_MPP prePrinted; /* Preprinted media (enum)*/ OP_BIT32 weight; /* Weight of media */ OP_MCT frontCoating; /* Front coating for media (enum)*/ OP_MCT backCoating; /* Back coating for media (enum)*/ OP_BIT32 setCount; /* Set Count of media */ OP_BIT32 holeCount; /* Hole Count of media */ OP_PST manualFeed; /* Presense of manual feed (enum)*/ OP_ITN feedTray; /* Feed for input tray (enum)*/ /*** Next Media ---------- */ void* next; /* Pointer to next event */ } OP_MEDIA; typedef OP_MEDIA* OP_MEDIA_ID; /* 1 2 3 4 5 */ /*** Page Range */ /* ---------------------------------------------------------------------- */ typedef struct _op_page_range_ { OP_INT32 lower; /* Lower Doc Page Range value [1] */ OP_INT32 upper; /* Upper Doc Page Range value [last] */ /*** Next Page Range ---------- */ void* next; /* Pointer to next event */ } OP_PAG_RNG; typedef OP_PAG_RNG* OP_PAG_RNG_ID; /* 1 2 3 4 5 */ /*** Insert Sheet */ /* ---------------------------------------------------------------------- */ typedef struct _op_insert_sheet_ { OP_ISC content; /* Insert Sheet content (enum)*/ OP_BIT32 count; /* Insert Sheet count */ OP_MEDIA_ID media; /* Media for Insert Sheet */ OP_POS position; /* Position for insert sheets (enum)*/ OP_PAG_RNG_ID insertPageRange; /* Page ranges for insert sheets */ /*** Next Insert Sheet ---------- */ void* next; /* Pointer to next event */ } OP_INS_SHEET; typedef OP_INS_SHEET* OP_INS_SHEET_ID; /* 1 2 3 4 5 */ /*** Force Page */ /* ---------------------------------------------------------------------- */ typedef struct _op_force_page_ { OP_INT32 xPos; /* Force Page cell x position */ OP_INT32 yPos; /* Force Page cell y position */ OP_BIT32 page; /* Page to force page */ OP_SSD side; /* Sheet side to force page (enum)*/ /*** Next Force Page ---------- */ void* next; /* Pointer to next event */ } OP_FRC_PAGE; typedef OP_FRC_PAGE* OP_FRC_PAGE_ID; /* 1 2 3 4 5 */ /*** Separator Sheet */ /* ---------------------------------------------------------------------- */ typedef struct _op_separator_sheet_ { char* message; /* Message for separator sheets */ OP_SSH action; /* Action for separator sheets (enum)*/ OP_MEDIA_ID media; /* Media for separator sheets */ /*** Next Separator Sheet ---------- */ void* next; /* Pointer to next event */ } OP_SEP_SHEET; typedef OP_SEP_SHEET* OP_SEP_SHEET_ID; /* 1 2 3 4 5 */ /*** Subscription */ /* ---------------------------------------------------------------------- */ #define OP_SUB_EVENT_LIST_SIZE 20 #define OP_SUB_JATT_LIST_SIZE 20 typedef struct _op_subscription_ { char* charSet; char* comment; OP_SEV events[OP_SUB_EVENT_LIST_SIZE];/*List of trigger event*/ OP_INT32 numEvents; /* (Internal) num of events */ OP_INT32 eventIdx; /* (Internal) Current idx caller is at */ char* jobAttr[OP_SUB_JATT_LIST_SIZE];/* List of Job Attrib */ OP_INT32 numJobAttr; /* (Internal) num of job attributes */ OP_INT32 jaIdx; /* (Internal) Current idx caller is at */ char* naturalLang; /* Natural Language */ char* sendToUri; /* URI to send ?????????/ */ /*** Next Subscription ---------- */ void* next; /* Pointer to next subscription */ } OP_SUBSCR; typedef OP_SUBSCR* OP_SUBSCR_ID; /* 1 2 3 4 5 */ /*** Contact Info */ /* ---------------------------------------------------------------------- */ #define OP_CI_ROLE_LIST_SIZE 20 typedef struct _op_contact_info_ { char* address; /* Physical Mail / Location of contact */ char* company; /* Company (department) of contact */ char* contactUri; /* URI of contact */ char* details; /* Details ???? of contact */ char* name; /* Single Person Name of contact */ OP_CIR roles[OP_CI_ROLE_LIST_SIZE]; /* List of Roles (Enum)*/ OP_INT32 numRoles; /* (Internal) number of roles */ OP_INT32 roleIdx; /* (Internal) Current idx caller is at */ /*** Next Contact Info ---------- */ void* next; /* Pointer to next contact info */ } OP_CONT_INFO; typedef OP_CONT_INFO* OP_CONT_INFO_ID; /* 1 2 3 4 5 */ /*** Document */ /* ---------------------------------------------------------------------- */ typedef struct _op_doc_ { char* docURI; /* Pointer to first page in document */ OP_PAG_RNG_ID docPageRange; /* Document Page Range */ OP_FRC_PAGE_ID docForcePageId; /* Ptr to first force page in doc */ OP_INS_SHEET_ID docInsertSheetId; /* Ptr to first insert sheet */ /*** Next Document ---------- */ void* next; /* Pointer to next document in job */ } OP_DOC; typedef OP_DOC* OP_DOC_ID; /* 1 2 3 4 5 */ /*** Job */ /* ---------------------------------------------------------------------- */ typedef struct _op_job_ { char* author; /* Creator print job (job ticket) */ char* name; /* Name for job */ char* comment; /* Job Comment */ char* operMessage; /* Message to Operator */ OP_BIT32 priority; /* Print Job Priority */ char* format; /* (Document mime-type) Format for job */ char* language; /* (Document natural) Language for job */ OP_CMP compression; /* Job compression scheme (enum)*/ /*** Job Objects */ /*** -------------------------------------------------------------------- */ OP_DOC_ID docId; /* Pointer to first document in job */ OP_PAG_RNG_ID includePagesId; /* Job Page Range */ OP_PAG_RNG_ID outputPagesId; /* Job Page Range */ OP_DEST_ID destinationId; /* Pointer to first destination */ OP_CONT_INFO_ID contactInfoId; /* Pointer to first contact info */ OP_SUBSCR_ID subscrId; /* Pointer to first subscription */ OP_SEP_SHEET_ID sepShtId; /* Pointer to first separator sheet */ OP_FRC_PAGE_ID forcePageId; /* Pointer to first force page in doc */ OP_INS_SHEET_ID insertSheetId; /* Pointer to first insert sheet */ OP_HOLE_MK_ID holeMkId; /* Pointer to first hold making */ OP_MEDIA_ID mediaId; /* Media for job */ OP_FOLDING_ID foldingId; /* Pointer to folding */ OP_STITCH_ID stitchId; /* Pointer to stitching */ /*** Policies and Actions */ /*** -------------------------------------------------------------------- */ OP_CLT collate; /* Job collate attribute (enum)*/ OP_FDO feedOrient; /* Feed orientation for job (enum)*/ OP_PRD presentationDir; /* Presentation Direction (enum)*/ OP_FPL fitPolicy; /* Fit Policy for job (enum)*/ OP_HLD holdPolicy; /* Hold Policy for job (enum)*/ OP_OBN outputBin; /* Output Bin (enum)*/ OP_PGD pageDelivery; /* How page be place in output (enum)*/ OP_JGO jogOffset; /* Jog Offset for job (enum)*/ OP_BDT binding; /* Job binding (enum)*/ OP_SID sides; /* Sides (enum)*/ /*** Print Format Attributes */ /*** -------------------------------------------------------------------- */ OP_BIT32 xRes; /* Print resolution in X direction */ OP_BIT32 yRes; /* Print resolution in Y direction */ OP_PQL quality; /* Print Quality (enum)*/ OP_BIT32 xScale; /* Scale Factor in X direction */ OP_BIT32 yScale; /* Scale Factor in Y direction */ OP_ROT rotation; /* Print rotation (enum)*/ OP_BIT32 copies; /* Number of copies of print job */ OP_BIT32 xNumUp; /* Number up in x direction */ OP_BIT32 yNumUp; /* Number up in y direction */ /*** Image Attributes */ /*** -------------------------------------------------------------------- */ OP_IAX xImageAlign; /* X dimension image alignment (enum)*/ OP_IAY yImageAlign; /* Y dimension image alignment (enum)*/ OP_INT32 xImageShiftBack; /* X dim image shift back */ OP_INT32 yImageShiftBack; /* Y dim image shift back */ OP_INT32 xImageShiftFront; /* X dim image shift front */ OP_INT32 yImageShiftFront; /* Y dim image shift front */ /*** Margins */ /*** -------------------------------------------------------------------- */ OP_INT32 topMargin; /* Top margin */ OP_INT32 leftMargin; /* Left margin */ OP_INT32 bottomMargin; /* Bottom margin */ OP_INT32 rightMargin; /* Right margin */ /*** Accounting */ /*** -------------------------------------------------------------------- */ char* billingCode; /* Internal billing job to print job */ char* client; /* Client identifier for print job */ } OP_JOB; typedef OP_JOB* OP_JOB_ID; /* 1 2 3 4 5 */ /*** Job Ticket Info */ /* ---------------------------------------------------------------------- */ #define OP_JTI_ROLE_LIST_SIZE 20 typedef struct _op_job_ticket_info_ { char* author; /* Authors name of Job Ticket */ OP_BIT8 version[3]; /* Job Ticket API version */ char* charSet; /* Character Set for Job Ticket */ char* comment; /* Job Ticket comment */ OP_JTV typeVers; /* Job Ticket type and version (enum)*/ char* apiCharSet; /* Character Set for API's */ OP_BIT8 apiVersion[3]; /* Version for API's */ OP_PST fidelity; /* Presence of job tkt fidelity(enum) */ OP_LUN lengthUnits; /* Units for this job */ char* company; /* Company (department) of contact */ char* contactUri; /* URI of contact */ char* details; /* Details ???? of contact */ char* name; /* Single Person Name of contact */ char* roles[OP_JTI_ROLE_LIST_SIZE]; /* Roles (colon delimited) of contact */ OP_INT32 numRoles; /* (Internal) number of roles */ OP_INT32 roleIdx; /* (Internal) Current idx caller is at */ OP_JOB_ID jobId; /* Job associated with this job ticket */ OP_ERR_TRACE_ID error; /* Error Trace for this Job Ticket */ /*** Next Job Ticket Info ---------- */ void* next; /* Pointer to next Job Ticket Info */ } OP_JBTK_INFO; typedef OP_JBTK_INFO* OP_JBTK_INFO_ID; #define OP_JOB_TKT OP_JBTK_INFO #define OP_JOB_TKT_ID OP_JBTK_INFO_ID /*---------------------- Application Global Variables ---------------------*/ /**************************************|***************************************/ /*------------------------- Local Global Variables ------------------------*/ /**************************************|***************************************/ /*---------------------------- Local Functions ----------------------------*/ /**************************************|***************************************/ #ifdef __cplusplus } #endif #endif /*___________________________ opJobStructs.h _____________________________*/ /*3456789012345678901234567890123456789012345678901234567890123456789012345678*/ /* 1 2 3 4 5 6 7 */ /**************************************|***************************************/ /*** End of File ** End of File ** End of File ** End of File ** End of File */ /**************************************|***************************************/