Pathfinder Property Value API.
More...
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Pathfinder Property Value API.
Service properties can be either integer or a string.
◆ paf_value_is_int64()
bool paf_value_is_int64 |
( |
const struct paf_value * |
value | ) |
|
Checks if the value is an integer.
- Returns
- Returns true if
value
is an integer, or false otherwise.
◆ paf_value_is_str()
bool paf_value_is_str |
( |
const struct paf_value * |
value | ) |
|
Checks if the value is a string.
- Returns
- Returns true if
value
is a string, or false otherwise.
◆ paf_value_int64_create()
struct paf_value * paf_value_int64_create |
( |
int64_t |
value | ) |
|
Creates an integer value.
- Parameters
-
[in] | value | The 64-bit value used to initialize value . |
- Returns
- Returns a value instance of the integer type.
◆ paf_value_int64()
int64_t paf_value_int64 |
( |
const struct paf_value * |
value | ) |
|
Retrieves the integer value of value
.
- Parameters
-
[in] | value | A value of type integer. |
- Returns
- Returns the 64-bit signed value of
value
.
◆ paf_value_str_create()
struct paf_value * paf_value_str_create |
( |
const char * |
value | ) |
|
Creates a string value.
- Parameters
-
[in] | value | The string to be copied and used to initialize value . |
- Returns
- Returns a value instance of the string type.
◆ paf_value_str()
const char * paf_value_str |
( |
const struct paf_value * |
value | ) |
|
Retrieves the string of value
.
The returned point should not be written to, and not bee freed by the caller.
- Parameters
-
[in] | value | A value of type string. |
- Returns
- Returns a read-only pointer to the string value of
value
.
◆ paf_value_equal()
bool paf_value_equal |
( |
const struct paf_value * |
value_a, |
|
|
const struct paf_value * |
value_b |
|
) |
| |
Compares two values for equality.
The values must be of the same type and have the same value in order to be considered equal.
- Parameters
-
[in] | value_a | A value. |
[in] | value_b | Another (or the same) value. |
- Returns
- Returns true if
value_a
and value_b
are equal, false otherwise.
◆ paf_value_clone()
struct paf_value * paf_value_clone |
( |
const struct paf_value * |
orig | ) |
|
Returns a copy of the supplied value.
- Parameters
-
[in] | orig | The value to be copied. |
- Returns
- Returns a copy of the value.
◆ paf_value_destroy()
void paf_value_destroy |
( |
struct paf_value * |
value | ) |
|
Destroys a value instance.
This function destroys the value instance and frees all the resources associated with it.
- Parameters
-