Merge branch 'stable' into 'main'
[ladish.git] / daemon / recent_store.h
blob911a1014e3df7f3f2abeb641e89f02c92e27276d
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*
3 * LADI Session Handler (ladish)
5 * Copyright (C) 2010 Nedko Arnaudov <nedko@arnaudov.name>
7 **************************************************************************
8 * This file contains interface to recent items store
9 **************************************************************************
11 * LADI Session Handler is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * LADI Session Handler is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
23 * or write to the Free Software Foundation, Inc.,
24 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifndef RECENT_STORE_H__52816145_014A_4CDA_B713_D7F39AAB4E73__INCLUDED
28 #define RECENT_STORE_H__52816145_014A_4CDA_B713_D7F39AAB4E73__INCLUDED
30 #include "common.h"
32 typedef struct ladish_recent_store_tag { int unused; } * ladish_recent_store_handle;
34 bool
35 ladish_recent_store_create(
36 const char * file_path,
37 unsigned int max_items,
38 ladish_recent_store_handle * store_ptr);
40 void
41 ladish_recent_store_destroy(
42 ladish_recent_store_handle store);
44 void
45 ladish_recent_store_use_item(
46 ladish_recent_store_handle store,
47 const char * item);
49 bool
50 ladish_recent_store_check_known(
51 ladish_recent_store_handle store,
52 const char * item);
54 void
55 ladish_recent_store_iterate_items(
56 ladish_recent_store_handle store,
57 void * callback_context,
58 bool (* callback)(void * callback_context, const char * item));
60 #endif /* #ifndef RECENT_STORE_H__52816145_014A_4CDA_B713_D7F39AAB4E73__INCLUDED */