Line data Source code
1 :
2 : /* Python wrapper functions auto-generated by pidl */
3 : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
4 : #include <Python.h>
5 : #include "python/py3compat.h"
6 : #include "includes.h"
7 : #include "python/modules.h"
8 : #include <pytalloc.h>
9 : #include "librpc/rpc/pyrpc.h"
10 : #include "librpc/rpc/pyrpc_util.h"
11 : #include "bin/default/librpc/gen_ndr/ndr_windows_event_ids.h"
12 :
13 :
14 : /*
15 : * Suppress compiler warnings if the generated code does not call these
16 : * functions
17 : */
18 : #ifndef _MAYBE_UNUSED_
19 : #ifdef __has_attribute
20 : #if __has_attribute(unused)
21 : #define _MAYBE_UNUSED_ __attribute__ ((unused))
22 : #else
23 : #define _MAYBE_UNUSED_
24 : #endif
25 : #endif
26 : #endif
27 : /*
28 : * These functions are here to ensure they can be optimized out by
29 : * the compiler based on the constant input values
30 : */
31 :
32 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
33 : {
34 : switch (var_size) {
35 : case 8:
36 : return UINT64_MAX;
37 : case 4:
38 : return UINT32_MAX;
39 : case 2:
40 : return UINT16_MAX;
41 : case 1:
42 : return UINT8_MAX;
43 : }
44 :
45 : return 0;
46 : }
47 :
48 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
49 : {
50 : switch (var_size) {
51 : case 8:
52 : return INT64_MAX;
53 : case 4:
54 : return INT32_MAX;
55 : case 2:
56 : return INT16_MAX;
57 : case 1:
58 : return INT8_MAX;
59 : }
60 :
61 : return 0;
62 : }
63 :
64 :
65 : static PyMethodDef windows_event_ids_methods[] = {
66 : { NULL, NULL, 0, NULL }
67 : };
68 :
69 : static struct PyModuleDef moduledef = {
70 : PyModuleDef_HEAD_INIT,
71 : .m_name = "windows_event_ids",
72 : .m_doc = "windows_event_ids DCE/RPC",
73 : .m_size = -1,
74 : .m_methods = windows_event_ids_methods,
75 : };
76 6 : MODULE_INIT_FUNC(windows_event_ids)
77 : {
78 6 : PyObject *m = NULL;
79 :
80 :
81 6 : m = PyModule_Create(&moduledef);
82 6 : if (m == NULL)
83 0 : goto out;
84 :
85 6 : PyModule_AddObject(m, "EVT_ID_NONE", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_NONE));
86 6 : PyModule_AddObject(m, "EVT_ID_SUCCESSFUL_LOGON", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_SUCCESSFUL_LOGON));
87 6 : PyModule_AddObject(m, "EVT_ID_UNSUCCESSFUL_LOGON", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_UNSUCCESSFUL_LOGON));
88 6 : PyModule_AddObject(m, "EVT_ID_PASSWORD_CHANGE", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_PASSWORD_CHANGE));
89 6 : PyModule_AddObject(m, "EVT_ID_PASSWORD_RESET", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_PASSWORD_RESET));
90 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_GLOBAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_GLOBAL_SEC_GROUP));
91 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_GLOBAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_GLOBAL_SEC_GROUP));
92 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_LOCAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_LOCAL_SEC_GROUP));
93 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_LOCAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_LOCAL_SEC_GROUP));
94 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_LOCAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_LOCAL_GROUP));
95 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_LOCAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_LOCAL_GROUP));
96 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_GLOBAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_GLOBAL_GROUP));
97 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_GLOBAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_GLOBAL_GROUP));
98 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_UNIVERSAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_UNIVERSAL_SEC_GROUP));
99 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_UNIVERSAL_SEC_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_UNIVERSAL_SEC_GROUP));
100 6 : PyModule_AddObject(m, "EVT_ID_USER_ADDED_TO_UNIVERSAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_ADDED_TO_UNIVERSAL_GROUP));
101 6 : PyModule_AddObject(m, "EVT_ID_USER_REMOVED_FROM_UNIVERSAL_GROUP", PyLong_FromUnsignedLongLong((uint32_t)EVT_ID_USER_REMOVED_FROM_UNIVERSAL_GROUP));
102 6 : PyModule_AddObject(m, "EVT_LOGON_INTERACTIVE", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_INTERACTIVE));
103 6 : PyModule_AddObject(m, "EVT_LOGON_NETWORK", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_NETWORK));
104 6 : PyModule_AddObject(m, "EVT_LOGON_BATCH", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_BATCH));
105 6 : PyModule_AddObject(m, "EVT_LOGON_SERVICE", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_SERVICE));
106 6 : PyModule_AddObject(m, "EVT_LOGON_UNLOCK", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_UNLOCK));
107 6 : PyModule_AddObject(m, "EVT_LOGON_NETWORK_CLEAR_TEXT", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_NETWORK_CLEAR_TEXT));
108 6 : PyModule_AddObject(m, "EVT_LOGON_NEW_CREDENTIALS", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_NEW_CREDENTIALS));
109 6 : PyModule_AddObject(m, "EVT_LOGON_REMOTE_INTERACTIVE", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_REMOTE_INTERACTIVE));
110 6 : PyModule_AddObject(m, "EVT_LOGON_CACHED_INTERACTIVE", PyLong_FromUnsignedLongLong((uint32_t)EVT_LOGON_CACHED_INTERACTIVE));
111 : #ifdef PY_MOD_WINDOWS_EVENT_IDS_PATCH
112 : PY_MOD_WINDOWS_EVENT_IDS_PATCH(m);
113 : #endif
114 6 : out:
115 6 : return m;
116 :
117 : }
|