2019-04-24 13:44:50 +02:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
|
|
|
|
*
|
|
|
|
* Copyright © 2018, 2019 Endless Mobile, Inc.
|
|
|
|
*
|
|
|
|
* This library 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* - Philip Withnall <withnall@endlessm.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
#include <glib.h>
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include <libmalcontent/app-filter.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MctAppFilterListType:
|
2020-06-10 00:30:39 +02:00
|
|
|
* @MCT_APP_FILTER_LIST_BLOCKLIST: Any program in the list is not allowed to
|
2019-04-24 13:44:50 +02:00
|
|
|
* be run.
|
2020-06-10 00:30:39 +02:00
|
|
|
* @MCT_APP_FILTER_LIST_ALLOWLIST: Any program not in the list is not allowed
|
2019-04-24 13:44:50 +02:00
|
|
|
* to be run.
|
|
|
|
*
|
|
|
|
* Different semantics for interpreting an application list.
|
|
|
|
*
|
|
|
|
* Since: 0.2.0
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
2020-06-10 00:30:39 +02:00
|
|
|
MCT_APP_FILTER_LIST_BLOCKLIST,
|
|
|
|
MCT_APP_FILTER_LIST_ALLOWLIST,
|
2019-04-24 13:44:50 +02:00
|
|
|
} MctAppFilterListType;
|
|
|
|
|
|
|
|
struct _MctAppFilter
|
|
|
|
{
|
2023-12-20 12:02:43 +01:00
|
|
|
/*< private >*/
|
2019-04-24 13:44:50 +02:00
|
|
|
gint ref_count;
|
|
|
|
|
|
|
|
uid_t user_id;
|
|
|
|
|
2020-03-20 15:54:42 +01:00
|
|
|
gchar **app_list; /* (not nullable) (owned) (array zero-terminated=1) */
|
2019-04-24 13:44:50 +02:00
|
|
|
MctAppFilterListType app_list_type;
|
|
|
|
|
|
|
|
GVariant *oars_ratings; /* (type a{ss}) (owned non-floating) */
|
|
|
|
gboolean allow_user_installation;
|
|
|
|
gboolean allow_system_installation;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_END_DECLS
|