1 /* 2 * Python object wrapper of libevtx_record_t 3 * 4 * Copyright (C) 2011-2021, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _PYEVTX_RECORD_H ) 23 #define _PYEVTX_RECORD_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyevtx_libevtx.h" 29 #include "pyevtx_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyevtx_record pyevtx_record_t; 36 37 struct pyevtx_record 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libevtx record 44 */ 45 libevtx_record_t *record; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyevtx_record_object_methods[]; 53 extern PyTypeObject pyevtx_record_type_object; 54 55 PyObject *pyevtx_record_new( 56 libevtx_record_t *record, 57 PyObject *parent_object ); 58 59 int pyevtx_record_init( 60 pyevtx_record_t *pyevtx_record ); 61 62 void pyevtx_record_free( 63 pyevtx_record_t *pyevtx_record ); 64 65 PyObject *pyevtx_record_get_offset( 66 pyevtx_record_t *pyevtx_record, 67 PyObject *arguments ); 68 69 PyObject *pyevtx_record_get_identifier( 70 pyevtx_record_t *pyevtx_record, 71 PyObject *arguments ); 72 73 PyObject *pyevtx_record_get_creation_time( 74 pyevtx_record_t *pyevtx_record, 75 PyObject *arguments ); 76 77 PyObject *pyevtx_record_get_creation_time_as_integer( 78 pyevtx_record_t *pyevtx_record, 79 PyObject *arguments ); 80 81 PyObject *pyevtx_record_get_written_time( 82 pyevtx_record_t *pyevtx_record, 83 PyObject *arguments ); 84 85 PyObject *pyevtx_record_get_written_time_as_integer( 86 pyevtx_record_t *pyevtx_record, 87 PyObject *arguments ); 88 89 PyObject *pyevtx_record_get_event_identifier( 90 pyevtx_record_t *pyevtx_record, 91 PyObject *arguments ); 92 93 PyObject *pyevtx_record_get_event_identifier_qualifiers( 94 pyevtx_record_t *pyevtx_record, 95 PyObject *arguments ); 96 97 PyObject *pyevtx_record_get_event_level( 98 pyevtx_record_t *pyevtx_record, 99 PyObject *arguments ); 100 101 PyObject *pyevtx_record_get_provider_identifier( 102 pyevtx_record_t *pyevtx_record, 103 PyObject *arguments ); 104 105 PyObject *pyevtx_record_get_source_name( 106 pyevtx_record_t *pyevtx_record, 107 PyObject *arguments ); 108 109 PyObject *pyevtx_record_get_computer_name( 110 pyevtx_record_t *pyevtx_record, 111 PyObject *arguments ); 112 113 PyObject *pyevtx_record_get_user_security_identifier( 114 pyevtx_record_t *pyevtx_record, 115 PyObject *arguments ); 116 117 PyObject *pyevtx_record_get_number_of_strings( 118 pyevtx_record_t *pyevtx_record, 119 PyObject *arguments ); 120 121 PyObject *pyevtx_record_get_string_by_index( 122 PyObject *pyevtx_record, 123 int string_index ); 124 125 PyObject *pyevtx_record_get_string( 126 pyevtx_record_t *pyevtx_record, 127 PyObject *arguments, 128 PyObject *keywords ); 129 130 PyObject *pyevtx_record_get_strings( 131 pyevtx_record_t *pyevtx_record, 132 PyObject *arguments ); 133 134 PyObject *pyevtx_record_get_data( 135 pyevtx_record_t *pyevtx_record, 136 PyObject *arguments ); 137 138 PyObject *pyevtx_record_get_xml_string( 139 pyevtx_record_t *pyevtx_record, 140 PyObject *arguments ); 141 142 #if defined( __cplusplus ) 143 } 144 #endif 145 146 #endif /* !defined( _PYEVTX_RECORD_H ) */ 147 148