関数 | |
BOOL | py_from_DEVICEMODE (PyObject **dict, DEVICEMODE *devmode) |
BOOL | py_to_DEVICEMODE (DEVICEMODE *devmode, PyObject *dict) |
BOOL | py_from_PRINTER_INFO_0 (PyObject **dict, PRINTER_INFO_0 *info) |
BOOL | py_to_PRINTER_INFO_0 (PRINTER_INFO_0 *info, PyObject *dict) |
BOOL | py_from_PRINTER_INFO_1 (PyObject **dict, PRINTER_INFO_1 *info) |
BOOL | py_to_PRINTER_INFO_1 (PRINTER_INFO_1 *info, PyObject *dict) |
BOOL | py_from_PRINTER_INFO_2 (PyObject **dict, PRINTER_INFO_2 *info) |
BOOL | py_to_PRINTER_INFO_2 (PRINTER_INFO_2 *info, PyObject *dict, TALLOC_CTX *mem_ctx) |
BOOL | py_from_PRINTER_INFO_3 (PyObject **dict, PRINTER_INFO_3 *info) |
BOOL | py_to_PRINTER_INFO_3 (PRINTER_INFO_3 *info, PyObject *dict, TALLOC_CTX *mem_ctx) |
変数 | |
pyconv | py_PRINTER_INFO_0 [] |
pyconv | py_PRINTER_INFO_1 [] |
pyconv | py_PRINTER_INFO_2 [] |
pyconv | py_PRINTER_INFO_3 [] |
pyconv | py_DEVICEMODE [] |
BOOL py_from_DEVICEMODE | ( | PyObject ** | dict, | |
DEVICEMODE * | devmode | |||
) |
py_spoolss_printers_conv.c の 150 行で定義されています。
参照先 devicemode::dev_private・devicemode::driverextra・from_struct()・py_DEVICEMODE.
00151 { 00152 *dict = from_struct(devmode, py_DEVICEMODE); 00153 00154 PyDict_SetItemString(*dict, "private", 00155 PyString_FromStringAndSize( 00156 devmode->dev_private, devmode->driverextra)); 00157 00158 return True; 00159 }
BOOL py_to_DEVICEMODE | ( | DEVICEMODE * | devmode, | |
PyObject * | dict | |||
) |
py_spoolss_printers_conv.c の 161 行で定義されています。
参照先 devicemode::dev_private・devicemode::driverextra・py_DEVICEMODE・result・to_struct().
00162 { 00163 PyObject *obj, *dict_copy = PyDict_Copy(dict); 00164 BOOL result = False; 00165 00166 if (!(obj = PyDict_GetItemString(dict_copy, "private"))) 00167 goto done; 00168 00169 if (!PyString_Check(obj)) 00170 goto done; 00171 00172 devmode->dev_private = PyString_AsString(obj); 00173 devmode->driverextra = PyString_Size(obj); 00174 00175 PyDict_DelItemString(dict_copy, "private"); 00176 00177 if (!to_struct(devmode, dict_copy, py_DEVICEMODE)) 00178 goto done; 00179 00180 result = True; 00181 00182 done: 00183 Py_DECREF(dict_copy); 00184 return result; 00185 }
BOOL py_from_PRINTER_INFO_0 | ( | PyObject ** | dict, | |
PRINTER_INFO_0 * | info | |||
) |
py_spoolss_printers_conv.c の 191 行で定義されています。
参照先 from_struct()・py_PRINTER_INFO_0.
参照元 spoolss_enumprinters()・spoolss_hnd_getprinter().
00192 { 00193 *dict = from_struct(info, py_PRINTER_INFO_0); 00194 PyDict_SetItemString(*dict, "level", PyInt_FromLong(0)); 00195 return True; 00196 }
BOOL py_to_PRINTER_INFO_0 | ( | PRINTER_INFO_0 * | info, | |
PyObject * | dict | |||
) |
BOOL py_from_PRINTER_INFO_1 | ( | PyObject ** | dict, | |
PRINTER_INFO_1 * | info | |||
) |
py_spoolss_printers_conv.c の 207 行で定義されています。
参照先 from_struct()・py_PRINTER_INFO_1.
参照元 spoolss_enumprinters()・spoolss_hnd_getprinter().
00208 { 00209 *dict = from_struct(info, py_PRINTER_INFO_1); 00210 PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); 00211 return True; 00212 }
BOOL py_to_PRINTER_INFO_1 | ( | PRINTER_INFO_1 * | info, | |
PyObject * | dict | |||
) |
py_spoolss_printers_conv.c の 214 行で定義されています。
参照先 py_PRINTER_INFO_1・result・to_struct().
00215 { 00216 PyObject *obj, *dict_copy = PyDict_Copy(dict); 00217 BOOL result = False; 00218 00219 if (!(obj = PyDict_GetItemString(dict_copy, "level")) || 00220 !PyInt_Check(obj)) 00221 goto done; 00222 00223 PyDict_DelItemString(dict_copy, "level"); 00224 00225 if (!to_struct(info, dict_copy, py_PRINTER_INFO_1)) 00226 goto done; 00227 00228 result = True; 00229 00230 done: 00231 Py_DECREF(dict_copy); 00232 return result; 00233 }
BOOL py_from_PRINTER_INFO_2 | ( | PyObject ** | dict, | |
PRINTER_INFO_2 * | info | |||
) |
py_spoolss_printers_conv.c の 239 行で定義されています。
参照先 printer_info_2::devmode・from_struct()・py_from_DEVICEMODE()・py_from_SECDESC()・py_PRINTER_INFO_2・printer_info_2::secdesc.
参照元 spoolss_enumprinters()・spoolss_hnd_getprinter().
00240 { 00241 PyObject *obj; 00242 00243 *dict = from_struct(info, py_PRINTER_INFO_2); 00244 00245 /* The security descriptor could be NULL */ 00246 00247 if (info->secdesc) { 00248 if (py_from_SECDESC(&obj, info->secdesc)) 00249 PyDict_SetItemString(*dict, "security_descriptor", obj); 00250 } 00251 00252 /* Bong! The devmode could be NULL */ 00253 00254 if (info->devmode) 00255 py_from_DEVICEMODE(&obj, info->devmode); 00256 else 00257 obj = PyDict_New(); 00258 00259 PyDict_SetItemString(*dict, "device_mode", obj); 00260 00261 PyDict_SetItemString(*dict, "level", PyInt_FromLong(2)); 00262 00263 return True; 00264 }
BOOL py_to_PRINTER_INFO_2 | ( | PRINTER_INFO_2 * | info, | |
PyObject * | dict, | |||
TALLOC_CTX * | mem_ctx | |||
) |
py_spoolss_printers_conv.c の 266 行で定義されています。
参照先 _talloc()・printer_info_2::devmode・py_PRINTER_INFO_2・py_to_DEVICEMODE()・py_to_SECDESC()・result・printer_info_2::secdesc・to_struct().
参照元 spoolss_addprinterex()・spoolss_hnd_setprinter().
00268 { 00269 PyObject *obj, *dict_copy = PyDict_Copy(dict); 00270 BOOL result = False; 00271 00272 /* Convert security descriptor - may be NULL */ 00273 00274 info->secdesc = NULL; 00275 00276 if ((obj = PyDict_GetItemString(dict_copy, "security_descriptor"))) { 00277 00278 if (!PyDict_Check(obj)) 00279 goto done; 00280 00281 if (!py_to_SECDESC(&info->secdesc, obj, mem_ctx)) 00282 goto done; 00283 00284 PyDict_DelItemString(dict_copy, "security_descriptor"); 00285 } 00286 00287 /* Convert device mode */ 00288 00289 if (!(obj = PyDict_GetItemString(dict_copy, "device_mode")) 00290 || !PyDict_Check(obj)) 00291 goto done; 00292 00293 info->devmode = _talloc(mem_ctx, sizeof(DEVICEMODE)); 00294 00295 if (!py_to_DEVICEMODE(info->devmode, obj)) 00296 goto done; 00297 00298 PyDict_DelItemString(dict_copy, "device_mode"); 00299 00300 /* Check info level */ 00301 00302 if (!(obj = PyDict_GetItemString(dict_copy, "level")) || 00303 !PyInt_Check(obj)) 00304 goto done; 00305 00306 PyDict_DelItemString(dict_copy, "level"); 00307 00308 /* Convert remaining elements of dictionary */ 00309 00310 if (!to_struct(info, dict_copy, py_PRINTER_INFO_2)) 00311 goto done; 00312 00313 result = True; 00314 00315 done: 00316 Py_DECREF(dict_copy); 00317 return result; 00318 }
BOOL py_from_PRINTER_INFO_3 | ( | PyObject ** | dict, | |
PRINTER_INFO_3 * | info | |||
) |
py_spoolss_printers_conv.c の 324 行で定義されています。
参照先 from_struct()・py_from_SECDESC()・py_PRINTER_INFO_3・printer_info_3::secdesc.
00325 { 00326 PyObject *obj; 00327 00328 *dict = from_struct(info, py_PRINTER_INFO_3); 00329 00330 if (py_from_SECDESC(&obj, info->secdesc)) 00331 PyDict_SetItemString(*dict, "security_descriptor", obj); 00332 00333 PyDict_SetItemString(*dict, "level", PyInt_FromLong(3)); 00334 00335 return True; 00336 }
BOOL py_to_PRINTER_INFO_3 | ( | PRINTER_INFO_3 * | info, | |
PyObject * | dict, | |||
TALLOC_CTX * | mem_ctx | |||
) |
py_spoolss_printers_conv.c の 338 行で定義されています。
参照先 py_PRINTER_INFO_3・py_to_SECDESC()・printer_info_3::secdesc・to_struct().
00340 { 00341 PyObject *obj; 00342 00343 if (!to_struct(info, dict, py_PRINTER_INFO_3)) 00344 return False; 00345 00346 if (!(obj = PyDict_GetItemString(dict, "security_descriptor"))) 00347 return False; 00348 00349 if (!py_to_SECDESC(&info->secdesc, obj, mem_ctx)) 00350 return False; 00351 00352 return True; 00353 }
struct pyconv py_PRINTER_INFO_0[] |
struct pyconv py_PRINTER_INFO_1[] |
初期値:
{ { "name", PY_UNISTR, offsetof(PRINTER_INFO_1, name) }, { "description", PY_UNISTR, offsetof(PRINTER_INFO_1, description) }, { "comment", PY_UNISTR, offsetof(PRINTER_INFO_1, comment) }, { "flags", PY_UINT32, offsetof(PRINTER_INFO_1, flags) }, { NULL } }
py_spoolss_printers_conv.c の 74 行で定義されています。
struct pyconv py_PRINTER_INFO_2[] |
初期値:
{ { "server_name", PY_UNISTR, offsetof(PRINTER_INFO_2, servername) }, { "name", PY_UNISTR, offsetof(PRINTER_INFO_2, printername) }, { "share_name", PY_UNISTR, offsetof(PRINTER_INFO_2, sharename) }, { "port_name", PY_UNISTR, offsetof(PRINTER_INFO_2, portname) }, { "driver_name", PY_UNISTR, offsetof(PRINTER_INFO_2, drivername) }, { "comment", PY_UNISTR, offsetof(PRINTER_INFO_2, comment) }, { "location", PY_UNISTR, offsetof(PRINTER_INFO_2, location) }, { "datatype", PY_UNISTR, offsetof(PRINTER_INFO_2, datatype) }, { "sepfile", PY_UNISTR, offsetof(PRINTER_INFO_2, sepfile) }, { "print_processor", PY_UNISTR, offsetof(PRINTER_INFO_2, printprocessor) }, { "parameters", PY_UNISTR, offsetof(PRINTER_INFO_2, parameters) }, { "attributes", PY_UINT32, offsetof(PRINTER_INFO_2, attributes) }, { "default_priority", PY_UINT32, offsetof(PRINTER_INFO_2, defaultpriority) }, { "priority", PY_UINT32, offsetof(PRINTER_INFO_2, priority) }, { "start_time", PY_UINT32, offsetof(PRINTER_INFO_2, starttime) }, { "until_time", PY_UINT32, offsetof(PRINTER_INFO_2, untiltime) }, { "status", PY_UINT32, offsetof(PRINTER_INFO_2, status) }, { "cjobs", PY_UINT32, offsetof(PRINTER_INFO_2, cjobs) }, { "average_ppm", PY_UINT32, offsetof(PRINTER_INFO_2, averageppm) }, { NULL } }
py_spoolss_printers_conv.c の 82 行で定義されています。
struct pyconv py_PRINTER_INFO_3[] |
struct pyconv py_DEVICEMODE[] |