heraia/trunk/libheraia/include/decode.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  date_and_time_t

Typedefs

typedef gchar *(* DecodeFunc )(guchar *)
typedef gchar *(* DecodeDateFunc )(guchar *, date_and_time_t *mydate)

Functions

gchar * decode_8bits_unsigned (guchar *data)
gchar * decode_8bits_signed (guchar *data)
gchar * decode_16bits_signed (guchar *data)
gchar * decode_16bits_unsigned (guchar *data)
gchar * decode_32bits_signed (guchar *data)
gchar * decode_32bits_unsigned (guchar *data)
gchar * decode_64bits_signed (guchar *data)
gchar * decode_64bits_unsigned (guchar *data)
gchar * decode_to_bits (guchar *data)
gchar * decode_dos_date (guchar *data, date_and_time_t *mydate)
gchar * decode_filetime_date (guchar *data, date_and_time_t *mydate)
gchar * decode_C_date (guchar *data, date_and_time_t *mydate)
gchar * decode_HFS_date (guchar *data, date_and_time_t *mydate)
gchar * decode_packed_BCD (guchar *data)
gboolean swap_bytes (guchar *to_swap, guint first, guint last)
void reverse_byte_order (guchar *to_reverse)


Typedef Documentation

typedef gchar*(* DecodeDateFunc)(guchar *, date_and_time_t *mydate)

Definition at line 41 of file decode.h.

typedef gchar*(* DecodeFunc)(guchar *)

Definition at line 40 of file decode.h.


Function Documentation

gchar* decode_16bits_signed ( guchar *  data  ) 

general purpose of this function is to take a 2 byte data stream and convert it as if it is a 16 bits signed number data : 2 guchars returns a gchar* that may be freed when no longer needed

Definition at line 85 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_16bits_unsigned ( guchar *  data  ) 

general purpose of this function is to take a 2 byte data stream and convert it as if it is a 16 bits unsigned number data : 2 guchars returns a gchar* that may be freed when no longer needed

Definition at line 107 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_32bits_signed ( guchar *  data  ) 

general purpose of this function is to take a 4 byte data stream and convert it as if it is a 32 bits signed number data : 4 guchars returns a gchar* that may be freed when no longer needed

Definition at line 129 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_32bits_unsigned ( guchar *  data  ) 

general purpose of this function is to take a 4 byte data stream and convert it as if it is a 32 bits unsigned number data : 4 guchars returns a gchar* that may be freed when no longer needed

Definition at line 151 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_64bits_signed ( guchar *  data  ) 

general purpose of this function is to take a 8 byte data stream and convert it as if it is a 64 bits signed number data : 8 guchars returns a gchar* that may be freed when no longer needed

Definition at line 172 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_64bits_unsigned ( guchar *  data  ) 

general purpose of this function is to take a 8 byte data stream and convert it as if it is a 64 bits unsigned number data : 8 guchars returns a gchar* that may be freed when no longer needed

Definition at line 194 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_8bits_signed ( guchar *  data  ) 

General purpose of this function is to take a 1 byte data stream and convert it as if it is an 8 bits signed number data : 1 guchar returns a gchar* that may be freed when no longer needed

Definition at line 40 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_8bits_unsigned ( guchar *  data  ) 

general purpose of this function is to take a 1 byte data stream and convert it as if it is an 8 bits unsigned number data : 1 guchar returns a gchar* that may be freed when no longer needed

Definition at line 62 of file decode.c.

Referenced by refresh_data_interpretor_window().

gchar* decode_C_date ( guchar *  data,
date_and_time_t mydate 
)

general purpose of this function is to take a 4 byte data stream and convert it as if it is a C date. If it is not, the result may be funny ! Counting seconds from 01/01/1970 data : 4 guchars returns a gchar* that may be freed when no longer needed

Definition at line 513 of file decode.c.

References date_printf(), and make_date_and_time().

Referenced by refresh_data_interpretor_window().

Here is the call graph for this function:

gchar* decode_dos_date ( guchar *  data,
date_and_time_t mydate 
)

general purpose of this function is to take a 4 byte data stream and convert it as if it is a dos date. If it is not, the result may be funny ! data : 4 guchars returns a gchar* that may be freed when no longer needed

Definition at line 435 of file decode.c.

References date_printf(), date_and_time_t::day, date_and_time_t::hour, date_and_time_t::minutes, date_and_time_t::month, date_and_time_t::seconds, and date_and_time_t::year.

Referenced by refresh_data_interpretor_window().

Here is the call graph for this function:

gchar* decode_filetime_date ( guchar *  data,
date_and_time_t mydate 
)

general purpose of this function is to take a 8 byte data stream and convert it as if it is a filetime date. If it is not, the result may be funny ! Counting 100th of nanoseconds from 01/01/1601 data : 8 guchars returns a gchar* that may be freed when no longer needed

Definition at line 492 of file decode.c.

References date_printf(), and make_date_and_time().

Referenced by refresh_data_interpretor_window().

Here is the call graph for this function:

gchar* decode_HFS_date ( guchar *  data,
date_and_time_t mydate 
)

general purpose of this function is to take a 4 byte data stream and convert it as if it is a HFS date. If it is not, the result may be funny ! Counting seconds 01/01/1904 data : 4 guchars returns a gchar* that may be freed when no longer needed

Definition at line 533 of file decode.c.

References date_printf(), and make_date_and_time().

Referenced by refresh_data_interpretor_window().

Here is the call graph for this function:

gchar* decode_packed_BCD ( guchar *  data  ) 

Decode one byte as a Packed BCD (Binary Coded Decimal) and return a gchar* that may be freed when no longer needed

Definition at line 644 of file decode.c.

References transform_bcd_to_human().

Referenced by refresh_data_interpretor_window().

Here is the call graph for this function:

gchar* decode_to_bits ( guchar *  data  ) 

decodes the stream represented by *data (one byte) to a string containing eight 0 or 1 (Little Endian style)

Definition at line 552 of file decode.c.

Referenced by refresh_data_interpretor_window().

void reverse_byte_order ( guchar *  to_reverse  ) 

Reverse the byte order LSB -> MSB in MSB -> LSB 12345678 in 87654321

Definition at line 708 of file decode.c.

Referenced by change_endianness().

gboolean swap_bytes ( guchar *  to_swap,
guint  first,
guint  last 
)

Code that has moved into libheraia

gchar *decode_8bits_signed(guchar *data) gchar *decode_8bits_unsigned(guchar *data) gchar *decode_16bits_signed(guchar *data) gchar *decode_16bits_unsigned(guchar *data) gchar *decode_32bits_signed(guchar *data) gchar *decode_32bits_unsigned(guchar *data) gchar *decode_64bits_signed(guchar *data) gchar *decode_64bits_unsigned(guchar *data) Swap bytes from the buffer to_swap recursive function !! call with first = 0 and last = last byte of buffer to swap

Definition at line 687 of file decode.c.

References swap_bytes().

Referenced by change_endianness(), and swap_bytes().

Here is the call graph for this function:


Generated on Sat Jan 17 20:57:33 2009 for Heraia by  doxygen 1.5.6