20#include "ws_symbol_export.h"
26typedef struct _uat_fld_rep_t uat_fld_rep_t;
27typedef struct _uat_rep_t uat_rep_t;
29typedef void (*uat_rep_fld_free_cb_t)(uat_fld_rep_t*);
30typedef void (*uat_rep_free_cb_t)(uat_rep_t*);
166bool uat_save(
uat_t *uat,
const char* app_env_var_prefix,
char **error);
204#define UAT_UPDATE(uat) do { *((uat)->user_ptr) = (void*)((uat)->user_data->data); *((uat)->nrows_p) = (uat)->user_data->len; } while(0)
210#define UAT_INDEX_PTR(uat,idx) (uat->raw_data->data + (uat->record_size * (idx)))
215#define UAT_USER_INDEX_PTR(uat,idx) (uat->user_data->data + (uat->record_size * (idx)))
Holds per-field display and cleanup state for a single column in a UAT record's GUI representation.
Definition uat-int.h:35
unsigned colnum
Definition uat-int.h:36
uat_rep_fld_free_cb_t free_rep
Definition uat-int.h:38
uat_fld_rep_t * rep
Definition uat-int.h:37
Describes a single editable field within a UAT (User Accessible Table).
Definition uat.h:234
Represents a User Accessible Table (UAT), managing a set of user-editable records exposed to a dissec...
Definition uat-int.h:44
size_t record_size
Definition uat-int.h:46
uat_post_update_cb_t post_update_cb
Definition uat-int.h:56
bool changed
Definition uat-int.h:65
void ** user_ptr
Definition uat-int.h:51
GArray * raw_data
Definition uat-int.h:63
unsigned ncols
Definition uat-int.h:61
bool from_profile
Definition uat-int.h:48
char * help
Definition uat-int.h:49
char * filename
Definition uat-int.h:47
const char ** default_values
Definition uat-int.h:60
uat_reset_cb_t reset_cb
Definition uat-int.h:57
uat_rep_t * rep
Definition uat-int.h:66
uat_update_cb_t update_cb
Definition uat-int.h:54
uat_field_t * fields
Definition uat-int.h:59
uat_rep_free_cb_t free_rep
Definition uat-int.h:67
unsigned flags
Definition uat-int.h:50
unsigned * nrows_p
Definition uat-int.h:52
uat_copy_cb_t copy_cb
Definition uat-int.h:53
bool loaded
Definition uat-int.h:68
GArray * valid_data
Definition uat-int.h:64
char * name
Definition uat-int.h:45
uat_free_cb_t free_cb
Definition uat-int.h:55
GArray * user_data
Definition uat-int.h:62
void uat_load_all(const char *app_env_var_prefix)
Loads the records for all registered UATs from file.
Definition uat.c:615
WS_DLL_PUBLIC char * uat_get_actual_filename(uat_t *uat, bool for_writing, const char *app_env_var_prefix)
Get the actual filename for the UAT.
Definition uat.c:250
WS_DLL_PUBLIC void uat_update_record(uat_t *uat, const void *record, bool valid_rec)
Marks the internal record in the UAT as valid or invalid. The record must exist in the UAT.
Definition uat.c:145
WS_DLL_PUBLIC void uat_remove_record_range(uat_t *uat, unsigned rec_idx, unsigned count)
Removes the given number of records starting with the given index from the internal record list....
Definition uat.c:217
WS_DLL_PUBLIC void uat_move_index(uat_t *uat, unsigned old_idx, unsigned new_idx)
Moves the entry from the old position to the new one.
Definition uat.c:235
WS_DLL_PUBLIC void uat_clear(uat_t *uat)
Removes and destroys all records from the UAT.
Definition uat.c:533
WS_DLL_PUBLIC bool uat_save(uat_t *uat, const char *app_env_var_prefix, char **error)
Saves the records from an UAT to file. Returns true on success and false on failure,...
Definition uat.c:396
WS_DLL_PUBLIC void uat_swap(uat_t *uat, unsigned idx_a, unsigned idx_b)
Changes the order of two internal UAT records.
Definition uat.c:164
WS_DLL_PUBLIC char * uat_record_tostr(const uat_t *uat, void *rec)
Dump UAT record entries to string in form which can be later loaded with uat_load_str()....
Definition uat.c:327
WS_DLL_PUBLIC void * uat_add_record(uat_t *uat, const void *orig_rec_ptr, bool valid_rec)
Clones the given record and stores it internally in the UAT. If it is considered a valid record,...
Definition uat.c:117
WS_DLL_PUBLIC char * uat_fld_tostr(void *rec, uat_field_t *f)
Dump given UAT record to string in form which can be later loaded with uat_load_str().
Definition uat.c:288
WS_DLL_PUBLIC void uat_remove_record_idx(uat_t *uat, unsigned rec_idx)
Removes the record with the given index from the internal record list.
Definition uat.c:205
struct _fld_data_t fld_data_t
Holds per-field display and cleanup state for a single column in a UAT record's GUI representation.
WS_DLL_PUBLIC void uat_insert_record_idx(uat_t *uat, unsigned rec_idx, const void *src_record)
Inserts the record at the given index in the internal record list.
Definition uat.c:186
void *(* uat_copy_cb_t)(void *dest, const void *source, size_t len)
Definition uat.h:85
void(* uat_free_cb_t)(void *record)
Definition uat.h:95
bool(* uat_update_cb_t)(void *record, char **error)
Definition uat.h:123
void(* uat_reset_cb_t)(void)
Definition uat.h:103