00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "python/py_spoolss.h"
00022 #include "python/py_conv.h"
00023
00024 struct pyconv py_JOB_INFO_1[] = {
00025 { "jobid", PY_UINT32, offsetof(JOB_INFO_1, jobid) },
00026 { "printer_name", PY_UNISTR, offsetof(JOB_INFO_1, printername) },
00027 { "server_name", PY_UNISTR, offsetof(JOB_INFO_1, machinename) },
00028 { "user_name", PY_UNISTR, offsetof(JOB_INFO_1, username) },
00029 { "document_name", PY_UNISTR, offsetof(JOB_INFO_1, document) },
00030 { "data_type", PY_UNISTR, offsetof(JOB_INFO_1, datatype) },
00031 { "text_status", PY_UNISTR, offsetof(JOB_INFO_1, text_status) },
00032 { "status", PY_UINT32, offsetof(JOB_INFO_1, status) },
00033 { "priority", PY_UINT32, offsetof(JOB_INFO_1, priority) },
00034 { "position", PY_UINT32, offsetof(JOB_INFO_1, position) },
00035 { "total_pages", PY_UINT32, offsetof(JOB_INFO_1, totalpages) },
00036 { "pages_printed", PY_UINT32, offsetof(JOB_INFO_1, pagesprinted) },
00037 { NULL }
00038 };
00039
00040 struct pyconv py_JOB_INFO_2[] = {
00041 { "jobid", PY_UINT32, offsetof(JOB_INFO_2, jobid) },
00042 { "printer_name", PY_UNISTR, offsetof(JOB_INFO_2, printername) },
00043 { "server_name", PY_UNISTR, offsetof(JOB_INFO_2, machinename) },
00044 { "user_name", PY_UNISTR, offsetof(JOB_INFO_2, username) },
00045 { "document_name", PY_UNISTR, offsetof(JOB_INFO_2, document) },
00046 { "notify_name", PY_UNISTR, offsetof(JOB_INFO_2, notifyname) },
00047 { "data_type", PY_UNISTR, offsetof(JOB_INFO_2, datatype) },
00048 { "print_processor", PY_UNISTR, offsetof(JOB_INFO_2, printprocessor) },
00049 { "parameters", PY_UNISTR, offsetof(JOB_INFO_2, parameters) },
00050 { "driver_name", PY_UNISTR, offsetof(JOB_INFO_2, drivername) },
00051 { "text_status", PY_UNISTR, offsetof(JOB_INFO_2, text_status) },
00052 { "status", PY_UINT32, offsetof(JOB_INFO_2, status) },
00053 { "priority", PY_UINT32, offsetof(JOB_INFO_2, priority) },
00054 { "position", PY_UINT32, offsetof(JOB_INFO_2, position) },
00055 { "start_time", PY_UINT32, offsetof(JOB_INFO_2, starttime) },
00056 { "until_time", PY_UINT32, offsetof(JOB_INFO_2, untiltime) },
00057 { "total_pages", PY_UINT32, offsetof(JOB_INFO_2, totalpages) },
00058 { "size", PY_UINT32, offsetof(JOB_INFO_2, size) },
00059 { "time_elapsed", PY_UINT32, offsetof(JOB_INFO_2, timeelapsed) },
00060 { "pages_printed", PY_UINT32, offsetof(JOB_INFO_2, pagesprinted) },
00061 { NULL }
00062 };
00063
00064 struct pyconv py_DOC_INFO_1[] = {
00065 { "document_name", PY_UNISTR, offsetof(DOC_INFO_1, docname) },
00066 { "output_file", PY_UNISTR, offsetof(DOC_INFO_1, outputfile) },
00067 { "data_type", PY_UNISTR, offsetof(DOC_INFO_1, datatype) },
00068 { NULL }
00069 };
00070
00071 BOOL py_from_JOB_INFO_1(PyObject **dict, JOB_INFO_1 *info)
00072 {
00073 *dict = from_struct(info, py_JOB_INFO_1);
00074 return True;
00075 }
00076
00077 BOOL py_to_JOB_INFO_1(JOB_INFO_1 *info, PyObject *dict)
00078 {
00079 return False;
00080 }
00081
00082 BOOL py_from_JOB_INFO_2(PyObject **dict, JOB_INFO_2 *info)
00083 {
00084 *dict = from_struct(info, py_JOB_INFO_2);
00085 return True;
00086 }
00087
00088 BOOL py_to_JOB_INFO_2(JOB_INFO_2 *info, PyObject *dict)
00089 {
00090 return False;
00091 }
00092
00093 BOOL py_from_DOC_INFO_1(PyObject **dict, DOC_INFO_1 *info)
00094 {
00095 *dict = from_struct(info, py_DOC_INFO_1);
00096 return True;
00097 }
00098
00099 BOOL py_to_DOC_INFO_1(DOC_INFO_1 *info, PyObject *dict)
00100 {
00101 return to_struct(info, dict, py_DOC_INFO_1);
00102 }