--- lbbs/include/article_favor.h 2025/10/15 02:25:13 1.2 +++ lbbs/include/article_favor.h 2026/01/03 10:27:14 1.7 @@ -1,18 +1,10 @@ -/*************************************************************************** - article_favor.h - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * article_favor + * - data model and basic operations of user favorite articles + * + * Copyright (C) 2004-2026 Leaflet + */ #ifndef _ARTICLE_FAVOR_H_ #define _ARTICLE_FAVOR_H_ @@ -20,8 +12,11 @@ #include "section_list.h" #include -#define MAX_FAVOR_AID_BASE_CNT 10000 -#define MAX_FAVOR_AID_INC_CNT 1000 +enum article_favor_constant_t +{ + MAX_FAVOR_AID_BASE_CNT = 10000, + MAX_FAVOR_AID_INC_CNT = 1000, +}; struct article_favor_t { @@ -49,7 +44,7 @@ extern int article_favor_check(int32_t a // Set specific article as favorite extern int article_favor_set(int32_t aid, ARTICLE_FAVOR *p_favor, int state); -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, char p_snames[][BBS_section_name_max_len + 1], int *p_article_count, int *p_page_count); #endif //_ARTICLE_FAVOR_H_