my_teams
check.c File Reference
#include <stdlib.h>
#include <string.h>
#include "server.h"
#include "events.h"
Include dependency graph for check.c:

Functions

bool as_team (const s_server_t *server, const char *team_uuid)
 Check if a team with a UUID exists. More...
 
bool as_channel (const s_server_t *server, const char *channel_uuid)
 Check if a channel with a UUID exists. More...
 
bool as_thread (const s_server_t *server, const char *thread_uuid)
 Check if a thread with a UUID exists. More...
 
bool as_user (const s_server_t *server, const char *user_uuid)
 Check if a user with a UUID exists. More...
 
bool check_uuid (const s_server_t *server, const int fd, char **uuid, const uint16_t type)
 Check if a UUID is allocated. More...
 

Function Documentation

◆ as_channel()

bool as_channel ( const s_server_t server,
const char *  channel_uuid 
)

Check if a channel with a UUID exists.

Parameters
serverThe server
channel_uuidThe channel UUID
Returns
true if the channel exists, false otherwise
Here is the call graph for this function:

◆ as_team()

bool as_team ( const s_server_t server,
const char *  team_uuid 
)

Check if a team with a UUID exists.

Parameters
serverThe server
team_uuidThe team UUID
Returns
true if the team exists, false otherwise
Here is the call graph for this function:

◆ as_thread()

bool as_thread ( const s_server_t server,
const char *  thread_uuid 
)

Check if a thread with a UUID exists.

Parameters
serverThe server
thread_uuidThe thread UUID
Returns
true if the thread exists, false otherwise
Here is the call graph for this function:

◆ as_user()

bool as_user ( const s_server_t server,
const char *  user_uuid 
)

Check if a user with a UUID exists.

Parameters
serverThe server
user_uuidThe user UUID
Returns
true if the user exists, false otherwise
Here is the call graph for this function:

◆ check_uuid()

bool check_uuid ( const s_server_t server,
int  fd,
char **  uuid,
uint16_t  type 
)

Check if a UUID is allocated.

Parameters
serverThe server
fdThe client file descriptor
uuidThe UUID
typeThe packet type
Here is the call graph for this function: