<commit_before>/*
 * 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.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:
 *       <NAME> <<EMAIL>>
 */

#if !defined(__FLATPAK_H_INSIDE__) && !defined(FLATPAK_COMPILATION)
#error "Only <flatpak.h> can be included directly."
#endif

#ifndef __FLATPAK_INSTALLATION_H__
#define __FLATPAK_INSTALLATION_H__

typedef struct _FlatpakInstallation FlatpakInstallation;

#include <gio/gio.h>
#include <flatpak-installed-ref.h>
#include <flatpak-instance.h>
#include <flatpak-remote.h>

#define FLATPAK_TYPE_INSTALLATION flatpak_installation_get_type ()
#define FLATPAK_INSTALLATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLATPAK_TYPE_INSTALLATION, FlatpakInstallation))
#define FLATPAK_IS_INSTALLATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLATPAK_TYPE_INSTALLATION))

FLATPAK_EXTERN GType flatpak_installation_get_type (void);

struct _FlatpakInstallation
{
  GObject parent;
};

typedef struct
{
  GObjectClass parent_class;
} FlatpakInstallationClass;

/**
 * FlatpakUpdateFlags:
 * @FLATPAK_UPDATE_FLAGS_NONE: Fetch remote builds and install the latest one (default)
 * @FLATPAK_UPDATE_FLAGS_NO_DEPLOY: Don't install any new builds that might be fetched
 * @FLATPAK_UPDATE_FLAGS_NO_PULL: Don't try to fetch new builds from the remote repo
 * @FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS: Don't use static deltas when pulling
 * @FLATPAK_UPDATE_FLAGS_NO_PRUNE: Don't prune the local OSTree repository after updating (Since: 0.11.8)
 * @FLATPAK_UPDATE_FLAGS_NO_TRIGGERS: Don't call triggers after updating. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported files. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_update().
 */
typedef enum {
  FLATPAK_UPDATE_FLAGS_NONE             = 0,
  FLATPAK_UPDATE_FLAGS_NO_DEPLOY        = (1 << 0),
  FLATPAK_UPDATE_FLAGS_NO_PULL          = (1 << 1),
  FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS = (1 << 2),
  FLATPAK_UPDATE_FLAGS_NO_PRUNE         = (1 << 3),
  FLATPAK_UPDATE_FLAGS_NO_TRIGGERS      = (1 << 4),
} FlatpakUpdateFlags;

/**
 * FlatpakInstallFlags:
 * @FLATPAK_INSTALL_FLAGS_NONE: Default
 * @FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS: Don't use static deltas when pulling
 * @FLATPAK_INSTALL_FLAGS_NO_DEPLOY: Don't install any new builds that might be fetched
 * @FLATPAK_INSTALL_FLAGS_NO_PULL: Don't try to fetch new builds from the remote repo
 * @FLATPAK_INSTALL_FLAGS_NO_TRIGGERS: Don't call triggers after installing. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported files. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_install_full().
 */
typedef enum {
  FLATPAK_INSTALL_FLAGS_NONE             = 0,
  FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS = (1 << 0),
  FLATPAK_INSTALL_FLAGS_NO_DEPLOY        = (1 << 2),
  FLATPAK_INSTALL_FLAGS_NO_PULL          = (1 << 3),
  FLATPAK_INSTALL_FLAGS_NO_TRIGGERS      = (1 << 4),
} FlatpakInstallFlags;

/**
 * FlatpakUninstallFlags:
 * @FLATPAK_UNINSTALL_FLAGS_NONE: Default
 * @FLATPAK_UNINSTALL_FLAGS_NO_PRUNE: Don't prune the local OSTree repository after uninstalling
 * @FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS: Don't call triggers after uninstalling. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported file. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_uninstall_full().
 *
 * Since: 0.11.8
 */
typedef enum {
  FLATPAK_UNINSTALL_FLAGS_NONE            = 0,
  FLATPAK_UNINSTALL_FLAGS_NO_PRUNE        = (1 << 0),
  FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS     = (1 << 1),
} FlatpakUninstallFlags;

