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

Annotation of /lbbs/include/section_list_loader.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (hide annotations)
Tue Nov 4 14:58:55 2025 UTC (4 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.20: +1 -1 lines
Content type: text/x-chdr
Refine file header information comments

1 sysadm 1.20 /* SPDX-License-Identifier: GPL-3.0-or-later */
2     /*
3     * section_list_loader
4     * - load and query operations of section articles
5     *
6 sysadm 1.21 * Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com>
7 sysadm 1.20 */
8 sysadm 1.1
9 sysadm 1.6 #ifndef _SECTION_LIST_LOADER_H_
10     #define _SECTION_LIST_LOADER_H_
11    
12 sysadm 1.14 #include "menu.h"
13 sysadm 1.1 #include "section_list.h"
14 sysadm 1.11 #include <mysql/mysql.h>
15 sysadm 1.1
16 sysadm 1.4 #define ERR_UNKNOWN_SECTION -101
17 sysadm 1.7 #define LOAD_ARTICLE_COUNT_LIMIT 1000
18 sysadm 1.4
19 sysadm 1.5 extern int section_list_loader_pid;
20     extern int last_article_op_log_mid;
21    
22 sysadm 1.15 extern int load_section_config_from_db(int update_gen_ex);
23 sysadm 1.1
24     // Input global_lock = 0 : lock / unlock corresponding section per article
25     // 1 : lock / unlock all sections per invocation
26 sysadm 1.7 // Return on success : count of appended articles (>= 0)
27 sysadm 1.3 // failure : lock / unlock error (-1)
28 sysadm 1.4 // : unknown section found (ERR_UNKNOWN_SECTION)
29 sysadm 1.7 extern int append_articles_from_db(int32_t start_aid, int global_lock, int article_count_limit);
30 sysadm 1.1
31 sysadm 1.5 extern int set_last_article_op_log_from_db(void);
32    
33 sysadm 1.7 // Return on success : count of appended articles (>= 0)
34     // failure : lock / unlock error (-1)
35     // : unknown section found (ERR_UNKNOWN_SECTION)
36     extern int apply_article_op_log_from_db(int op_count_limit);
37 sysadm 1.4
38     extern int section_list_loader_launch(void);
39    
40 sysadm 1.5 // Return on success : real page_id (>= 0)
41     // failure : error number (< 0)
42 sysadm 1.13 extern int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[],
43     int *p_article_count, int *p_page_count, int *p_ontop_start_offset);
44 sysadm 1.6
45 sysadm 1.9 // Input direction = 0 : locate p_article_cur
46     // -1 : p_article_cur->p_topic_prior
47     // 1 : p_article_cur->p_topic_next
48     // Return on success : found (1)
49     // : not found (0)
50     // failure : error number (< 0)
51 sysadm 1.12 extern int locate_article_in_section(SECTION_LIST *p_section, const ARTICLE *p_article_cur, int direction, int step,
52 sysadm 1.10 int *p_page_id, int *p_visible_offset, int *p_article_count);
53 sysadm 1.9
54 sysadm 1.19 extern int last_article_in_section(SECTION_LIST *p_section, const ARTICLE **pp_article);
55    
56 sysadm 1.16 // Return on success : found (1)
57     // : not found (0)
58     // failure : error number (< 0)
59     extern int scan_unread_article_in_section(SECTION_LIST *p_section, const ARTICLE *p_article_cur, const ARTICLE **pp_article_unread);
60    
61 sysadm 1.17 extern int scan_article_in_section_by_uid(SECTION_LIST *p_section, const ARTICLE *p_article_cur,
62     int direction, int32_t uid, const ARTICLE **pp_article);
63     extern int scan_article_in_section_by_username(SECTION_LIST *p_section, const ARTICLE *p_article_cur,
64 sysadm 1.20 int direction, const char *username, const ARTICLE **pp_article);
65 sysadm 1.18 extern int scan_article_in_section_by_title(SECTION_LIST *p_section, const ARTICLE *p_article_cur,
66 sysadm 1.20 int direction, const char *title, const ARTICLE **pp_article);
67 sysadm 1.17
68 sysadm 1.14 extern int get_section_ex_menu_set(SECTION_LIST *p_section, MENU_SET *p_ex_menu_set);
69    
70 sysadm 1.6 #endif //_SECTION_LIST_LOADER_H_

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