| 3 |
* article_favor |
* article_favor |
| 4 |
* - data model and basic operations of user favorite articles |
* - data model and basic operations of user favorite articles |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifndef _ARTICLE_FAVOR_H_ |
#ifndef _ARTICLE_FAVOR_H_ |
| 12 |
#include "section_list.h" |
#include "section_list.h" |
| 13 |
#include <stdint.h> |
#include <stdint.h> |
| 14 |
|
|
| 15 |
#define MAX_FAVOR_AID_BASE_CNT 10000 |
enum article_favor_constant_t |
| 16 |
#define MAX_FAVOR_AID_INC_CNT 1000 |
{ |
| 17 |
|
MAX_FAVOR_AID_BASE_CNT = 10000, |
| 18 |
|
MAX_FAVOR_AID_INC_CNT = 1000, |
| 19 |
|
}; |
| 20 |
|
|
| 21 |
struct article_favor_t |
struct article_favor_t |
| 22 |
{ |
{ |
| 44 |
// Set specific article as favorite |
// Set specific article as favorite |
| 45 |
extern int article_favor_set(int32_t aid, ARTICLE_FAVOR *p_favor, int state); |
extern int article_favor_set(int32_t aid, ARTICLE_FAVOR *p_favor, int state); |
| 46 |
|
|
| 47 |
extern int query_favor_articles(ARTICLE_FAVOR *p_favor, int page_id, ARTICLE **p_articles, |
extern int query_favor_articles(ARTICLE_FAVOR *p_favor, int page_id, const ARTICLE **p_articles, |
| 48 |
char p_snames[][BBS_section_name_max_len + 1], int *p_article_count, int *p_page_count); |
char p_snames[][BBS_section_name_max_len + 1], int *p_article_count, int *p_page_count); |
| 49 |
|
|
| 50 |
#endif //_ARTICLE_FAVOR_H_ |
#endif //_ARTICLE_FAVOR_H_ |