/**
 * FlatpakLaunchFlags:
 * @FLATPAK_LAUNCH_FLAGS_NONE: Default
 * @FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP: Do not reap the child. Use this if you want to wait
 * for the child with g_child_watch_add(). (Snce: 1.1)
 *
 * Flags to alter the behavior of flatpak_installation_launch_full().
 */
typedef enum {
  FLATPAK_LAUNCH_FLAGS_NONE        = 0,
  FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP = (1 << 0),
} FlatpakLaunchFlags;

/**
 * FlatpakQueryFlags:
 * @FLATPAK_QUERY_FLAGS_NONE: Default
 * @FLATPAK_QUERY_FLAGS_ONLY_CACHED: Don't do any network i/o, but only return cached data.
 * This can return stale data, or a #FLATPAK_ERROR_NOT_CACHED error, however it is a
 * lot more efficient if you're doing many requests.
 * @FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED: Only list refs available from any eventuall sideload repos. (Snce: 1.7)
 *
 * Flags to alter the behavior of e.g flatpak_installation_list_remote_refs_sync_full().
 *
 * Since: 1.3.3
 */
typedef enum {
  FLATPAK_QUERY_FLAGS_NONE        = 0,
  FLATPAK_QUERY_FLAGS_ONLY_CACHED = (1 << 0),
  FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED = (1 << 1),
} FlatpakQueryFlags;

/**
 * FlatpakStorageType:
 * @FLATPAK_STORAGE_TYPE_DEFAULT: default
 * @FLATPAK_STORAGE_TYPE_HARD_DISK: installation is on a hard disk
 * @FLATPAK_STORAGE_TYPE_SDCARD: installation is on a SD card
 * @FLATPAK_STORAGE_TYPE_MMC: installation is on an MMC
 * @FLATPAK_STORAGE_TYPE_NETWORK: installation is on the network
 *
 * Information about the storage of an installation.<commit_msg>common: Fix docs for FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED<commit_after>/*
 * 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.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:
 *       <NAME> <<EMAIL>>
 */

#if !defined(__FLATPAK_H_INSIDE__) && !defined(FLATPAK_COMPILATION)
#error "Only <flatpak.h> can be included directly."
#endif

#ifndef __FLATPAK_INSTALLATION_H__
#define __FLATPAK_INSTALLATION_H__

typedef struct _FlatpakInstallation FlatpakInstallation;

#include <gio/gio.h>
#include <flatpak-installed-ref.h>
#include <flatpak-instance.h>
#include <flatpak-remote.h>

#define FLATPAK_TYPE_INSTALLATION flatpak_installation_get_type ()
#define FLATPAK_INSTALLATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLATPAK_TYPE_INSTALLATION, FlatpakInstallation))
#define FLATPAK_IS_INSTALLATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLATPAK_TYPE_INSTALLATION))

FLATPAK_EXTERN GType flatpak_installation_get_type (void);

struct _FlatpakInstallation
{
  GObject parent;
};

typedef struct
{
  GObjectClass parent_class;
} FlatpakInstallationClass;

/**
 * FlatpakUpdateFlags:
 * @FLATPAK_UPDATE_FLAGS_NONE: Fetch remote builds and install the latest one (default)
 * @FLATPAK_UPDATE_FLAGS_NO_DEPLOY: Don't install any new builds that might be fetched
 * @FLATPAK_UPDATE_FLAGS_NO_PULL: Don't try to fetch new builds from the remote repo
 * @FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS: Don't use static deltas when pulling
 * @FLATPAK_UPDATE_FLAGS_NO_PRUNE: Don't prune the local OSTree repository after updating (Since: 0.11.8)
 * @FLATPAK_UPDATE_FLAGS_NO_TRIGGERS: Don't call triggers after updating. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported files. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_update().
 */
typedef enum {
  FLATPAK_UPDATE_FLAGS_NONE             = 0,
  FLATPAK_UPDATE_FLAGS_NO_DEPLOY        = (1 << 0),
  FLATPAK_UPDATE_FLAGS_NO_PULL          = (1 << 1),
  FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS = (1 << 2),
  FLATPAK_UPDATE_FLAGS_NO_PRUNE         = (1 << 3),
  FLATPAK_UPDATE_FLAGS_NO_TRIGGERS      = (1 << 4),
} FlatpakUpdateFlags;

