diff --git a/common/xdg-app-portal-error.c b/common/xdg-app-portal-error.c index dfe89030..2df75d0c 100644 --- a/common/xdg-app-portal-error.c +++ b/common/xdg-app-portal-error.c @@ -40,7 +40,7 @@ xdg_app_error_quark (void) { static volatile gsize quark_volatile = 0; - g_dbus_error_register_error_domain ("xdg-app--error-quark", + g_dbus_error_register_error_domain ("xdg-app-portal-error-quark", &quark_volatile, xdg_app_error_entries, G_N_ELEMENTS (xdg_app_error_entries)); diff --git a/lib/Makefile.am.inc b/lib/Makefile.am.inc index 071fdcdf..ba255444 100644 --- a/lib/Makefile.am.inc +++ b/lib/Makefile.am.inc @@ -5,6 +5,7 @@ noinst_PROGRAMS += test-libxdg-app public_headers = \ lib/xdg-app.h \ lib/xdg-app-ref.h \ + lib/xdg-app-error.h \ lib/xdg-app-installed-ref.h \ lib/xdg-app-remote-ref.h \ lib/xdg-app-installation.h \ @@ -47,6 +48,7 @@ sources = \ lib/xdg-app-remote-ref.c \ lib/xdg-app-remote-private.h \ lib/xdg-app-remote.c \ + lib/xdg-app-error.c \ lib/xdg-app-installation.c \ $(NULL) diff --git a/lib/xdg-app-enum-types.c.template b/lib/xdg-app-enum-types.c.template index c9e79c0b..dac75643 100644 --- a/lib/xdg-app-enum-types.c.template +++ b/lib/xdg-app-enum-types.c.template @@ -1,7 +1,7 @@ /*** BEGIN file-header ***/ #include "config.h" #include -#include +#include #include #include diff --git a/lib/xdg-app-error.c b/lib/xdg-app-error.c new file mode 100644 index 00000000..f40664ab --- /dev/null +++ b/lib/xdg-app-error.c @@ -0,0 +1,28 @@ +/* xdg-app-error.c + * + * Copyright (C) 2015 Red Hat, Inc + * + * This file 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 of the + * License, or (at your option) any later version. + * + * This file 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 program. If not, see . + * + * Authors: + * Alexander Larsson + */ + +#include "config.h" + +#include "xdg-app-portal-error.h" + +#include + +G_DEFINE_QUARK (xdg-app-error-quark, g_io_error) diff --git a/lib/xdg-app-error.h b/lib/xdg-app-error.h new file mode 100644 index 00000000..0aebfb03 --- /dev/null +++ b/lib/xdg-app-error.h @@ -0,0 +1,43 @@ +/* xdg-app-error.c + * + * Copyright (C) 2015 Red Hat, Inc + * + * This file 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 of the + * License, or (at your option) any later version. + * + * This file 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 program. If not, see . + * + * Authors: + * Alexander Larsson + */ + +#ifndef XDG_APP_ERROR_H +#define XDG_APP_ERROR_H + +#include + +G_BEGIN_DECLS + +/** + * XdpErrorEnum: + */ +typedef enum { + XDG_APP_ERROR_ALREADY_INSTALLED, + XDG_APP_ERROR_NOT_INSTALLED, +} XdgAppError; + +#define XDG_APP_ERROR xdg_app_error_quark() + +GQuark xdg_app_error_quark (void); + +G_END_DECLS + +#endif /* XDG_APP_ERROR_H */ diff --git a/lib/xdg-app.h b/lib/xdg-app.h index c039617d..9546f202 100644 --- a/lib/xdg-app.h +++ b/lib/xdg-app.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include