Rename project from eos-parental-controls to malcontent
Rename the library from libeos-parental-controls to libmalcontent, and the client from eos-parental-controls-client to malcontent-client. This was done using the following mechanical edits, and no other changes: ``` git search-replace -f EPC///MCT git search-replace -f Epc///Mct git search-replace -f epc///mct git search-replace -f eos_parental_controls///malcontent git search-replace -f eos-parental-controls///malcontent git search-replace -f EosParentalControls///Malcontent git search-replace -f 'eos\\-parental\\-controls///malcontent' git search-replace -f 'Since: 0.1.0///Since: 0.2.0' ``` Note that the accounts-service extension interface has *not* been renamed, as that would revert people’s parental controls settings in existing deployments. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
c9889a3ce7
commit
03436eacf5
15 changed files with 630 additions and 630 deletions
138
libmalcontent/tests/accounts-service-iface.h
Normal file
138
libmalcontent/tests/accounts-service-iface.h
Normal file
|
@ -0,0 +1,138 @@
|
|||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
|
||||
*
|
||||
* Copyright © 2018 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>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Static definition of the AppFilter interface on org.freedesktop.Accounts.
|
||||
* FIXME: Once we can depend on a new enough version of GLib, generate this
|
||||
* from introspection XML using `gdbus-codegen --interface-info-{header,body}`. */
|
||||
static const GDBusPropertyInfo app_filter_property_app_filter =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "AppFilter",
|
||||
.signature = (gchar *) "(bas)",
|
||||
.flags = G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusPropertyInfo app_filter_property_oars_filter =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "OarsFilter",
|
||||
.signature = (gchar *) "(sa{ss})",
|
||||
.flags = G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusPropertyInfo app_filter_property_allow_user_installation =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "AllowUserInstallation",
|
||||
.signature = (gchar *) "b",
|
||||
.flags = G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusPropertyInfo app_filter_property_allow_system_installation =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "AllowSystemInstallation",
|
||||
.signature = (gchar *) "b",
|
||||
.flags = G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusPropertyInfo *app_filter_properties[] =
|
||||
{
|
||||
(GDBusPropertyInfo *) &app_filter_property_app_filter,
|
||||
(GDBusPropertyInfo *) &app_filter_property_oars_filter,
|
||||
(GDBusPropertyInfo *) &app_filter_property_allow_user_installation,
|
||||
(GDBusPropertyInfo *) &app_filter_property_allow_system_installation,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const GDBusInterfaceInfo app_filter_interface_info =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "com.endlessm.ParentalControls.AppFilter",
|
||||
.methods = NULL,
|
||||
.signals = NULL,
|
||||
.properties = (GDBusPropertyInfo **) &app_filter_properties,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusArgInfo accounts_method_find_user_by_id_arg_user_id =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "UserId",
|
||||
.signature = (gchar *) "x",
|
||||
.annotations = NULL,
|
||||
};
|
||||
static const GDBusArgInfo accounts_method_find_user_by_id_arg_object_path =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "ObjectPath",
|
||||
.signature = (gchar *) "o",
|
||||
.annotations = NULL,
|
||||
};
|
||||
static const GDBusArgInfo *accounts_method_find_user_by_id_in_args[] =
|
||||
{
|
||||
(GDBusArgInfo *) &accounts_method_find_user_by_id_arg_user_id,
|
||||
NULL,
|
||||
};
|
||||
static const GDBusArgInfo *accounts_method_find_user_by_id_out_args[] =
|
||||
{
|
||||
(GDBusArgInfo *) &accounts_method_find_user_by_id_arg_object_path,
|
||||
NULL,
|
||||
};
|
||||
static const GDBusMethodInfo accounts_method_find_user_by_id =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "FindUserById",
|
||||
.in_args = (GDBusArgInfo **) &accounts_method_find_user_by_id_in_args,
|
||||
.out_args = (GDBusArgInfo **) &accounts_method_find_user_by_id_out_args,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
static const GDBusMethodInfo *accounts_methods[] =
|
||||
{
|
||||
(GDBusMethodInfo *) &accounts_method_find_user_by_id,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const GDBusInterfaceInfo accounts_interface_info =
|
||||
{
|
||||
.ref_count = -1, /* static */
|
||||
.name = (gchar *) "org.freedesktop.Accounts",
|
||||
.methods = (GDBusMethodInfo **) &accounts_methods,
|
||||
.signals = NULL,
|
||||
.properties = NULL,
|
||||
.annotations = NULL,
|
||||
};
|
||||
|
||||
G_END_DECLS
|
1329
libmalcontent/tests/app-filter.c
Normal file
1329
libmalcontent/tests/app-filter.c
Normal file
File diff suppressed because it is too large
Load diff
52
libmalcontent/tests/meson.build
Normal file
52
libmalcontent/tests/meson.build
Normal file
|
@ -0,0 +1,52 @@
|
|||
deps = [
|
||||
dependency('gio-2.0', version: '>= 2.44'),
|
||||
dependency('gio-unix-2.0', version: '>= 2.44'),
|
||||
dependency('glib-2.0', version: '>= 2.54.2'),
|
||||
dependency('gobject-2.0', version: '>= 2.44'),
|
||||
libmalcontent_dep,
|
||||
libglib_testing_dep,
|
||||
]
|
||||
|
||||
envs = test_env + [
|
||||
'G_TEST_SRCDIR=' + meson.current_source_dir(),
|
||||
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
|
||||
]
|
||||
|
||||
test_programs = [
|
||||
['app-filter', ['accounts-service-iface.h'], deps],
|
||||
]
|
||||
|
||||
installed_tests_metadir = join_paths(datadir, 'installed-tests',
|
||||
'libmalcontent-' + libmalcontent_api_version)
|
||||
installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
|
||||
'libmalcontent-' + libmalcontent_api_version)
|
||||
|
||||
foreach program: test_programs
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', program[0])
|
||||
|
||||
configure_file(
|
||||
input: test_template,
|
||||
output: program[0] + '.test',
|
||||
install: enable_installed_tests,
|
||||
install_dir: installed_tests_metadir,
|
||||
configuration: test_conf,
|
||||
)
|
||||
|
||||
exe = executable(
|
||||
program[0],
|
||||
[program[0] + '.c'] + program[1],
|
||||
dependencies: program[2],
|
||||
include_directories: root_inc,
|
||||
install: enable_installed_tests,
|
||||
install_dir: installed_tests_execdir,
|
||||
)
|
||||
|
||||
test(
|
||||
program[0],
|
||||
exe,
|
||||
env: envs,
|
||||
args: ['--tap'],
|
||||
)
|
||||
endforeach
|
Loading…
Add table
Add a link
Reference in a new issue