Nilorea Library

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros
n_user.h
Go to the documentation of this file.
1
14 #ifndef N_USER_MANAGEMENT
15
16 #define N_USER_MANAGEMENT
17
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22
23
24
26 typedef struct N_USER_BOX {
27
29 NETWORK *netw;
30
32 char name[ 1024 ];
33
35 int state;
36
38 double anchor_x,
40 anchor_y,
42 shift_x,
44 shift_y,
46 id;
47
48 }N_USER_BOX;
49
50
51
53 typedef struct N_USER {
54
56 N_USER_BOX *list;
57
59 int max,
61 highter;
62
64 pthread_mutex_t user_bolt;
65
66 }N_USER;
67
68
69
70 /*
71 * Create a list of user
72 */
73
74 int create_list_of_user( N_USER *list , int max );
75
76
77
78 /*
79 * Add an user to the list
80 */
81
82 int add_user( N_USER *list );
83
84
85
86 /*
87 * Delete an user from the list
88 */
89
90 int rem_user( N_USER *list ,int id );
91
92
93
94 /*
95 * Add a message to all user inside the list
96 */
97
98 int add_msg_to_all( N_USER *list , N_STR *msg );
99
100
101
102 /*
103 * Add a message to a specific user
104 */
105
106 int add_msg_to_user( N_USER *list , int id , N_STR *msg );
107
108
109
110 #ifdef __cplusplus
111 }
112 #endif
113
114 #endif /* #ifndef N_USER_MANAGEMENT */