1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <inttypes.h> 5 #include <stdbool.h> 6 #include <sys/types.h> 7 8 typedef struct UpdateSet UpdateSet; 9 10 #include "sysupdate-instance.h" 11 12 typedef enum UpdateSetFlags { 13 UPDATE_NEWEST = 1 << 0, 14 UPDATE_AVAILABLE = 1 << 1, 15 UPDATE_INSTALLED = 1 << 2, 16 UPDATE_OBSOLETE = 1 << 3, 17 UPDATE_PROTECTED = 1 << 4, 18 } UpdateSetFlags; 19 20 struct UpdateSet { 21 UpdateSetFlags flags; 22 char *version; 23 Instance **instances; 24 size_t n_instances; 25 }; 26 27 UpdateSet *update_set_free(UpdateSet *us); 28 29 int update_set_cmp(UpdateSet *const*a, UpdateSet *const*b); 30 31 const char *update_set_flags_to_color(UpdateSetFlags flags); 32 const char *update_set_flags_to_glyph(UpdateSetFlags flags); 33