Heraia  0.1.8
treatments.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  treatments.h
4  Treatments that may be applied to make a new data type
5 
6  (C) Copyright 2007 - 2008 Olivier Delhomme
7  e-mail : heraia@delhomme.org
8  URL : http://heraia.tuxfamily.org
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2, or (at your option)
13  any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24 
25 #ifndef _TREATMENTS_H_
26 #define _TREATMENTS_H_
27 
28 typedef struct
29 {
30  guint length; /* length of the field bytes below */
31  guchar *bytes; /* bytes extracted and/or parsed */
32 } value_t;
33 
34 extern value_t *new_value_t(guint length, guchar *bin_data);
35 extern treatment_t *copy_treatment(treatment_t *tment);
36 extern treatment_t *find_treatment(GList *tment_list, gchar *tment_name);
37 extern GList *init_treatments(void);
38 
39 #endif /* _TREATMENTS_H_ */
GList * init_treatments(void)
Here we do init the available treatment list Should only be called once at init time.
Definition: treatments.c:124
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: treatments.c:100
guchar * bytes
Definition: treatments.h:31
guint length
Definition: treatments.h:30
treatment_t * copy_treatment(treatment_t *tment)
Copies the treatment and calls the treatment copy function that copies the data of the treatment itse...
Definition: treatments.c:62
value_t * new_value_t(guint length, guchar *bin_data)
Definition: treatments.c:43