Add semantic support for network installations

Closes: #1348
Approved by: alexlarsson
This commit is contained in:
Alexander Olofsson 2018-01-26 21:58:29 +01:00 committed by Atomic Bot
parent 32723a2b1d
commit 3585651be7
5 changed files with 10 additions and 1 deletions

View File

@ -380,6 +380,9 @@ parse_storage_type (const char *type_string)
g_autofree char *type_low = NULL;
type_low = g_ascii_strdown (type_string, -1);
if (g_strcmp0 (type_low, "network") == 0)
return FLATPAK_DIR_STORAGE_TYPE_NETWORK;
if (g_strcmp0 (type_low, "mmc") == 0)
return FLATPAK_DIR_STORAGE_TYPE_MMC;

View File

@ -135,6 +135,7 @@ typedef enum {
FLATPAK_DIR_STORAGE_TYPE_HARD_DISK,
FLATPAK_DIR_STORAGE_TYPE_SDCARD,
FLATPAK_DIR_STORAGE_TYPE_MMC,
FLATPAK_DIR_STORAGE_TYPE_NETWORK,
} FlatpakDirStorageType;
GQuark flatpak_dir_error_quark (void);

View File

@ -76,7 +76,7 @@
</varlistentry>
<varlistentry>
<term><option>StorageType</option> (string)</term>
<listitem><para>The type of storage used for this installation. Possible values include: mmc, sdcard, harddisk.</para></listitem>
<listitem><para>The type of storage used for this installation. Possible values include: network, mmc, sdcard, harddisk.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>

View File

@ -495,6 +495,9 @@ flatpak_installation_get_storage_type (FlatpakInstallation *self)
case FLATPAK_DIR_STORAGE_TYPE_MMC:
return FLATPAK_STORAGE_TYPE_MMC;
case FLATPAK_DIR_STORAGE_TYPE_NETWORK:
return FLATPAK_STORAGE_TYPE_NETWORK;
default:
return FLATPAK_STORAGE_TYPE_DEFAULT;
}

View File

@ -81,6 +81,7 @@ typedef enum {
* @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
*
* Flags to alter the behavior of flatpak_installation_install_full().
*
@ -91,6 +92,7 @@ typedef enum {
FLATPAK_STORAGE_TYPE_HARD_DISK,
FLATPAK_STORAGE_TYPE_SDCARD,
FLATPAK_STORAGE_TYPE_MMC,
FLATPAK_STORAGE_TYPE_NETWORK,
} FlatpakStorageType;