1 /** 2 * @file 3 * Notmuch-specific Mailbox data 4 * 5 * @authors 6 * Copyright (C) 2021 Richard Russon <rich@flatcap.org> 7 * 8 * @copyright 9 * This program is free software: you can redistribute it and/or modify it under 10 * the terms of the GNU General Public License as published by the Free Software 11 * Foundation, either version 2 of the License, or (at your option) any later 12 * version. 13 * 14 * This program is distributed in the hope that it will be useful, but WITHOUT 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU General Public License along with 20 * this program. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 #ifndef MUTT_NOTMUCH_MDATA_H 24 #define MUTT_NOTMUCH_MDATA_H 25 26 #include "query.h" 27 28 struct Mailbox; 29 30 /** 31 * struct NmMboxData - Notmuch-specific Mailbox data - @extends Mailbox 32 */ 33 struct NmMboxData 34 { 35 struct Url *db_url; ///< Parsed view url of the Notmuch database 36 char *db_query; ///< Previous query 37 int db_limit; ///< Maximum number of results to return 38 enum NmQueryType query_type; ///< Messages or Threads 39 40 struct Progress *progress; ///< A progress bar 41 int oldmsgcount; 42 int ignmsgcount; ///< Ignored messages 43 }; 44 45 void nm_mdata_free(void **ptr); 46 struct NmMboxData * nm_mdata_get (struct Mailbox *m); 47 struct NmMboxData * nm_mdata_new (const char *url); 48 49 #endif /* MUTT_NOTMUCH_MDATA_H */ 50