1 /* 2 * Copyright (C) 2016 Red Hat, Inc 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 * 17 * Authors: Martin Hatina <mhatina@redhat.com> 18 * Marek Kasik <mkasik@redhat.com> 19 */ 20 21 #pragma once 22 23 #include <glib-object.h> 24 #include <gio/gio.h> 25 26 #include "pp-utils.h" 27 28 G_BEGIN_DECLS 29 30 #define PP_TYPE_PRINTER (pp_printer_get_type ()) 31 G_DECLARE_FINAL_TYPE (PpPrinter, pp_printer, PP, PRINTER, GObject) 32 33 GType pp_printer_get_type (void) G_GNUC_CONST; 34 35 PpPrinter *pp_printer_new (const gchar *name); 36 37 const gchar *pp_printer_get_name (PpPrinter *printer); 38 39 void pp_printer_rename_async (PpPrinter *printer, 40 const gchar *new_printer_name, 41 GCancellable *cancellable, 42 GAsyncReadyCallback callback, 43 gpointer user_data); 44 45 gboolean pp_printer_rename_finish (PpPrinter *printer, 46 GAsyncResult *res, 47 GError **error); 48 49 void pp_printer_delete_async (PpPrinter *printer, 50 GCancellable *cancellable, 51 GAsyncReadyCallback callback, 52 gpointer user_data); 53 54 gboolean pp_printer_delete_finish (PpPrinter *printer, 55 GAsyncResult *res, 56 GError **error); 57 58 void pp_printer_get_jobs_async (PpPrinter *printer, 59 gboolean myjobs, 60 gint which_jobs, 61 GCancellable *cancellable, 62 GAsyncReadyCallback callback, 63 gpointer user_data); 64 65 GPtrArray *pp_printer_get_jobs_finish (PpPrinter *printer, 66 GAsyncResult *res, 67 GError **error); 68 69 void pp_printer_print_file_async (PpPrinter *printer, 70 const gchar *filename, 71 const gchar *job_name, 72 GCancellable *cancellable, 73 GAsyncReadyCallback callback, 74 gpointer user_data); 75 76 gboolean pp_printer_print_file_finish (PpPrinter *printer, 77 GAsyncResult *res, 78 GError **error); 79 80 G_END_DECLS 81