heraia/trunk/src/treatments.c File Reference

#include "heraia_types.h"

Include dependency graph for treatments.c:

Go to the source code of this file.

Functions

static GList * treatment_reverse_do_it (GList *gchar_list)
static gpointer treatment_reverse_copy (gpointer data)
static void treatment_reverse_init (gpointer data)
static void treatment_reverse_kill (gpointer data)
value_tnew_value_t (guint length, guchar *bin_data)
treatment_tcopy_treatment (treatment_t *tment)
treatment_tfind_treatment (GList *tment_list, gchar *tment_name)
GList * init_treatments (void)


Function Documentation

treatment_t* copy_treatment ( treatment_t tment  ) 

Copies the treatment and calls the treatment copy function that copies the data of the treatment itself

Definition at line 62 of file treatments.c.

References treatment_t::copy, treatment_t::data, treatment_t::do_it, treatment_t::init, treatment_t::kill, and treatment_t::name.

Referenced by cb_changed_in_treatment_container_widget(), and copy_data_type_struct().

treatment_t* find_treatment ( GList *  tment_list,
gchar *  tment_name 
)

Finds a treatment, by name, in the treatment list returns the treatment if found, NULL otherwise

Definition at line 100 of file treatments.c.

References treatment_t::data, and treatment_t::name.

Referenced by cb_changed_in_treatment_container_widget().

GList* init_treatments ( void   ) 

Here we do init the available treatment list Should only be called once at init time

Definition at line 124 of file treatments.c.

References treatment_t::copy, treatment_t::do_it, treatment_t::init, treatment_t::kill, treatment_t::name, treatment_reverse_copy(), treatment_reverse_do_it(), treatment_reverse_init(), and treatment_reverse_kill().

Referenced by heraia_init_main_struct().

Here is the call graph for this function:

value_t* new_value_t ( guint  length,
guchar *  bin_data 
)

Definition at line 43 of file treatments.c.

References value_t::bytes, and value_t::length.

Referenced by refresh_all_ud_data_interpretor(), and refresh_hex_datas_entry().

static gpointer treatment_reverse_copy ( gpointer  data  )  [static]

Copy treatment's datas

Definition at line 177 of file treatments.c.

Referenced by init_treatments().

static GList * treatment_reverse_do_it ( GList *  values_list  )  [static]

General background : Each treatment has to provide 4 functions :

  • one that will do the treatment (execute it) with the treatment parameters (if any) [do_it] take a GList of values_t * and return a GList of values_t *
  • one that will init the treatment with defaults values (widget creation included, if any) [init]
  • one that will delete the treatment, widgets included (if any) [kill]
  • one that will copy the internal structures (widgets will be created by the init function) [copy]

Reverse every lists that contains bytes from the hexwidget

Definition at line 187 of file treatments.c.

References value_t::bytes, and value_t::length.

Referenced by init_treatments().

static void treatment_reverse_init ( gpointer  data  )  [static]

Treatment initialisation (called at runtime when selected by the user)

We may init : . structures and widgets (if any) an put all this in 'data'

Definition at line 146 of file treatments.c.

References treatment_t::data.

Referenced by init_treatments().

static void treatment_reverse_kill ( gpointer  data  )  [static]

Deletes treatment (itself)

As there is no data nor structure, there is nothing to free !!

Definition at line 161 of file treatments.c.

Referenced by init_treatments().


Generated on Mon Oct 20 21:23:27 2008 for Heraia by  doxygen 1.5.6