| 17 |
#include "section_list.h" |
#include "section_list.h" |
| 18 |
#include <mysql.h> |
#include <mysql.h> |
| 19 |
|
|
| 20 |
extern int load_section_config_from_db(MYSQL *db); |
#define ERR_UNKNOWN_SECTION -101 |
| 21 |
|
|
| 22 |
|
extern int load_section_config_from_db(void); |
| 23 |
|
|
| 24 |
// Input global_lock = 0 : lock / unlock corresponding section per article |
// Input global_lock = 0 : lock / unlock corresponding section per article |
| 25 |
// 1 : lock / unlock all sections per invocation |
// 1 : lock / unlock all sections per invocation |
| 26 |
extern int append_articles_from_db(MYSQL *db, int32_t start_aid, int global_lock); |
// Return on success : last article aid (> 0) |
| 27 |
|
// : no article append (= 0) |
| 28 |
|
// failure : lock / unlock error (-1) |
| 29 |
|
// : unknown section found (ERR_UNKNOWN_SECTION) |
| 30 |
|
extern int append_articles_from_db(int32_t start_aid, int global_lock); |
| 31 |
|
|
| 32 |
// Return on success : real page_id (>= 0) |
// Return on success : real page_id (>= 0) |
| 33 |
// failure : error number (< 0) |
// failure : error number (< 0) |
| 34 |
extern int query_section_articles(SECTION_LIST *p_section, int32_t page_id, ARTICLE *p_articles[], int32_t *p_article_count); |
extern int query_section_articles(SECTION_LIST *p_section, int32_t page_id, ARTICLE *p_articles[], int32_t *p_article_count); |
| 35 |
|
|
| 36 |
|
extern int section_list_loader_launch(void); |
| 37 |
|
|
| 38 |
|
extern int section_list_loader_reload(void); |