common: Move typedef to separate header to avoid circular deps

tingping/wmclass
Alexander Larsson 2015-12-07 12:26:44 +01:00
parent ad7310f246
commit b761aa05a7
5 changed files with 32 additions and 6 deletions

View File

@ -21,6 +21,7 @@ $(systemd_dbus_built_sources) : data/org.freedesktop.systemd1.xml
$(NULL)
libxdgapp_common_la_SOURCES = \
common/xdg-app-common-types.h \
common/xdg-app-dir.c \
common/xdg-app-dir.h \
common/xdg-app-run.c \

View File

@ -0,0 +1,28 @@
/*
* Copyright © 2015 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 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 __XDG_APP_COMMON_TYPES_H__
#define __XDG_APP_COMMON_TYPES_H__
typedef struct XdgAppDir XdgAppDir;
typedef struct XdgAppDeploy XdgAppDeploy;
typedef struct XdgAppContext XdgAppContext;
#endif /* __XDG_APP_COMMON_TYPES_H__ */

View File

@ -30,6 +30,7 @@
#include "xdg-app-dir.h"
#include "xdg-app-utils.h"
#include "xdg-app-run.h"
#include "errno.h"

View File

@ -23,10 +23,7 @@
#include <ostree.h>
#include <xdg-app-run.h>
typedef struct XdgAppDir XdgAppDir;
typedef struct XdgAppDeploy XdgAppDeploy;
#include <xdg-app-common-types.h>
#define XDG_APP_TYPE_DIR xdg_app_dir_get_type()
#define XDG_APP_DIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XDG_APP_TYPE_DIR, XdgAppDir))

View File

@ -23,11 +23,10 @@
#include "libglnx/libglnx.h"
#include "dbus-proxy/xdg-app-proxy.h"
#include "xdg-app-common-types.h"
void xdg_app_run_in_transient_unit (const char *app_id);
typedef struct XdgAppContext XdgAppContext;
#define XDG_APP_METADATA_GROUP_CONTEXT "Context"
#define XDG_APP_METADATA_GROUP_SESSION_BUS_POLICY "Session Bus Policy"
#define XDG_APP_METADATA_GROUP_ENVIRONMENT "Environment"