X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fctf%2Fctf-types.h;fp=include%2Fctf%2Fctf-types.h;h=0000000000000000000000000000000000000000;hp=25ec34666c3c8c957a1dfd70e3136c45d453c9f8;hb=d79865b92da224131f58ab311e75e49043b62c7a;hpb=ceb811dc38fe93065f7c1119b9509f9f29a45d76 diff --git a/include/ctf/ctf-types.h b/include/ctf/ctf-types.h deleted file mode 100644 index 25ec3466..00000000 --- a/include/ctf/ctf-types.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef _CTF_TYPES_H -#define _CTF_TYPES_H - -/* - * Common Trace Format - * - * Type header - * - * Copyright (c) 2010 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -/* - * IMPORTANT: All lengths (len) and offsets (start, end) are expressed in bits, - * *not* in bytes. - * - * All write primitives, as well as read for dynamically sized entities, can - * receive a NULL ptr/dest parameter. In this case, no write is performed, but - * the size is returned. - */ - -uint64_t ctf_uint_read(const unsigned char *ptr, int byte_order, size_t len); -int64_t ctf_int_read(const unsigned char *ptr, int byte_order, size_t len); -size_t ctf_uint_write(unsigned char *ptr, int byte_order, size_t len, uint64_t v); -size_t ctf_int_write(unsigned char *ptr, int byte_order, size_t len, int64_t v); - -/* - * ctf-types-bitfield.h declares: - * - * ctf_bitfield_unsigned_read - * ctf_bitfield_signed_read - * ctf_bitfield_unsigned_write - * ctf_bitfield_signed_write - */ -#include - -double ctf_double_read(const unsigned char *ptr, const struct ctf_float *src) -size_t ctf_double_write(unsigned char *ptr, const struct ctf_float *dest, - double v); -long double ctf_ldouble_read(const unsigned char *ptr, - const struct ctf_float *src) -size_t ctf_ldouble_write(unsigned char *ptr, const struct ctf_float *dest, - long double v); -struct ctf_float { - size_t exp_len; - size_t mantissa_len; /* Including sign bit */ - int byte_order; -}; -void ctf_float_copy(unsigned char *destp, const struct ctf_float *dest, - const unsigned char *srcp, const struct ctf_float *src); - -size_t ctf_string_copy(unsigned char *dest, const unsigned char *src); - -/* - * A GQuark can be translated to/from strings with g_quark_from_string() and - * g_quark_to_string(). - */ -GQuark ctf_enum_uint_to_quark(const struct enum_table *table, uint64_t v); -GQuark ctf_enum_int_to_quark(const struct enum_table *table, uint64_t v); -uint64_t ctf_enum_quark_to_uint(size_t len, int byte_order, GQuark q); -int64_t ctf_enum_quark_to_int(size_t len, int byte_order, GQuark q); -void ctf_enum_signed_insert(struct enum_table *table, int64_t v, GQuark q); -void ctf_enum_unsigned_insert(struct enum_table *table, uint64_t v, GQuark q); -struct enum_table *ctf_enum_new(void); -void ctf_enum_destroy(struct enum_table *table); - -#endif /* _CTF_TYPES_H */