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

Diff of /lbbs/include/section_list_loader.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 by sysadm, Wed May 28 00:09:45 2025 UTC Revision 1.9 by sysadm, Sat May 31 08:54:03 2025 UTC
# Line 21  Line 21 
21  #include <mysql.h>  #include <mysql.h>
22    
23  #define ERR_UNKNOWN_SECTION -101  #define ERR_UNKNOWN_SECTION -101
24    #define LOAD_ARTICLE_COUNT_LIMIT 1000
25    
26  extern int section_list_loader_pid;  extern int section_list_loader_pid;
27  extern int last_article_op_log_mid;  extern int last_article_op_log_mid;
# Line 29  extern int load_section_config_from_db(v Line 30  extern int load_section_config_from_db(v
30    
31  // Input global_lock = 0 : lock / unlock corresponding section per article  // Input global_lock = 0 : lock / unlock corresponding section per article
32  //                     1 : lock / unlock all sections per invocation  //                     1 : lock / unlock all sections per invocation
33  // Return on success : last article aid (> 0)  // Return on success : count of appended articles (>= 0)
 //                   : no article append (= 0)  
34  //           failure : lock / unlock error (-1)  //           failure : lock / unlock error (-1)
35  //                   : unknown section found (ERR_UNKNOWN_SECTION)  //                   : unknown section found (ERR_UNKNOWN_SECTION)
36  extern int append_articles_from_db(int32_t start_aid, int global_lock);  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);  extern int set_last_article_op_log_from_db(void);
39    
40  extern int apply_article_op_log_from_db(void);  // 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);  extern int section_list_loader_launch(void);
46    
# Line 45  extern int section_list_loader_reload(vo Line 48  extern int section_list_loader_reload(vo
48    
49  // Return on success : real page_id (>= 0)  // Return on success : real page_id (>= 0)
50  //           failure : error number (< 0)  //           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);  extern int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[], int *p_article_count, int *p_page_count);
52    
53    // Input direction =  0 : locate p_article_cur
54    //                   -1 :        p_article_cur->p_topic_prior
55    //                    1 :        p_article_cur->p_topic_next
56    // Return on success : found (1)
57    //                   : not found (0)
58    //           failure : error number (< 0)
59    extern int locate_article_in_section(SECTION_LIST *p_section, const ARTICLE *p_article_cur, int direction,
60                                                                             int *p_page_id, int *p_offset, int *p_article_count);
61    
62  #endif //_SECTION_LIST_LOADER_H_  #endif //_SECTION_LIST_LOADER_H_


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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