#ifndef _USER_DATA_H_
#define _USER_DATA_H_

#pragma pack(push,1)

enum ButtonIndex {
    MNI_SETUDLPARAMS,
    MNI_OPENUDL,
    MNI_SENDBRAM,
    MNI_EXECPROG,
    MNI_RCVBRAM,
    MNI_RCVBIOS,
    MNI_RCVARPFW,


    BTN_OPEN,
    BTN_CLOSE,
    BTN_PARAMSET,
    BTN_SEND,
    BTN_FASTEXEC,
    BTN_RECEIVE,

    BTN_MAINLOGCLEAR,
    BTN_MAINLOGSAVE,
    BTN_LOGLEVELSET,

    BTN_LOGCLEAR,
    BTN_LOGLDSETTINGS,
    BTN_LOGSAVE,

    BTN_ADDRDOWN,
    BTN_ADDRUP,

    BTN_MVREAD,
    BTN_MVWRITE,

    BTN_PROMPTSEND,
    BTN_DBGFOLDER,

    BTN_TARGETINFO,
    BTN_VDP1VIEW,

    BTN_SILENTON,
    BTN_SILENTOFF,

    BTN_TEST1,
    BTN_COUNT
};


#define STR_LEN 1024
#define MEMVIEW_DATASIZE (16*8)
struct UserData
{
    /* [Updated by Form1]Buttons push state */
    unsigned char btn[BTN_COUNT];

    /* [Updated by ProcessThread]CheckBox/RadioButtons states */
    unsigned long address;
    unsigned long dbg_address;
    unsigned long length;
    unsigned char length_is_KB;
    unsigned char exec_flag;
    unsigned char dbg_use;
    unsigned long dbg_sleep;
    unsigned long silent_dbg;

    long log_type;
    long log_output;
    long log_level;
    unsigned char log_silent;

    unsigned long mv_address;
    unsigned char mv_autoread;
    unsigned char mv_data[MEMVIEW_DATASIZE];
    unsigned char mv_cntr, mv_cver;

    /* [Updated by ProcessThread]Text fields */
    char main_log_file[STR_LEN];
    char log_file[STR_LEN];
    char log_settings[STR_LEN];

    char ini_file[STR_LEN];
    char param_text[STR_LEN];
    char param_value[STR_LEN];

    char up_file[STR_LEN];
    char down_file[STR_LEN];
    char dbg_file[STR_LEN];
    char dbg_folder[STR_LEN];
    char prompt_answer[STR_LEN];


    /* [Updated by ProcessThread]Text fields */

    /* [Updated by ProcessThread]Status bar */
    unsigned char transfer_on;
    unsigned char debugger_on;
    unsigned char prompt_on;

    /* [Updated by ProcessThread]DBG pool count */
    unsigned char debugger_count;
};
#pragma pack(pop)


#endif // _USER_DATA_H_


