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

Contents of /lbbs/include/article_view_log.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Sat Jun 7 10:00:10 2025 UTC (9 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.2: +5 -2 lines
Content type: text/x-chdr
Appy article_view_log to section_list

1 /***************************************************************************
2 article_view_log.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 _ARTICLE_VIEW_LOG_H_
18 #define _ARTICLE_VIEW_LOG_H_
19
20 #include <stdint.h>
21
22 #define MAX_AID_INC_CNT 1000
23
24 struct article_view_log_t
25 {
26 int uid;
27 int32_t *aid_base;
28 int aid_base_cnt;
29 int32_t aid_inc[MAX_AID_INC_CNT];
30 int aid_inc_cnt;
31 };
32 typedef struct article_view_log_t ARTICLE_VIEW_LOG;
33
34 extern ARTICLE_VIEW_LOG BBS_article_view_log;
35
36 // Load baseline view log from DB
37 extern int article_view_log_load(int uid, ARTICLE_VIEW_LOG *p_view_log, int keep_inc);
38 // Clear data
39 extern int article_view_log_unload(ARTICLE_VIEW_LOG *p_view_log);
40 // Save incremental view log to DB
41 extern int article_view_log_save_inc(const ARTICLE_VIEW_LOG *p_view_log);
42 // Merge incremental view log to baseline, without DB read / write
43 extern int article_view_log_merge_inc(ARTICLE_VIEW_LOG *p_view_log);
44
45 // Check if specific article was viewed
46 extern int article_view_log_is_viewed(int32_t aid, const ARTICLE_VIEW_LOG *p_view_log);
47 // Set specific article as viewed
48 extern int article_view_log_set_viewed(int32_t aid, ARTICLE_VIEW_LOG *p_view_log);
49
50 #endif //_ARTICLE_VIEW_LOG_H_

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