| 1 |
/***************************************************************************
|
| 2 |
article_cache.h - description
|
| 3 |
-------------------
|
| 4 |
Copyright : (C) 2004-2025 by Leaflet
|
| 5 |
Email : leaflet@leafok.com
|
| 6 |
***************************************************************************/
|
| 7 |
|
| 8 |
/***************************************************************************
|
| 9 |
* *
|
| 10 |
* This program is free software; you can redistribute it and/or modify *
|
| 11 |
* it under the terms of the GNU General Public License as published by *
|
| 12 |
* the Free Software Foundation; either version 3 of the License, or *
|
| 13 |
* (at your option) any later version. *
|
| 14 |
* *
|
| 15 |
***************************************************************************/
|
| 16 |
|
| 17 |
#ifndef _ARTICLE_CACHE_H_
|
| 18 |
#define _ARTICLE_CACHE_H_
|
| 19 |
|
| 20 |
#include "common.h"
|
| 21 |
#include "str_process.h"
|
| 22 |
#include "section_list.h"
|
| 23 |
|
| 24 |
struct article_cache_t
|
| 25 |
{
|
| 26 |
char *p_data;
|
| 27 |
size_t data_len;
|
| 28 |
long line_total;
|
| 29 |
long line_offsets[MAX_SPLIT_FILE_LINES];
|
| 30 |
};
|
| 31 |
typedef struct article_cache_t ARTICLE_CACHE;
|
| 32 |
|
| 33 |
extern int article_cache_generate(const char *cache_dir, const ARTICLE *p_article, const SECTION_LIST *p_section, const char *content, int overwrite);
|
| 34 |
|
| 35 |
extern int article_cache_load(ARTICLE_CACHE *p_cache, const char *cache_dir, const ARTICLE *p_article);
|
| 36 |
extern int article_cache_unload(ARTICLE_CACHE *p_cache);
|
| 37 |
|
| 38 |
#endif //_ARTICLE_CACHE_H_
|