| 25 |
|
|
| 26 |
struct user_info_t |
struct user_info_t |
| 27 |
{ |
{ |
| 28 |
|
int32_t id; |
| 29 |
int32_t uid; |
int32_t uid; |
| 30 |
char username[BBS_username_max_len + 1]; |
char username[BBS_username_max_len + 1]; |
| 31 |
char nickname[BBS_nickname_max_len + 1]; |
char nickname[BBS_nickname_max_len + 1]; |
| 39 |
}; |
}; |
| 40 |
typedef struct user_info_t USER_INFO; |
typedef struct user_info_t USER_INFO; |
| 41 |
|
|
| 42 |
|
struct user_info_index_uid_t |
| 43 |
|
{ |
| 44 |
|
int32_t uid; |
| 45 |
|
int32_t id; |
| 46 |
|
}; |
| 47 |
|
typedef struct user_info_index_uid_t USER_INFO_INDEX_UID; |
| 48 |
|
|
| 49 |
struct user_list_t |
struct user_list_t |
| 50 |
{ |
{ |
| 51 |
USER_INFO users[BBS_max_user_count]; |
USER_INFO users[BBS_max_user_count]; |
| 52 |
|
USER_INFO_INDEX_UID index_uid[BBS_max_user_count]; |
| 53 |
int32_t user_count; |
int32_t user_count; |
| 54 |
}; |
}; |
| 55 |
typedef struct user_list_t USER_LIST; |
typedef struct user_list_t USER_LIST; |
| 56 |
|
|
| 57 |
struct user_online_info_t |
struct user_online_info_t |
| 58 |
{ |
{ |
| 59 |
|
int32_t id; |
| 60 |
char session_id[BBS_session_id_length + 1]; |
char session_id[BBS_session_id_length + 1]; |
| 61 |
USER_INFO user_info; |
USER_INFO user_info; |
| 62 |
char ip[IP_ADDR_LEN]; |
char ip[IP_ADDR_LEN]; |
| 70 |
struct user_online_list_t |
struct user_online_list_t |
| 71 |
{ |
{ |
| 72 |
USER_ONLINE_INFO users[BBS_max_user_online_count]; |
USER_ONLINE_INFO users[BBS_max_user_online_count]; |
| 73 |
|
USER_INFO_INDEX_UID index_uid[BBS_max_user_count]; |
| 74 |
int32_t user_count; |
int32_t user_count; |
| 75 |
}; |
}; |
| 76 |
typedef struct user_online_list_t USER_ONLINE_LIST; |
typedef struct user_online_list_t USER_ONLINE_LIST; |
| 85 |
extern int query_user_list(int page_id, USER_INFO *p_users, int *p_user_count, int *p_page_count); |
extern int query_user_list(int page_id, USER_INFO *p_users, int *p_user_count, int *p_page_count); |
| 86 |
extern int query_user_online_list(int page_id, USER_ONLINE_INFO *p_online_users, int *p_user_count, int *p_page_count); |
extern int query_user_online_list(int page_id, USER_ONLINE_INFO *p_online_users, int *p_user_count, int *p_page_count); |
| 87 |
|
|
| 88 |
extern int query_user_info(int32_t uid, USER_INFO *p_user); |
extern int query_user_info(int32_t id, USER_INFO *p_user); |
| 89 |
|
extern int query_user_info_by_uid(int32_t uid, USER_INFO *p_user); |
| 90 |
|
|
| 91 |
|
extern int query_user_online_info(int32_t id, USER_ONLINE_INFO *p_user); |
| 92 |
|
extern int query_user_online_info_by_uid(int32_t uid, USER_ONLINE_INFO *p_users, int *p_user_cnt, int start_id); |
| 93 |
|
|
| 94 |
#endif //_USER_LIST_H_ |
#endif //_USER_LIST_H_ |