refactor: make Resource use glib functions

This commit is contained in:
Michael Vetter
2026-02-26 17:40:57 +01:00
parent 8a36ca6d97
commit abffffb499
2 changed files with 18 additions and 16 deletions

View File

@@ -40,20 +40,20 @@
typedef struct resource_t
{
char* name;
gchar* name;
resource_presence_t presence;
char* status;
gchar* status;
int priority;
} Resource;
Resource* resource_new(const char* const name, resource_presence_t presence, const char* const status,
Resource* resource_new(const gchar* const name, resource_presence_t presence, const gchar* const status,
const int priority);
void resource_destroy(Resource* resource);
int resource_compare_availability(Resource* first, Resource* second);
gboolean valid_resource_presence_string(const char* const str);
const char* string_from_resource_presence(resource_presence_t presence);
resource_presence_t resource_presence_from_string(const char* const str);
gboolean valid_resource_presence_string(const gchar* const str);
const gchar* string_from_resource_presence(resource_presence_t presence);
resource_presence_t resource_presence_from_string(const gchar* const str);
contact_presence_t contact_presence_from_resource_presence(resource_presence_t resource_presence);
#endif