TIM SDK
TIM API C
boolean.h File Reference

Description

Boolean value.

Object type boolean.

Typedefs

typedef enum ta_e_boolean ta_e_boolean_t
 Boolean value.
 

Enumerations

enum  ta_e_boolean { ta_c_b_undefined, ta_c_b_true, ta_c_b_false }
 Boolean value. More...
 

Functions

ta_e_result_code_t ta_boolean_create (ta_object_t *boolean, ta_e_boolean_t value)
 Create immutable boolean instance. More...
 
ta_e_result_code_t ta_boolean_get_value (ta_object_t boolean, ta_e_boolean_t *value)
 Get value of boolean. More...
 

Enumeration Type Documentation

◆ ta_e_boolean

Boolean value.

Enumerator
ta_c_b_undefined 

Invalid/undefined.

ta_c_b_true 

True value.

ta_c_b_false 

False value.

Function Documentation

◆ ta_boolean_create()

ta_e_result_code_t ta_boolean_create ( ta_object_t boolean,
ta_e_boolean_t  value 
)

Create immutable boolean instance.

Caller retains a reference to the created boolean. Different users can individually retain the boolean instance themselves by calling ta_object_retain. Each call to ta_object_retain and ta_boolean_create has to be matched with a call to ta_object_release. The boolean instance is destroyed once nobody retains the boolean instance anymore.

Parameters
[out]booleanPointer to variable to write created object instance to. Created object instance is retained.
[in]valueValue of boolean.
Return values
ta_c_rc_okObject instance has been created and written to boolean.
ta_c_rc_invalid_argumentboolean is null-pointer.
ta_c_rc_invalid_argumentvalue is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_boolean_get_value()

ta_e_result_code_t ta_boolean_get_value ( ta_object_t  boolean,
ta_e_boolean_t value 
)

Get value of boolean.

Parameters
[in]booleanObject instance of type boolean.
[out]valuePointer to variable to write value to.
Return values
ta_c_rc_okValue written to value.
ta_c_rc_invalid_argumentboolean is ta_invalid_object.
ta_c_rc_invalid_argumentboolean is not of type boolean.
ta_c_rc_invalid_argumentvalue is null-pointer.