-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfriends.h
65 lines (54 loc) · 1.54 KB
/
friends.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Copyright (c) 2024, Andrei Rusanescu <andreirusanescu154gmail.com>
*/
#ifndef FRIENDS_H
#define FRIENDS_H
#include "graph.h"
#define MAX_COMMAND_LEN 500
/**
* Function that handles the calling of every command from task 1
*
* Please add any necessary parameters to the functions
*/
void handle_input_friends(char *input, list_graph_t *graph);
/**
* @brief Makes a connection between two users
* @param graph The graph of connections
*/
void add_friend(list_graph_t *graph);
/**
* @brief Removes the connection between two users
* @param graph The graph of connections
*/
void remove_friend(list_graph_t *graph);
/**
* @brief Shows the minimal number of connections
* between two users if there is a path
* @param graph The graph of connections
*/
void get_distance(list_graph_t *graph);
/**
* @brief Finds the friends of all the friends of
* a user that are not yet connected with the user.
* Displays them in ascending order of the user id.
* @param graph The graph of connections
*/
void suggestions(list_graph_t *graph);
/**
* @brief Finds the common friends of two users
* Displays them in ascending order of the user id.
* @param graph The graph of connections
*/
void common(list_graph_t *graph);
/**
* @brief Displays the number of connections of a user
* @param graph The graph of connections
*/
void friends(list_graph_t *graph);
/**
* @brief Displays the most popular user between
* a user with name <name> and its friends
* @param graph The graph of connections
*/
void popular(list_graph_t *graph);
#endif // FRIENDS_H