/*
- * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+ * SPDX-License-Identifier: MIT
*
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*/
#define BT_LOG_TAG "CTF-WRITER/FIELDS"
_name " is not an integer or an enumeration field: " \
"field-addr=%p", (_field))
-BT_HIDDEN
struct bt_ctf_field_common *bt_ctf_field_common_copy(struct bt_ctf_field_common *field)
{
struct bt_ctf_field_common *copy = NULL;
return copy;
}
-BT_HIDDEN
int bt_ctf_field_common_structure_initialize(struct bt_ctf_field_common *field,
struct bt_ctf_field_type_common *type,
bool is_shared, bt_ctf_object_release_func release_func,
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_variant_initialize(struct bt_ctf_field_common *field,
struct bt_ctf_field_type_common *type,
bool is_shared, bt_ctf_object_release_func release_func,
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_string_initialize(struct bt_ctf_field_common *field,
struct bt_ctf_field_type_common *type,
bool is_shared, bt_ctf_object_release_func release_func,
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_array_initialize(struct bt_ctf_field_common *field,
struct bt_ctf_field_type_common *type,
bool is_shared, bt_ctf_object_release_func release_func,
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_sequence_initialize(struct bt_ctf_field_common *field,
struct bt_ctf_field_type_common *type,
bool is_shared, bt_ctf_object_release_func release_func,
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_generic_validate(struct bt_ctf_field_common *field)
{
return (field && field->payload_set) ? 0 : -1;
}
-BT_HIDDEN
int bt_ctf_field_common_structure_validate_recursive(struct bt_ctf_field_common *field)
{
int64_t i;
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_variant_validate_recursive(struct bt_ctf_field_common *field)
{
int ret = 0;
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_array_validate_recursive(struct bt_ctf_field_common *field)
{
int64_t i;
return ret;
}
-BT_HIDDEN
int bt_ctf_field_common_sequence_validate_recursive(struct bt_ctf_field_common *field)
{
int64_t i;
return ret;
}
-BT_HIDDEN
void bt_ctf_field_common_generic_reset(struct bt_ctf_field_common *field)
{
BT_ASSERT_DBG(field);
field->payload_set = false;
}
-BT_HIDDEN
void bt_ctf_field_common_structure_reset_recursive(struct bt_ctf_field_common *field)
{
int64_t i;
}
}
-BT_HIDDEN
void bt_ctf_field_common_variant_reset_recursive(struct bt_ctf_field_common *field)
{
struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
variant->current_field = NULL;
}
-BT_HIDDEN
void bt_ctf_field_common_array_reset_recursive(struct bt_ctf_field_common *field)
{
size_t i;
}
}
-BT_HIDDEN
void bt_ctf_field_common_sequence_reset_recursive(struct bt_ctf_field_common *field)
{
struct bt_ctf_field_common_sequence *sequence = BT_CTF_FROM_COMMON(field);
sequence->length = 0;
}
-BT_HIDDEN
void bt_ctf_field_common_generic_set_is_frozen(struct bt_ctf_field_common *field,
bool is_frozen)
{
field->frozen = is_frozen;
}
-BT_HIDDEN
void bt_ctf_field_common_structure_set_is_frozen_recursive(
struct bt_ctf_field_common *field, bool is_frozen)
{
bt_ctf_field_common_generic_set_is_frozen(field, is_frozen);
}
-BT_HIDDEN
void bt_ctf_field_common_variant_set_is_frozen_recursive(
struct bt_ctf_field_common *field, bool is_frozen)
{
bt_ctf_field_common_generic_set_is_frozen(field, is_frozen);
}
-BT_HIDDEN
void bt_ctf_field_common_array_set_is_frozen_recursive(
struct bt_ctf_field_common *field, bool is_frozen)
{
bt_ctf_field_common_generic_set_is_frozen(field, is_frozen);
}
-BT_HIDDEN
void bt_ctf_field_common_sequence_set_is_frozen_recursive(
struct bt_ctf_field_common *field, bool is_frozen)
{
bt_ctf_field_common_generic_set_is_frozen(field, is_frozen);
}
-BT_HIDDEN
void _bt_ctf_field_common_set_is_frozen_recursive(struct bt_ctf_field_common *field,
bool is_frozen)
{
return;
}
-BT_HIDDEN
bt_ctf_bool bt_ctf_field_common_generic_is_set(struct bt_ctf_field_common *field)
{
return field && field->payload_set;
}
-BT_HIDDEN
bt_ctf_bool bt_ctf_field_common_structure_is_set_recursive(
struct bt_ctf_field_common *field)
{
return is_set;
}
-BT_HIDDEN
bt_ctf_bool bt_ctf_field_common_variant_is_set_recursive(struct bt_ctf_field_common *field)
{
struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
return is_set;
}
-BT_HIDDEN
bt_ctf_bool bt_ctf_field_common_array_is_set_recursive(struct bt_ctf_field_common *field)
{
size_t i;
return is_set;
}
-BT_HIDDEN
bt_ctf_bool bt_ctf_field_common_sequence_is_set_recursive(struct bt_ctf_field_common *field)
{
size_t i;
g_free(field);
}
-BT_HIDDEN
int bt_ctf_field_serialize_recursive(struct bt_ctf_field *field,
struct bt_ctfser *ctfser,
enum bt_ctf_byte_order native_byte_order)
return ret;
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_create(struct bt_ctf_field_type *type)
{
struct bt_ctf_field *field = NULL;
return field;
}
+BT_EXPORT
struct bt_ctf_field_type *bt_ctf_field_get_type(struct bt_ctf_field *field)
{
return bt_ctf_object_get_ref(bt_ctf_field_common_borrow_type((void *) field));
}
+BT_EXPORT
enum bt_ctf_field_type_id bt_ctf_field_get_type_id(struct bt_ctf_field *field)
{
struct bt_ctf_field_common *field_common = (void *) field;
return (int) field_common->type->id;
}
+BT_EXPORT
int bt_ctf_field_sequence_set_length(struct bt_ctf_field *field,
struct bt_ctf_field *length_field)
{
length, (bt_ctf_field_common_create_func) bt_ctf_field_create);
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index(
struct bt_ctf_field *field, uint64_t index)
{
(void *) field, index));
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_structure_get_field_by_name(
struct bt_ctf_field *field, const char *name)
{
(void *) field, name));
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_array_get_field(
struct bt_ctf_field *field, uint64_t index)
{
bt_ctf_field_common_array_borrow_field((void *) field, index));
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_sequence_get_field(
struct bt_ctf_field *field, uint64_t index)
{
bt_ctf_field_common_sequence_borrow_field((void *) field, index));
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field,
struct bt_ctf_field *tag_field)
{
return current_field;
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_variant_get_current_field(
struct bt_ctf_field *variant_field)
{
(void *) variant_field));
}
-BT_HIDDEN
struct bt_ctf_field *bt_ctf_field_enumeration_borrow_container(
struct bt_ctf_field *field)
{
return (void *) enumeration->container;
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_enumeration_get_container(
struct bt_ctf_field *field)
{
return bt_ctf_object_get_ref(bt_ctf_field_enumeration_borrow_container(field));
}
+BT_EXPORT
int bt_ctf_field_integer_signed_get_value(struct bt_ctf_field *field,
int64_t *value)
{
return 0;
}
+BT_EXPORT
int bt_ctf_field_integer_signed_set_value(struct bt_ctf_field *field,
int64_t value)
{
return ret;
}
+BT_EXPORT
int bt_ctf_field_integer_unsigned_get_value(struct bt_ctf_field *field,
uint64_t *value)
{
return 0;
}
+BT_EXPORT
int bt_ctf_field_integer_unsigned_set_value(struct bt_ctf_field *field,
uint64_t value)
{
return 0;
}
+BT_EXPORT
int bt_ctf_field_floating_point_get_value(struct bt_ctf_field *field,
double *value)
{
return bt_ctf_field_common_floating_point_get_value((void *) field, value);
}
+BT_EXPORT
int bt_ctf_field_floating_point_set_value(struct bt_ctf_field *field,
double value)
{
return bt_ctf_field_common_floating_point_set_value((void *) field, value);
}
+BT_EXPORT
const char *bt_ctf_field_string_get_value(struct bt_ctf_field *field)
{
return bt_ctf_field_common_string_get_value((void *) field);
}
+BT_EXPORT
int bt_ctf_field_string_set_value(struct bt_ctf_field *field, const char *value)
{
return bt_ctf_field_common_string_set_value((void *) field, value);
}
+BT_EXPORT
int bt_ctf_field_string_append(struct bt_ctf_field *field, const char *value)
{
return bt_ctf_field_common_string_append((void *) field, value);
}
+BT_EXPORT
int bt_ctf_field_string_append_len(struct bt_ctf_field *field,
const char *value, unsigned int length)
{
return bt_ctf_field_common_string_append_len((void *) field, value, length);
}
+BT_EXPORT
struct bt_ctf_field *bt_ctf_field_copy(struct bt_ctf_field *field)
{
return (void *) bt_ctf_field_common_copy((void *) field);
return ret;
}
-BT_HIDDEN
int bt_ctf_field_structure_set_field_by_name(struct bt_ctf_field *field,
const char *name, struct bt_ctf_field *value)
{