1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * 3 * Copyright (C) 2013-2015 Richard Hughes <richard@hughsie.com> 4 * 5 * Licensed under the GNU Lesser General Public License Version 2.1 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 22 #ifndef __DNF_REPO_LOADER_H 23 #define __DNF_REPO_LOADER_H 24 25 #include <glib-object.h> 26 #include "hy-repo.h" 27 #include "hy-package.h" 28 29 #include "dnf-context.h" 30 #include "dnf-state.h" 31 #include "dnf-repo.h" 32 33 G_BEGIN_DECLS 34 35 #define DNF_TYPE_REPO_LOADER (dnf_repo_loader_get_type ()) 36 G_DECLARE_DERIVABLE_TYPE (DnfRepoLoader, dnf_repo_loader, DNF, REPO_LOADER, GObject) 37 38 struct _DnfRepoLoaderClass 39 { 40 GObjectClass parent_class; 41 void (* changed) (DnfRepoLoader *self); 42 /*< private >*/ 43 void (*_dnf_reserved1) (void); 44 void (*_dnf_reserved2) (void); 45 void (*_dnf_reserved3) (void); 46 void (*_dnf_reserved4) (void); 47 void (*_dnf_reserved5) (void); 48 void (*_dnf_reserved6) (void); 49 void (*_dnf_reserved7) (void); 50 void (*_dnf_reserved8) (void); 51 }; 52 53 DnfRepoLoader *dnf_repo_loader_new (DnfContext *context); 54 55 /* object methods */ 56 gboolean dnf_repo_loader_has_removable_repos (DnfRepoLoader *self); 57 GPtrArray *dnf_repo_loader_get_repos (DnfRepoLoader *self, 58 GError **error); 59 DnfRepo *dnf_repo_loader_get_repo_by_id (DnfRepoLoader *self, 60 const gchar *id, 61 GError **error); 62 63 G_END_DECLS 64 65 #endif /* __DNF_REPO_LOADER_H */ 66