summaryrefslogtreecommitdiff
path: root/src/gl-searchpopover.h
blob: a4d97e654d2e5879bac538e8ede182efd85f0e79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 *  GNOME Logs - View and search logs
 *  Copyright (C) 2016  Pranav Ganorkar <pranavg189@gmail.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.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GL_SEARCH_POPOVER_H_
#define GL_SEARCH_POPOVER_H_

#include <gtk/gtk.h>
#include "gl-journal-model.h"

G_BEGIN_DECLS

/* Rows in parameter treeview */
typedef enum
{
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_ALL_AVAILABLE_FIELDS,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_PID,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_UID,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_GID,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_MESSAGE,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_PROCESS_NAME,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_SYSTEMD_UNIT,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_KERNEL_DEVICE,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_AUDIT_SESSION,
    GL_SEARCH_POPOVER_JOURNAL_FIELD_FILTER_EXECUTABLE_PATH
} GlSearchPopoverJournalFieldFilter;

typedef enum
{
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_CURRENT_BOOT,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_PREVIOUS_BOOT,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_TODAY,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_YESTERDAY,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_LAST_3_DAYS,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_ENTIRE_JOURNAL,
    GL_SEARCH_POPOVER_JOURNAL_TIMESTAMP_RANGE_CUSTOM
} GlSearchPopoverJournalTimestampRange;

#define GL_TYPE_SEARCH_POPOVER (gl_search_popover_get_type ())
G_DECLARE_FINAL_TYPE (GlSearchPopover, gl_search_popover, GL, SEARCH_POPOVER, GtkPopover)

GtkWidget * gl_search_popover_new (void);
GlSearchPopoverJournalFieldFilter gl_search_popover_get_journal_search_field (GlSearchPopover *popover);
GlQuerySearchType gl_search_popover_get_query_search_type (GlSearchPopover *popover);
GlSearchPopoverJournalTimestampRange gl_search_popover_get_journal_timestamp_range (GlSearchPopover *popover);
void gl_search_popover_set_journal_timestamp_range_current_boot (GlSearchPopover *popover);
guint64 gl_search_popover_get_custom_start_timestamp (GlSearchPopover *popover);
guint64 gl_search_popover_get_custom_end_timestamp (GlSearchPopover *popover);

G_END_DECLS

#endif /* GL_SEARCH_POPOVER_H_ */