/[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.14 - (hide annotations)
Tue Jun 24 10:01:24 2025 UTC (8 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.13: +4 -1 lines
Content type: text/x-chdr
Add feature of excerptional directory list and article view

1 sysadm 1.1 /***************************************************************************
2     section_list_loader.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 sysadm 1.6 #ifndef _SECTION_LIST_LOADER_H_
18     #define _SECTION_LIST_LOADER_H_
19    
20 sysadm 1.14 #include "menu.h"
21 sysadm 1.1 #include "section_list.h"
22 sysadm 1.11 #include <mysql/mysql.h>
23 sysadm 1.1
24 sysadm 1.4 #define ERR_UNKNOWN_SECTION -101
25 sysadm 1.7 #define LOAD_ARTICLE_COUNT_LIMIT 1000
26 sysadm 1.4
27 sysadm 1.5 extern int section_list_loader_pid;
28     extern int last_article_op_log_mid;
29    
30 sysadm 1.14 extern int load_section_config_from_db(int reload);
31 sysadm 1.1
32     // Input global_lock = 0 : lock / unlock corresponding section per article
33     // 1 : lock / unlock all sections per invocation
34 sysadm 1.7 // Return on success : count of appended articles (>= 0)
35 sysadm 1.3 // failure : lock / unlock error (-1)
36 sysadm 1.4 // : unknown section found (ERR_UNKNOWN_SECTION)
37 sysadm 1.7 extern int append_articles_from_db(int32_t start_aid, int global_lock, int article_count_limit);
38 sysadm 1.1
39 sysadm 1.5 extern int set_last_article_op_log_from_db(void);
40    
41 sysadm 1.7 // Return on success : count of appended articles (>= 0)
42     // failure : lock / unlock error (-1)
43     // : unknown section found (ERR_UNKNOWN_SECTION)
44     extern int apply_article_op_log_from_db(int op_count_limit);
45 sysadm 1.4
46     extern int section_list_loader_launch(void);
47    
48     extern int section_list_loader_reload(void);
49 sysadm 1.5
50     // Return on success : real page_id (>= 0)
51     // failure : error number (< 0)
52 sysadm 1.13 extern int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[],
53     int *p_article_count, int *p_page_count, int *p_ontop_start_offset);
54 sysadm 1.6
55 sysadm 1.9 // Input direction = 0 : locate p_article_cur
56     // -1 : p_article_cur->p_topic_prior
57     // 1 : p_article_cur->p_topic_next
58     // Return on success : found (1)
59     // : not found (0)
60     // failure : error number (< 0)
61 sysadm 1.12 extern int locate_article_in_section(SECTION_LIST *p_section, const ARTICLE *p_article_cur, int direction, int step,
62 sysadm 1.10 int *p_page_id, int *p_visible_offset, int *p_article_count);
63 sysadm 1.9
64 sysadm 1.14 extern int get_section_ex_menu_set(SECTION_LIST *p_section, MENU_SET *p_ex_menu_set);
65    
66 sysadm 1.6 #endif //_SECTION_LIST_LOADER_H_

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