summaryrefslogtreecommitdiff
path: root/common/flatpak-table-printer.h
blob: b19f5aa66ce31d42ce2c30002b3833e6d6ff7a73 (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
/*
 * Copyright © 2014 Red Hat, Inc
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Alexander Larsson <alexl@redhat.com>
 */

#ifndef __FLATPAK_TABLE_PRINTER_H__
#define __FLATPAK_TABLE_PRINTER_H__

#include <gio/gio.h>

typedef struct FlatpakTablePrinter FlatpakTablePrinter;

FlatpakTablePrinter *flatpak_table_printer_new               (void);
void                flatpak_table_printer_free               (FlatpakTablePrinter *printer);
void                flatpak_table_printer_set_column_title   (FlatpakTablePrinter *printer,
                                                              int                  column,
                                                              const char          *title);
void                flatpak_table_printer_add_column         (FlatpakTablePrinter *printer,
                                                              const char          *text);
void                flatpak_table_printer_add_aligned_column (FlatpakTablePrinter *printer,
                                                              const char          *text,
                                                              int                  align);
void                flatpak_table_printer_add_decimal_column (FlatpakTablePrinter *printer,
                                                              const char          *text);
void                flatpak_table_printer_add_column_len     (FlatpakTablePrinter *printer,
                                                              const char          *text,
                                                              gsize                len);
void                flatpak_table_printer_append_with_comma  (FlatpakTablePrinter *printer,
                                                              const char          *text);
void                flatpak_table_printer_finish_row         (FlatpakTablePrinter *printer);
void                flatpak_table_printer_print              (FlatpakTablePrinter *printer);

#endif /* __FLATPAK_TABLE_PRINTER_H__ */