| 3 |
* section_list_loader |
* section_list_loader |
| 4 |
* - load and query operations of section articles |
* - load and query operations of section articles |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifndef _SECTION_LIST_LOADER_H_ |
#ifndef _SECTION_LIST_LOADER_H_ |
| 11 |
|
|
| 12 |
#include "menu.h" |
#include "menu.h" |
| 13 |
#include "section_list.h" |
#include "section_list.h" |
| 14 |
#include <mysql/mysql.h> |
#include <mysql.h> |
| 15 |
|
|
| 16 |
#define ERR_UNKNOWN_SECTION -101 |
enum section_list_loader_constant_t |
| 17 |
#define LOAD_ARTICLE_COUNT_LIMIT 1000 |
{ |
| 18 |
|
ERR_UNKNOWN_SECTION = -101, |
| 19 |
|
LOAD_ARTICLE_COUNT_LIMIT = 1000, |
| 20 |
|
}; |
| 21 |
|
|
| 22 |
extern int section_list_loader_pid; |
extern int section_list_loader_pid; |
| 23 |
extern int last_article_op_log_mid; |
extern int last_article_op_log_mid; |
| 42 |
|
|
| 43 |
// Return on success : real page_id (>= 0) |
// Return on success : real page_id (>= 0) |
| 44 |
// failure : error number (< 0) |
// failure : error number (< 0) |
| 45 |
extern int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[], |
extern int query_section_articles(SECTION_LIST *p_section, int page_id, const ARTICLE *p_articles[], |
| 46 |
int *p_article_count, int *p_page_count, int *p_ontop_start_offset); |
int *p_article_count, int *p_page_count, int *p_ontop_start_offset); |
| 47 |
|
|
| 48 |
// Input direction = 0 : locate p_article_cur |
// Input direction = 0 : locate p_article_cur |