#ifndef TURNS_PARTICIPANT_H #define TURNS_PARTICIPANT_H #include #include G_BEGIN_DECLS typedef enum { TURNS_PARTICIPANT_DISPOSITION_NEUTRAL, TURNS_PARTICIPANT_DISPOSITION_FRIENDLY, TURNS_PARTICIPANT_DISPOSITION_HOSTILE, TURNS_PARTICIPANT_DISPOSITION_SECRET, } TurnsParticipantDisposition; GType turns_participant_disposition_get_type(void) G_GNUC_CONST; #define TURNS_TYPE_PARTICIPANT_DISPOSITION (turns_participant_disposition_get_type()) #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(void) 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, TurnsParticipantDisposition disposition) G_GNUC_WARN_UNUSED_RESULT; /** * @brief Get the active state of a participant. * * @param self A Participant instance. The value *must not* be NULL. * @return The active state of the instance. */ gboolean turns_participant_get_active(TurnsParticipant const * self); /** * @brief Get the defeated state of a participant. * * @param self A Participant instance. The value *must not* be NULL. * @return The defeated state of the instance. */ gboolean turns_participant_get_defeated(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. */ TurnsParticipantDisposition turns_participant_get_disposition(TurnsParticipant const * self); /** * @brief Get the id of a participant. * * @param self A participant instance. The value *must not* be NULL. * @return The id of the instance. The data ist owned by the instance. */ gchar const * turns_participant_get_id(TurnsParticipant const * self); /** * @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 Set the active state of a participant. * * @param self A Participant instance. The value *must not* be NULL. * @return The new active state. */ void turns_participant_set_active(TurnsParticipant * self, gboolean value); /** * @brief Set the defeated state of a participant. * * @param self A Participant instance. The value *must not* be NULL. * @param value The new defeated state. */ void turns_participant_set_defeated(TurnsParticipant * self, gboolean 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, TurnsParticipantDisposition value); /** * @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); G_END_DECLS #endif