diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-12 16:21:53 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-12 16:21:53 +0200 |
| commit | a2c73b6ba3c9ea307b0b0eb94c9e769a1f31dc00 (patch) | |
| tree | 4235e54f0557c76b1226367b8cd5e5f561d7662a /lib/src/turns-participant.h | |
| parent | 45ef4948db670224c7cc727507f84924bd826002 (diff) | |
| download | turns-a2c73b6ba3c9ea307b0b0eb94c9e769a1f31dc00.tar.xz turns-a2c73b6ba3c9ea307b0b0eb94c9e769a1f31dc00.zip | |
lib: move C library to new directory
Diffstat (limited to 'lib/src/turns-participant.h')
| -rw-r--r-- | lib/src/turns-participant.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/lib/src/turns-participant.h b/lib/src/turns-participant.h new file mode 100644 index 0000000..502de32 --- /dev/null +++ b/lib/src/turns-participant.h @@ -0,0 +1,84 @@ +#ifndef TURNS_PARTICIPANT_H +#define TURNS_PARTICIPANT_H + +#include "turns-disposition.h" + +#include <glib-object.h> +#include <glib.h> +#include <glibconfig.h> + +G_BEGIN_DECLS + +#define TURNS_TYPE_PARTICIPANT turns_participant_get_type() +G_DECLARE_FINAL_TYPE(TurnsParticipant, turns_participant, TURNS, PARTICIPANT, GObject) + +/** + * @brief Construct a new Participant. + * + * This functions constructs a default initialized instance, meaning: + * - @p name is the empty string + * - @p priority is 0.0f + * - @p disposition is Disposition.Neutral. + */ +TurnsParticipant * turns_participant_new() G_GNUC_WARN_UNUSED_RESULT; + +/** + * @brief Construct a new Participant with the given values. + * + * @param name The name of the new instance. The value *must not* be NULL. + * @param priority The priority of the new instance. + * @param disposition The disposition of the new instance. + */ +TurnsParticipant * turns_participant_new_with(gchar const * name, gfloat priority, TurnsDisposition disposition) G_GNUC_WARN_UNUSED_RESULT; + +/** + * @brief Get the name of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @return The name of the instance. The data is owned by the instance. + */ +gchar const * turns_participant_get_name(TurnsParticipant const * self); + +/** + * @brief Get the priority of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @return The priority of the instance. + */ +gfloat turns_participant_get_priority(TurnsParticipant const * self); + +/** + * @brief Get the disposition of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @return The disposition of the instance. + */ +TurnsDisposition turns_participant_get_disposition(TurnsParticipant const * self); + +/** + * @brief Set the name of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @param value The new name. The data is owned by the caller of the method. + */ +void turns_participant_set_name(TurnsParticipant * self, gchar const * value); + +/** + * @brief Set the priority of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @param value The new priority. + */ +void turns_participant_set_priority(TurnsParticipant * self, gfloat value); + +/** + * @brief Set the disposition of a participant. + * + * @param self A Participant instance. The value *must not* be NULL. + * @param value The new disposition. + */ +void turns_participant_set_disposition(TurnsParticipant * self, TurnsDisposition value); + +G_END_DECLS + +#endif
\ No newline at end of file |
