/[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.4 - (hide annotations)
Tue Oct 21 13:00:55 2025 UTC (4 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.3: +0 -7 lines
Content type: text/x-chdr
Set user_list_[rd|rw]_(un)lock() as static
These functions are for internal use only

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 sysadm 1.2 #define BBS_user_limit_per_page 20
24    
25 sysadm 1.1 struct user_info_t
26     {
27     int32_t uid;
28     char username[BBS_username_max_len + 1];
29     char nickname[BBS_nickname_max_len + 1];
30     char gender;
31     int8_t gender_pub;
32     int32_t life;
33     int32_t exp;
34     time_t signup_dt;
35     time_t last_login_dt;
36     time_t birthday;
37     };
38     typedef struct user_info_t USER_INFO;
39    
40     struct user_list_t
41     {
42     USER_INFO users[BBS_max_user_count];
43     int32_t user_count;
44     };
45     typedef struct user_list_t USER_LIST;
46    
47     extern int user_list_load(MYSQL *db, USER_LIST *p_list);
48    
49     extern int user_list_pool_init(void);
50     extern void user_list_pool_cleanup(void);
51     extern int set_user_list_pool_shm_readonly(void);
52     extern int detach_user_list_pool_shm(void);
53    
54     extern int user_list_pool_reload(void);
55    
56 sysadm 1.2 extern int query_user_list(int page_id, USER_INFO *p_users, int *p_user_count, int *p_page_count);
57    
58 sysadm 1.3 extern int query_user_info(int32_t uid, USER_INFO *p_user);
59    
60 sysadm 1.1 #endif //_USER_LIST_H_

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