/[LeafOK_CVS]/lbbs/include/user_list.h
ViewVC logotype

Annotation of /lbbs/include/user_list.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Oct 21 06:24:51 2025 UTC (4 months, 3 weeks ago) by sysadm
Branch: MAIN
Content type: text/x-chdr
Add user_list with data loader

1 sysadm 1.1 /***************************************************************************
2     user_list.h - description
3     -------------------
4     Copyright : (C) 2004-2025 by Leaflet
5     Email : leaflet@leafok.com
6     ***************************************************************************/
7    
8     /***************************************************************************
9     * *
10     * This program is free software; you can redistribute it and/or modify *
11     * it under the terms of the GNU General Public License as published by *
12     * the Free Software Foundation; either version 3 of the License, or *
13     * (at your option) any later version. *
14     * *
15     ***************************************************************************/
16    
17     #ifndef _USER_LIST_H_
18     #define _USER_LIST_H_
19    
20     #include "bbs.h"
21     #include <mysql/mysql.h>
22    
23     struct user_info_t
24     {
25     int32_t uid;
26     char username[BBS_username_max_len + 1];
27     char nickname[BBS_nickname_max_len + 1];
28     char gender;
29     int8_t gender_pub;
30     int32_t life;
31     int32_t exp;
32     time_t signup_dt;
33     time_t last_login_dt;
34     time_t birthday;
35     };
36     typedef struct user_info_t USER_INFO;
37    
38     struct user_list_t
39     {
40     USER_INFO users[BBS_max_user_count];
41     int32_t user_count;
42     };
43     typedef struct user_list_t USER_LIST;
44    
45     extern int user_list_load(MYSQL *db, USER_LIST *p_list);
46    
47     extern int user_list_pool_init(void);
48     extern void user_list_pool_cleanup(void);
49     extern int set_user_list_pool_shm_readonly(void);
50     extern int detach_user_list_pool_shm(void);
51    
52     extern int user_list_pool_reload(void);
53    
54     extern int user_list_try_rd_lock(int wait_sec);
55     extern int user_list_try_rw_lock(int wait_sec);
56     extern int user_list_rd_unlock(void);
57     extern int user_list_rw_unlock(void);
58     extern int user_list_rd_lock(void);
59     extern int user_list_rw_lock(void);
60    
61     #endif //_USER_LIST_H_

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1