/**
 * FlatpakInstallFlags:
 * @FLATPAK_INSTALL_FLAGS_NONE: Default
 * @FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS: Don't use static deltas when pulling
 * @FLATPAK_INSTALL_FLAGS_NO_DEPLOY: Don't install any new builds that might be fetched
 * @FLATPAK_INSTALL_FLAGS_NO_PULL: Don't try to fetch new builds from the remote repo
 * @FLATPAK_INSTALL_FLAGS_NO_TRIGGERS: Don't call triggers after installing. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported files. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_install_full().
 */
typedef enum {
  FLATPAK_INSTALL_FLAGS_NONE             = 0,
  FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS = (1 << 0),
  FLATPAK_INSTALL_FLAGS_NO_DEPLOY        = (1 << 2),
  FLATPAK_INSTALL_FLAGS_NO_PULL          = (1 << 3),
  FLATPAK_INSTALL_FLAGS_NO_TRIGGERS      = (1 << 4),
} FlatpakInstallFlags;

/**
 * FlatpakUninstallFlags:
 * @FLATPAK_UNINSTALL_FLAGS_NONE: Default
 * @FLATPAK_UNINSTALL_FLAGS_NO_PRUNE: Don't prune the local OSTree repository after uninstalling
 * @FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS: Don't call triggers after uninstalling. If used,
 * the caller must later call flatpak_installation_run_triggers() to update
 * the exported file. (Since: 1.0.3)
 *
 * Flags to alter the behavior of flatpak_installation_uninstall_full().
 *
 * Since: 0.11.8
 */
typedef enum {
  FLATPAK_UNINSTALL_FLAGS_NONE            = 0,
  FLATPAK_UNINSTALL_FLAGS_NO_PRUNE        = (1 << 0),
  FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS     = (1 << 1),
} FlatpakUninstallFlags;

/**
 * FlatpakLaunchFlags:
 * @FLATPAK_LAUNCH_FLAGS_NONE: Default
 * @FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP: Do not reap the child. Use this if you want to wait
 * for the child with g_child_watch_add(). (Snce: 1.1)
 *
 * Flags to alter the behavior of flatpak_installation_launch_full().
 */
typedef enum {
  FLATPAK_LAUNCH_FLAGS_NONE        = 0,
  FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP = (1 << 0),
} FlatpakLaunchFlags;

/**
 * FlatpakQueryFlags:
 * @FLATPAK_QUERY_FLAGS_NONE: Default
 * @FLATPAK_QUERY_FLAGS_ONLY_CACHED: Don't do any network i/o, but only return cached data.
 * This can return stale data, or a #FLATPAK_ERROR_NOT_CACHED error, however it is a
 * lot more efficient if you're doing many requests.
 * @FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED: Only list refs available from sideload
 * repos; see flatpak(1). (Snce: 1.7)
 *
 * Flags to alter the behavior of e.g flatpak_installation_list_remote_refs_sync_full().
 *
 * Since: 1.3.3
 */
typedef enum {
  FLATPAK_QUERY_FLAGS_NONE        = 0,
  FLATPAK_QUERY_FLAGS_ONLY_CACHED = (1 << 0),
  FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED = (1 << 1),
} FlatpakQueryFlags;

/**
 * FlatpakStorageType:
 * @FLATPAK_STORAGE_TYPE_DEFAULT: default
 * @FLATPAK_STORAGE_TYPE_HARD_DISK: installation is on a hard disk
 * @FLATPAK_STORAGE_TYPE_SDCARD: installation is on a SD card
 * @FLATPAK_STORAGE_TYPE_MMC: installation is on an MMC
 * @FLATPAK_STORAGE_TYPE_NETWORK: installation is on the network
 *
 * Information about the storage of an installation.
{'fraction_non_alphanumeric': 0.08205083866505274, 'fraction_numerical': 0.010980459968874286, 'mean_word_length': 4.833081190115986, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7434363', 'n_tokens_mistral': 4325, 'n_tokens_neox': 4095, 'n_words': 1073}