diff options
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 |
