python/py_samr_conv.c

ソースコードを見る。

関数

BOOL py_from_SAM_USER_INFO_16 (PyObject **dict, SAM_USER_INFO_16 *info)
BOOL py_to_SAM_USER_INFO_16 (SAM_USER_INFO_16 *info, PyObject *dict)
BOOL py_from_SAM_USER_INFO_21 (PyObject **dict, SAM_USER_INFO_21 *info)
BOOL py_to_SAM_USER_INFO_21 (SAM_USER_INFO_21 *info, PyObject *dict)
BOOL py_from_acct_info (PyObject **array, struct acct_info *info, int num_accts)
BOOL py_to_acct_info (PRINTER_INFO_3 *info, PyObject *dict, TALLOC_CTX *mem_ctx)

変数

pyconv py_SAM_USER_INFO_16 []
pyconv py_SAM_USER_INFO_21 []


関数

BOOL py_from_SAM_USER_INFO_16 ( PyObject **  dict,
SAM_USER_INFO_16 info 
)

py_samr_conv.c33 行で定義されています。

参照先 from_struct()py_SAM_USER_INFO_16.

00034 {
00035         *dict = from_struct(info, py_SAM_USER_INFO_16);
00036         PyDict_SetItemString(*dict, "level", PyInt_FromLong(16));
00037         return True;
00038 }

BOOL py_to_SAM_USER_INFO_16 ( SAM_USER_INFO_16 info,
PyObject *  dict 
)

py_samr_conv.c40 行で定義されています。

参照先 py_SAM_USER_INFO_16resultto_struct().

参照元 samr_set_user_info2().

00041 {
00042         PyObject *obj, *dict_copy = PyDict_Copy(dict);
00043         BOOL result = False;
00044 
00045         if (!(obj = PyDict_GetItemString(dict_copy, "level")) ||
00046             !PyInt_Check(obj))
00047                 goto done;
00048 
00049         PyDict_DelItemString(dict_copy, "level");
00050 
00051         if (!to_struct(info, dict_copy, py_SAM_USER_INFO_16))
00052                 goto done;
00053 
00054         result = True;
00055 
00056 done:
00057         Py_DECREF(dict_copy);
00058         return result;
00059 }

BOOL py_from_SAM_USER_INFO_21 ( PyObject **  dict,
SAM_USER_INFO_21 info 
)

py_samr_conv.c69 行で定義されています。

参照先 from_struct()py_SAM_USER_INFO_21.

00070 {
00071         *dict = from_struct(info, py_SAM_USER_INFO_21);
00072         PyDict_SetItemString(*dict, "level", PyInt_FromLong(21));
00073         return True;
00074 }

BOOL py_to_SAM_USER_INFO_21 ( SAM_USER_INFO_21 info,
PyObject *  dict 
)

py_samr_conv.c76 行で定義されています。

参照先 py_SAM_USER_INFO_21resultto_struct().

参照元 samr_set_user_info2().

00077 {
00078         PyObject *obj, *dict_copy = PyDict_Copy(dict);
00079         BOOL result = False;
00080 
00081         if (!(obj = PyDict_GetItemString(dict_copy, "level")) ||
00082             !PyInt_Check(obj))
00083                 goto done;
00084 
00085         PyDict_DelItemString(dict_copy, "level");
00086 
00087         if (!to_struct(info, dict_copy, py_SAM_USER_INFO_21))
00088                 goto done;
00089 
00090         result = True;
00091 
00092 done:
00093         Py_DECREF(dict_copy);
00094         return result;
00095 }

BOOL py_from_acct_info ( PyObject **  array,
struct acct_info info,
int  num_accts 
)

py_samr_conv.c101 行で定義されています。

参照元 samr_enum_dom_groups().

00102 {
00103         int i;
00104 
00105         *array = PyList_New(num_accts);
00106 
00107         for (i = 0; i < num_accts; i++) {
00108                 PyObject *obj;  
00109 
00110                 obj = PyDict_New();
00111                 
00112                 PyDict_SetItemString(
00113                         obj, "name", PyString_FromString(info[i].acct_name));
00114 
00115                 PyDict_SetItemString(
00116                         obj, "description", 
00117                         PyString_FromString(info[i].acct_desc));
00118 
00119                 PyDict_SetItemString(obj, "rid", PyInt_FromLong(info[i].rid));
00120 
00121                 PyList_SetItem(*array, i, obj);
00122         }
00123 
00124         return True;
00125 }

BOOL py_to_acct_info ( PRINTER_INFO_3 info,
PyObject *  dict,
TALLOC_CTX mem_ctx 
)

py_samr_conv.c127 行で定義されています。

00129 {
00130         return False;
00131 }


変数

struct pyconv py_SAM_USER_INFO_16[]

初期値:

 {
        { "acb_info", PY_UINT32, offsetof(SAM_USER_INFO_16, acb_info) },
        { NULL }
}

py_samr_conv.c28 行で定義されています。

参照元 py_from_SAM_USER_INFO_16()py_to_SAM_USER_INFO_16().

struct pyconv py_SAM_USER_INFO_21[]

初期値:

 {
        { NULL }
}

py_samr_conv.c65 行で定義されています。

参照元 py_from_SAM_USER_INFO_21()py_to_SAM_USER_INFO_21().


Sambaに対してSat Aug 29 21:24:04 2009に生成されました。  doxygen 1.4.7