my_teams
client.h
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2024
3 ** my_teams [WSL: Arch]
4 ** File description:
5 ** client
6 */
7 
8 #ifndef CLIENT_H_
9  #define CLIENT_H_
10 
11  #include "protocol.h"
12  #include "events_structures.h"
13 
14  #include <sys/queue.h>
15  #include <sys/types.h>
16  #include <uuid/uuid.h>
17 
18 typedef struct queue_node {
22 
23 TAILQ_HEAD(queue_head, queue_node);
24 typedef struct queue_head queue_head_t;
25 
26 typedef struct {
27  char team_uuid[UUID_LENGTH];
28  char channel_uuid[UUID_LENGTH];
29  char thread_uuid[UUID_LENGTH];
30 } context_t;
31 
32 typedef struct {
36 } c_client_t;
37 
46 int client(int ac, char **av);
47 
53 void client_logger(const p_packet_t *payload, c_client_t *client);
54 
60 char **get_args_from_input(const char *input);
61 
62 #endif /* !CLIENT_H_ */
TAILQ_HEAD(queue_head, queue_node)
int client(int ac, char **av)
main function for the client is only used by main (is returned by the main function)
Definition: client.c:176
struct queue_head queue_head_t
Definition: client.h:24
char ** get_args_from_input(const char *input)
process client input as arguments
Definition: get_args.c:30
struct queue_node queue_node_t
void client_logger(const p_packet_t *payload, c_client_t *client)
logs the client
Definition: logger.c:10
#define UUID_LENGTH
Definition: events_structures.h:11
Definition: client.h:32
context_t context
Definition: client.h:35
p_client_t * p_client
Definition: client.h:33
user_t user
Definition: client.h:34
Definition: client.h:26
Represents a client with socket file descriptor and network data.
Definition: protocol.h:51
Represents a packet with type and data.
Definition: protocol.h:31
Definition: client.h:18
TAILQ_ENTRY(queue_node) entries
p_packet_t * packet
Definition: client.h:19
Definition: events_structures.h:25