2024-09-16 14:11:01 +02:00
|
|
|
#ifndef USER_H_
|
|
|
|
#define USER_H_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
typedef struct user {
|
2024-09-18 09:37:02 +02:00
|
|
|
uint8_t *name;
|
2024-09-16 14:11:01 +02:00
|
|
|
wchar_t *icon;
|
|
|
|
int color;
|
|
|
|
} user;
|
|
|
|
|
|
|
|
typedef struct ArrayList {
|
|
|
|
size_t length;
|
|
|
|
size_t capacity;
|
|
|
|
user *items;
|
|
|
|
} ArrayList;
|
|
|
|
|
|
|
|
ArrayList *arraylist_init(size_t capacity);
|
|
|
|
void arraylist_free(ArrayList *list);
|
2024-09-18 09:37:02 +02:00
|
|
|
long arraylist_search(ArrayList *list, uint8_t *username);
|
2024-09-16 14:11:01 +02:00
|
|
|
void arraylist_remove(ArrayList *list, long index);
|
2024-09-18 09:37:02 +02:00
|
|
|
void arraylist_add(ArrayList *list, uint8_t *username, wchar_t *icon, int color, bool marked, bool force);
|
2024-09-16 14:11:01 +02:00
|
|
|
char *get_line(ArrayList *list, long index, bool icons);
|
|
|
|
|
|
|
|
#endif
|