6 * User Accessible Tables
7 * Mantain an array of user accessible data strucures
10 * (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 2001 Gerald Combs
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 #include "ws_symbol_export.h"
39 #endif /* __cplusplus */
41 typedef struct _uat_fld_rep_t uat_fld_rep_t
;
42 typedef struct _uat_rep_t uat_rep_t
;
44 typedef void (*uat_rep_fld_free_cb_t
)(uat_fld_rep_t
*);
45 typedef void (*uat_rep_free_cb_t
)(uat_rep_t
*);
47 typedef struct _fld_data_t
{
50 uat_rep_fld_free_cb_t free_rep
;
57 gboolean from_profile
;
62 uat_copy_cb_t copy_cb
;
63 uat_update_cb_t update_cb
;
64 uat_free_cb_t free_cb
;
65 uat_post_update_cb_t post_update_cb
;
74 uat_rep_free_cb_t free_rep
;
80 gchar
* uat_get_actual_filename(uat_t
* uat
, gboolean for_writing
);
87 void* uat_add_record(uat_t
*, const void* orig_rec_ptr
, gboolean valid_rec
);
90 void uat_swap(uat_t
*, guint idx_a
, guint idx_b
);
93 void uat_remove_record_idx(uat_t
*, guint rec_idx
);
95 void uat_destroy(uat_t
*);
98 void uat_clear(uat_t
*);
101 gboolean
uat_save(uat_t
* , const char** );
103 void uat_load_all(void);
105 #define UAT_UPDATE(uat) do { *((uat)->user_ptr) = (void*)((uat)->user_data->data); *((uat)->nrows_p) = (uat)->user_data->len; } while(0)
106 #define UAT_INDEX_PTR(uat,idx) (uat->raw_data->data + (uat->record_size * (idx)))
107 #define UAT_USER_INDEX_PTR(uat,idx) (uat->user_data->data + (uat->record_size * (idx)))
111 #endif /* __cplusplus */
113 #endif /* __UAT_INT_H__ */
116 * Editor modelines - http://www.wireshark.org/tools/modelines.html
121 * indent-tabs-mode: nil
124 * vi: set shiftwidth=4 tabstop=8 expandtab:
125 * :indentSize=4:tabSize=8:noTabs=true: