diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2007-02-03 14:25:02 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2007-02-03 14:25:02 +0000 |
commit | d70a58f881e34d3a83533236d0fe74e425a0700f (patch) | |
tree | 683c63d63061635121c0893a08d8320a910299da /epan/uat-int.h | |
parent | 009d38e6a0accceef00a1209cfe7f6708e8b30ee (diff) | |
download | wireshark-d70a58f881e34d3a83533236d0fe74e425a0700f.tar.gz wireshark-d70a58f881e34d3a83533236d0fe74e425a0700f.tar.bz2 wireshark-d70a58f881e34d3a83533236d0fe74e425a0700f.zip |
second iteration:
* fields of an uat table now are passed using an array of uat_filed_t
* field callbacks take two more userdata arguments
* add some macros to define uat field callbacks.
* uats can be registered as preferences for a specific protocol
- the preference widget is a button that opens the uat's window
* dfilter-macro => reflect changes to API
svn path=/trunk/; revision=20695
Diffstat (limited to 'epan/uat-int.h')
-rw-r--r-- | epan/uat-int.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/uat-int.h b/epan/uat-int.h index 4f9b8a48f7..060b3f7df7 100644 --- a/epan/uat-int.h +++ b/epan/uat-int.h @@ -39,19 +39,11 @@ typedef struct _uat_rep_t uat_rep_t; typedef void (*uat_rep_fld_free_cb_t)(uat_fld_rep_t*); typedef void (*uat_rep_free_cb_t)(uat_rep_t*); -typedef struct _uat_fld_t { - char* name; - uat_text_mode_t mode; - uat_fld_chk_cb_t chk_cb; - uat_fld_set_cb_t set_cb; - uat_fld_tostr_cb_t tostr_cb; - +typedef struct _fld_data_t { guint colnum; uat_fld_rep_t* rep; uat_rep_fld_free_cb_t free_rep; - - struct _uat_fld_t* next; -} uat_fld_t; +} fld_data_t; struct _uat_t { char* name; @@ -63,23 +55,31 @@ struct _uat_t { uat_update_cb_t update_cb; uat_free_cb_t free_cb; - uat_fld_t* fields; + uat_field_t* fields; guint ncols; GArray* user_data; - gboolean finalized; uat_rep_t* rep; uat_rep_free_cb_t free_rep; }; gchar* uat_get_actual_filename(uat_t* uat, gboolean for_writing); + void uat_init(void); + void uat_reset(void); + void* uat_add_record(uat_t*, const void* orig_rec_ptr); + void uat_remove_record_idx(uat_t*, guint rec_idx); + void uat_destroy(uat_t*); -gboolean uat_save(uat_t* dt, char** error); -gboolean uat_load(uat_t* dt, char** error); + +gboolean uat_save(uat_t* , char** ); + +gboolean uat_load(uat_t* , char** ); + +void uat_load_all(void); #define UAT_UPDATE(uat) do { *((uat)->user_ptr) = (void*)((uat)->user_data->data); *((uat)->nrows_p) = (uat)->user_data->len; } while(0) #define UAT_INDEX_PTR(uat,idx) (uat->user_data->data + (uat->record_size * (idx))) |