aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftypes-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-01-15 01:05:03 +0000
committerGuy Harris <guy@alum.mit.edu>2014-01-15 01:05:03 +0000
commit61867d0b2f80971dc6927c50f61a4d2bb0420cad (patch)
treea4cfeca9c61d79a3372b925a99cf9606efcce64b /epan/ftypes/ftypes-int.h
parent04b18f44c1af4da3c8c089c58bbc9bb2a1362bc1 (diff)
Eliminate fvalue_set() in favor of routines that take arguments
appropriate for particular FT_ types. This lets us do some more type checking and lets us use const pointers when appropriate. Constify a bunch of stuff, and don't cast away constness. svn path=/trunk/; revision=54811
Diffstat (limited to 'epan/ftypes/ftypes-int.h')
-rw-r--r--epan/ftypes/ftypes-int.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/epan/ftypes/ftypes-int.h b/epan/ftypes/ftypes-int.h
index cdc19c546f..fb4ae31a36 100644
--- a/epan/ftypes/ftypes-int.h
+++ b/epan/ftypes/ftypes-int.h
@@ -49,12 +49,17 @@ void ftype_register_pcre(void);
typedef void (*FvalueNewFunc)(fvalue_t*);
typedef void (*FvalueFreeFunc)(fvalue_t*);
-typedef gboolean (*FvalueFromUnparsed)(fvalue_t*, char*, gboolean, LogFunc);
-typedef gboolean (*FvalueFromString)(fvalue_t*, char*, LogFunc);
+typedef gboolean (*FvalueFromUnparsed)(fvalue_t*, const char*, gboolean, LogFunc);
+typedef gboolean (*FvalueFromString)(fvalue_t*, const char*, LogFunc);
typedef void (*FvalueToStringRepr)(fvalue_t*, ftrepr_t, char*volatile);
typedef int (*FvalueStringReprLen)(fvalue_t*, ftrepr_t);
-typedef void (*FvalueSetFunc)(fvalue_t*, gpointer, gboolean);
+typedef void (*FvalueSetByteArrayFunc)(fvalue_t*, GByteArray *);
+typedef void (*FvalueSetBytesFunc)(fvalue_t*, const guint8 *);
+typedef void (*FvalueSetGuidFunc)(fvalue_t*, const e_guid_t *);
+typedef void (*FvalueSetTimeFunc)(fvalue_t*, const nstime_t *);
+typedef void (*FvalueSetStringFunc)(fvalue_t*, const gchar *value);
+typedef void (*FvalueSetTvbuffFunc)(fvalue_t*, tvbuff_t *value);
typedef void (*FvalueSetUnsignedIntegerFunc)(fvalue_t*, guint32);
typedef void (*FvalueSetSignedIntegerFunc)(fvalue_t*, gint32);
typedef void (*FvalueSetInteger64Func)(fvalue_t*, guint64);
@@ -84,7 +89,12 @@ struct _ftype_t {
FvalueStringReprLen len_string_repr;
/* could be union */
- FvalueSetFunc set_value;
+ FvalueSetByteArrayFunc set_value_byte_array;
+ FvalueSetBytesFunc set_value_bytes;
+ FvalueSetGuidFunc set_value_guid;
+ FvalueSetTimeFunc set_value_time;
+ FvalueSetStringFunc set_value_string;
+ FvalueSetTvbuffFunc set_value_tvbuff;
FvalueSetUnsignedIntegerFunc set_value_uinteger;
FvalueSetSignedIntegerFunc set_value_sinteger;
FvalueSetInteger64Func set_value_integer64;