関数 | |
static uint16 * | to_dependentfiles (PyObject *list, TALLOC_CTX *mem_ctx) |
BOOL | py_from_DRIVER_INFO_1 (PyObject **dict, DRIVER_INFO_1 *info) |
BOOL | py_to_DRIVER_INFO_1 (DRIVER_INFO_1 *info, PyObject *dict) |
BOOL | py_from_DRIVER_INFO_2 (PyObject **dict, DRIVER_INFO_2 *info) |
BOOL | py_to_DRIVER_INFO_2 (DRIVER_INFO_2 *info, PyObject *dict) |
BOOL | py_from_DRIVER_INFO_3 (PyObject **dict, DRIVER_INFO_3 *info) |
BOOL | py_to_DRIVER_INFO_3 (DRIVER_INFO_3 *info, PyObject *dict, TALLOC_CTX *mem_ctx) |
BOOL | py_from_DRIVER_INFO_6 (PyObject **dict, DRIVER_INFO_6 *info) |
BOOL | py_to_DRIVER_INFO_6 (DRIVER_INFO_6 *info, PyObject *dict) |
BOOL | py_from_DRIVER_DIRECTORY_1 (PyObject **dict, DRIVER_DIRECTORY_1 *info) |
BOOL | py_to_DRIVER_DIRECTORY_1 (DRIVER_DIRECTORY_1 *info, PyObject *dict) |
変数 | |
pyconv | py_DRIVER_INFO_1 [] |
pyconv | py_DRIVER_INFO_2 [] |
pyconv | py_DRIVER_INFO_3 [] |
pyconv | py_DRIVER_INFO_6 [] |
pyconv | py_DRIVER_DIRECTORY_1 [] |
static uint16* to_dependentfiles | ( | PyObject * | list, | |
TALLOC_CTX * | mem_ctx | |||
) | [static] |
py_spoolss_drivers_conv.c の 81 行で定義されています。
00082 { 00083 uint32 elements, size=0, pos=0, i; 00084 char *str; 00085 uint16 *ret = NULL; 00086 PyObject *borrowedRef; 00087 00088 if (!PyList_Check(list)) { 00089 goto done; 00090 } 00091 00092 /* calculate size for dependentfiles */ 00093 elements=PyList_Size(list); 00094 for (i = 0; i < elements; i++) { 00095 borrowedRef=PyList_GetItem(list, i); 00096 if (!PyString_Check(borrowedRef)) 00097 /* non string found, return error */ 00098 goto done; 00099 size+=PyString_Size(borrowedRef)+1; 00100 } 00101 00102 if (!(ret = (uint16*)_talloc(mem_ctx,((size+1)*sizeof(uint16))))) 00103 goto done; 00104 00105 /* create null terminated sequence of null terminated strings */ 00106 for (i = 0; i < elements; i++) { 00107 borrowedRef=PyList_GetItem(list, i); 00108 str=PyString_AsString(borrowedRef); 00109 do { 00110 if (pos >= size) { 00111 /* dependentfiles too small. miscalculated? */ 00112 ret = NULL; 00113 goto done; 00114 } 00115 SSVAL(&ret[pos], 0, str[0]); 00116 pos++; 00117 } while (*(str++)); 00118 } 00119 /* final null */ 00120 ret[pos]='\0'; 00121 00122 done: 00123 return ret; 00124 }
BOOL py_from_DRIVER_INFO_1 | ( | PyObject ** | dict, | |
DRIVER_INFO_1 * | info | |||
) |
py_spoolss_drivers_conv.c の 126 行で定義されています。
参照先 from_struct()・py_DRIVER_INFO_1.
参照元 spoolss_enumprinterdrivers()・spoolss_hnd_getprinterdriver().
00127 { 00128 *dict = from_struct(info, py_DRIVER_INFO_1); 00129 PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); 00130 00131 return True; 00132 }
BOOL py_to_DRIVER_INFO_1 | ( | DRIVER_INFO_1 * | info, | |
PyObject * | dict | |||
) |
BOOL py_from_DRIVER_INFO_2 | ( | PyObject ** | dict, | |
DRIVER_INFO_2 * | info | |||
) |
py_spoolss_drivers_conv.c の 139 行で定義されています。
参照先 from_struct()・py_DRIVER_INFO_2.
参照元 spoolss_enumprinterdrivers()・spoolss_hnd_getprinterdriver().
00140 { 00141 *dict = from_struct(info, py_DRIVER_INFO_2); 00142 PyDict_SetItemString(*dict, "level", PyInt_FromLong(2)); 00143 00144 return True; 00145 }
BOOL py_to_DRIVER_INFO_2 | ( | DRIVER_INFO_2 * | info, | |
PyObject * | dict | |||
) |
BOOL py_from_DRIVER_INFO_3 | ( | PyObject ** | dict, | |
DRIVER_INFO_3 * | info | |||
) |
py_spoolss_drivers_conv.c の 152 行で定義されています。
参照先 driver_info_3::dependentfiles・from_struct()・from_unistr_list()・py_DRIVER_INFO_3.
参照元 spoolss_enumprinterdrivers()・spoolss_hnd_getprinterdriver().
00153 { 00154 *dict = from_struct(info, py_DRIVER_INFO_3); 00155 00156 PyDict_SetItemString(*dict, "level", PyInt_FromLong(3)); 00157 00158 PyDict_SetItemString( 00159 *dict, "dependent_files", 00160 from_unistr_list(info->dependentfiles)); 00161 00162 return True; 00163 }
BOOL py_to_DRIVER_INFO_3 | ( | DRIVER_INFO_3 * | info, | |
PyObject * | dict, | |||
TALLOC_CTX * | mem_ctx | |||
) |
py_spoolss_drivers_conv.c の 165 行で定義されています。
参照先 driver_info_3::dependentfiles・py_DRIVER_INFO_3・result・to_dependentfiles()・to_struct().
参照元 spoolss_addprinterdriver().
00167 { 00168 PyObject *obj, *dict_copy = PyDict_Copy(dict); 00169 BOOL result = False; 00170 00171 if (!(obj = PyDict_GetItemString(dict_copy, "dependent_files"))) 00172 goto done; 00173 00174 if (!(info->dependentfiles = to_dependentfiles(obj, mem_ctx))) 00175 goto done; 00176 00177 PyDict_DelItemString(dict_copy, "dependent_files"); 00178 00179 if (!(obj = PyDict_GetItemString(dict_copy, "level")) || 00180 !PyInt_Check(obj)) 00181 goto done; 00182 00183 PyDict_DelItemString(dict_copy, "level"); 00184 00185 if (!to_struct(info, dict_copy, py_DRIVER_INFO_3)) 00186 goto done; 00187 00188 result = True; 00189 00190 done: 00191 Py_DECREF(dict_copy); 00192 return result; 00193 }
BOOL py_from_DRIVER_INFO_6 | ( | PyObject ** | dict, | |
DRIVER_INFO_6 * | info | |||
) |
py_spoolss_drivers_conv.c の 195 行で定義されています。
参照先 driver_info_6::dependentfiles・from_struct()・from_unistr_list()・py_DRIVER_INFO_6.
参照元 spoolss_enumprinterdrivers()・spoolss_hnd_getprinterdriver().
00196 { 00197 *dict = from_struct(info, py_DRIVER_INFO_6); 00198 PyDict_SetItemString(*dict, "level", PyInt_FromLong(6)); 00199 PyDict_SetItemString( 00200 *dict, "dependent_files", 00201 from_unistr_list(info->dependentfiles)); 00202 return True; 00203 }
BOOL py_to_DRIVER_INFO_6 | ( | DRIVER_INFO_6 * | info, | |
PyObject * | dict | |||
) |
BOOL py_from_DRIVER_DIRECTORY_1 | ( | PyObject ** | dict, | |
DRIVER_DIRECTORY_1 * | info | |||
) |
py_spoolss_drivers_conv.c の 210 行で定義されています。
参照先 from_struct()・py_DRIVER_DIRECTORY_1.
参照元 spoolss_getprinterdriverdir().
00211 { 00212 *dict = from_struct(info, py_DRIVER_DIRECTORY_1); 00213 PyDict_SetItemString(*dict, "level", PyInt_FromLong(1)); 00214 return True; 00215 }
BOOL py_to_DRIVER_DIRECTORY_1 | ( | DRIVER_DIRECTORY_1 * | info, | |
PyObject * | dict | |||
) |
struct pyconv py_DRIVER_INFO_1[] |
初期値:
{ { "name", PY_UNISTR, offsetof(DRIVER_INFO_1, name) }, { NULL } }
py_spoolss_drivers_conv.c の 26 行で定義されています。
struct pyconv py_DRIVER_INFO_2[] |
初期値:
{ { "version", PY_UINT32, offsetof(DRIVER_INFO_2, version) }, { "name", PY_UNISTR, offsetof(DRIVER_INFO_2, name) }, { "architecture", PY_UNISTR, offsetof(DRIVER_INFO_2, architecture) }, { "driver_path", PY_UNISTR, offsetof(DRIVER_INFO_2, driverpath) }, { "data_file", PY_UNISTR, offsetof(DRIVER_INFO_2, datafile) }, { "config_file", PY_UNISTR, offsetof(DRIVER_INFO_2, configfile) }, { NULL } }
py_spoolss_drivers_conv.c の 31 行で定義されています。
struct pyconv py_DRIVER_INFO_3[] |
初期値:
{ { "version", PY_UINT32, offsetof(DRIVER_INFO_3, version) }, { "name", PY_UNISTR, offsetof(DRIVER_INFO_3, name) }, { "architecture", PY_UNISTR, offsetof(DRIVER_INFO_3, architecture) }, { "driver_path", PY_UNISTR, offsetof(DRIVER_INFO_3, driverpath) }, { "data_file", PY_UNISTR, offsetof(DRIVER_INFO_3, datafile) }, { "config_file", PY_UNISTR, offsetof(DRIVER_INFO_3, configfile) }, { "help_file", PY_UNISTR, offsetof(DRIVER_INFO_3, helpfile) }, { "monitor_name", PY_UNISTR, offsetof(DRIVER_INFO_3, monitorname) }, { "default_datatype", PY_UNISTR, offsetof(DRIVER_INFO_3, defaultdatatype) }, { NULL } }
py_spoolss_drivers_conv.c の 41 行で定義されています。
struct pyconv py_DRIVER_INFO_6[] |
初期値:
{ { "version", PY_UINT32, offsetof(DRIVER_INFO_6, version) }, { "name", PY_UNISTR, offsetof(DRIVER_INFO_6, name) }, { "architecture", PY_UNISTR, offsetof(DRIVER_INFO_6, architecture) }, { "driver_path", PY_UNISTR, offsetof(DRIVER_INFO_6, driverpath) }, { "data_file", PY_UNISTR, offsetof(DRIVER_INFO_6, datafile) }, { "config_file", PY_UNISTR, offsetof(DRIVER_INFO_6, configfile) }, { "help_file", PY_UNISTR, offsetof(DRIVER_INFO_6, helpfile) }, { "monitor_name", PY_UNISTR, offsetof(DRIVER_INFO_6, monitorname) }, { "default_datatype", PY_UNISTR, offsetof(DRIVER_INFO_6, defaultdatatype) }, { "padding", PY_UINT32, offsetof(DRIVER_INFO_6, padding) }, { "driver_version_low", PY_UINT32, offsetof(DRIVER_INFO_6, driver_version_low) }, { "driver_version_high", PY_UINT32, offsetof(DRIVER_INFO_6, driver_version_high) }, { "mfg_name", PY_UNISTR, offsetof(DRIVER_INFO_6, mfgname) }, { "oem_url", PY_UNISTR, offsetof(DRIVER_INFO_6, oem_url) }, { "hardware_id", PY_UNISTR, offsetof(DRIVER_INFO_6, hardware_id) }, { "provider", PY_UNISTR, offsetof(DRIVER_INFO_6, provider) }, { NULL } }
py_spoolss_drivers_conv.c の 54 行で定義されています。
struct pyconv py_DRIVER_DIRECTORY_1[] |
初期値:
{ { "name", PY_UNISTR, offsetof(DRIVER_DIRECTORY_1, name) }, { NULL } }
py_spoolss_drivers_conv.c の 76 行で定義されています。