1 /* 2 * Python object wrapper of libevt_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( _PYEVT_RECORD_H ) 23 #define _PYEVT_RECORD_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyevt_libevt.h" 29 #include "pyevt_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyevt_record pyevt_record_t; 36 37 struct pyevt_record 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libevt record 44 */ 45 libevt_record_t *record; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyevt_record_object_methods[]; 53 extern PyTypeObject pyevt_record_type_object; 54 55 PyObject *pyevt_record_new( 56 libevt_record_t *record, 57 PyObject *parent_object ); 58 59 int pyevt_record_init( 60 pyevt_record_t *pyevt_record ); 61 62 void pyevt_record_free( 63 pyevt_record_t *pyevt_record ); 64 65 PyObject *pyevt_record_get_offset( 66 pyevt_record_t *pyevt_record, 67 PyObject *arguments ); 68 69 PyObject *pyevt_record_get_identifier( 70 pyevt_record_t *pyevt_record, 71 PyObject *arguments ); 72 73 PyObject *pyevt_record_get_creation_time( 74 pyevt_record_t *pyevt_record, 75 PyObject *arguments ); 76 77 PyObject *pyevt_record_get_creation_time_as_integer( 78 pyevt_record_t *pyevt_record, 79 PyObject *arguments ); 80 81 PyObject *pyevt_record_get_written_time( 82 pyevt_record_t *pyevt_record, 83 PyObject *arguments ); 84 85 PyObject *pyevt_record_get_written_time_as_integer( 86 pyevt_record_t *pyevt_record, 87 PyObject *arguments ); 88 89 PyObject *pyevt_record_get_event_identifier( 90 pyevt_record_t *pyevt_record, 91 PyObject *arguments ); 92 93 PyObject *pyevt_record_get_event_type( 94 pyevt_record_t *pyevt_record, 95 PyObject *arguments ); 96 97 PyObject *pyevt_record_get_event_category( 98 pyevt_record_t *pyevt_record, 99 PyObject *arguments ); 100 101 PyObject *pyevt_record_get_source_name( 102 pyevt_record_t *pyevt_record, 103 PyObject *arguments ); 104 105 PyObject *pyevt_record_get_computer_name( 106 pyevt_record_t *pyevt_record, 107 PyObject *arguments ); 108 109 PyObject *pyevt_record_get_user_security_identifier( 110 pyevt_record_t *pyevt_record, 111 PyObject *arguments ); 112 113 PyObject *pyevt_record_get_number_of_strings( 114 pyevt_record_t *pyevt_record, 115 PyObject *arguments ); 116 117 PyObject *pyevt_record_get_string_by_index( 118 PyObject *pyevt_record, 119 int string_index ); 120 121 PyObject *pyevt_record_get_string( 122 pyevt_record_t *pyevt_record, 123 PyObject *arguments, 124 PyObject *keywords ); 125 126 PyObject *pyevt_record_get_strings( 127 pyevt_record_t *pyevt_record, 128 PyObject *arguments ); 129 130 PyObject *pyevt_record_get_data( 131 pyevt_record_t *pyevt_record, 132 PyObject *arguments ); 133 134 #if defined( __cplusplus ) 135 } 136 #endif 137 138 #endif /* !defined( _PYEVT_RECORD_H ) */ 139 140