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

Contents of /lbbs/include/section_list_loader.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Thu May 29 00:52:09 2025 UTC (9 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.6: +7 -4 lines
Content type: text/x-chdr
Refine

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 #ifndef _SECTION_LIST_LOADER_H_
18 #define _SECTION_LIST_LOADER_H_
19
20 #include "section_list.h"
21 #include <mysql.h>
22
23 #define ERR_UNKNOWN_SECTION -101
24 #define LOAD_ARTICLE_COUNT_LIMIT 1000
25
26 extern int section_list_loader_pid;
27 extern int last_article_op_log_mid;
28
29 extern int load_section_config_from_db(void);
30
31 // Input global_lock = 0 : lock / unlock corresponding section per article
32 // 1 : lock / unlock all sections per invocation
33 // Return on success : count of appended articles (>= 0)
34 // failure : lock / unlock error (-1)
35 // : unknown section found (ERR_UNKNOWN_SECTION)
36 extern int append_articles_from_db(int32_t start_aid, int global_lock, int article_count_limit);
37
38 extern int set_last_article_op_log_from_db(void);
39
40 // Return on success : count of appended articles (>= 0)
41 // failure : lock / unlock error (-1)
42 // : unknown section found (ERR_UNKNOWN_SECTION)
43 extern int apply_article_op_log_from_db(int op_count_limit);
44
45 extern int section_list_loader_launch(void);
46
47 extern int section_list_loader_reload(void);
48
49 // Return on success : real page_id (>= 0)
50 // failure : error number (< 0)
51 extern int query_section_articles(SECTION_LIST *p_section, int32_t page_id, ARTICLE *p_articles[], int32_t *p_article_count);
52
53 #endif //_SECTION_LIST_LOADER_H_

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