LCOV - code coverage report
Current view: top level - libmalcontent-timer - child-timer-service.h (source / functions) Coverage Total Hit
Test: 2 coverage DB files Lines: 100.0 % 1 1
Test Date: 2025-04-24 23:46:12 Functions: 100.0 % 2 2
Branches: 50.0 % 6 3

             Branch data     Line data    Source code
       1                 :             : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
       2                 :             :  *
       3                 :             :  * Copyright 2024 GNOME Foundation, Inc.
       4                 :             :  *
       5                 :             :  * SPDX-License-Identifier: LGPL-2.1-or-later
       6                 :             :  *
       7                 :             :  * This library is free software; you can redistribute it and/or
       8                 :             :  * modify it under the terms of the GNU Lesser General Public
       9                 :             :  * License as published by the Free Software Foundation; either
      10                 :             :  * version 2.1 of the License, or (at your option) any later version.
      11                 :             :  *
      12                 :             :  * This library is distributed in the hope that it will be useful,
      13                 :             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14                 :             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      15                 :             :  * Lesser General Public License for more details.
      16                 :             :  *
      17                 :             :  * You should have received a copy of the GNU Lesser General Public
      18                 :             :  * License along with this library; if not, write to the Free Software
      19                 :             :  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
      20                 :             :  *
      21                 :             :  * Authors:
      22                 :             :  *  - Philip Withnall <pwithnall@gnome.org>
      23                 :             :  */
      24                 :             : 
      25                 :             : #pragma once
      26                 :             : 
      27                 :             : #include <glib.h>
      28                 :             : #include <glib-object.h>
      29                 :             : #include <gio/gio.h>
      30                 :             : #include <libgsystemservice/peer-manager.h>
      31                 :             : #include <libmalcontent/manager.h>
      32                 :             : #include <libmalcontent-timer/timer-store.h>
      33                 :             : 
      34                 :             : G_BEGIN_DECLS
      35                 :             : 
      36                 :             : /**
      37                 :             :  * MctChildTimerServiceError:
      38                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_INVALID_RECORD: A submitted record was invalid.
      39                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_STORAGE_ERROR: The database is corrupt or there
      40                 :             :  *   was an I/O error when using it.
      41                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_BUSY: The database is already busy for this username.
      42                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_IDENTIFYING_USER: The calling user could not be
      43                 :             :  *   identified.
      44                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_QUERYING_POLICY: There was an error reading the
      45                 :             :  *   user’s parental controls policy from [class@Malcontent.Manager].
      46                 :             :  * @MCT_CHILD_TIMER_SERVICE_ERROR_DISABLED: Storing usage information is disabled for
      47                 :             :  *   all users.
      48                 :             :  *
      49                 :             :  * Errors which can be returned by [class@Malcontent.ChildTimerService].
      50                 :             :  *
      51                 :             :  * Since: 0.14.0
      52                 :             :  */
      53                 :             : typedef enum
      54                 :             : {
      55                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_INVALID_RECORD = 0,
      56                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_STORAGE_ERROR,
      57                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_BUSY,
      58                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_IDENTIFYING_USER,
      59                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_QUERYING_POLICY,
      60                 :             :   MCT_CHILD_TIMER_SERVICE_ERROR_DISABLED,
      61                 :             : } MctChildTimerServiceError;
      62                 :             : #define MCT_CHILD_TIMER_SERVICE_N_ERRORS (MCT_CHILD_TIMER_SERVICE_ERROR_DISABLED + 1)
      63                 :             : 
      64                 :             : GQuark mct_child_timer_service_error_quark (void);
      65                 :             : #define MCT_CHILD_TIMER_SERVICE_ERROR mct_child_timer_service_error_quark ()
      66                 :             : 
      67                 :             : #define MCT_TYPE_CHILD_TIMER_SERVICE mct_child_timer_service_get_type ()
      68   [ -  +  +  -  :          11 : G_DECLARE_FINAL_TYPE (MctChildTimerService, mct_child_timer_service, MCT,
                   +  - ]
      69                 :             :                       CHILD_TIMER_SERVICE, GObject)
      70                 :             : 
      71                 :             : MctChildTimerService *mct_child_timer_service_new (GDBusConnection *connection,
      72                 :             :                                                    const char      *object_path,
      73                 :             :                                                    MctTimerStore   *timer_store,
      74                 :             :                                                    GssPeerManager  *peer_manager,
      75                 :             :                                                    MctManager      *policy_manager);
      76                 :             : 
      77                 :             : gboolean mct_child_timer_service_register   (MctChildTimerService  *self,
      78                 :             :                                              GError               **error);
      79                 :             : void     mct_child_timer_service_unregister (MctChildTimerService  *self);
      80                 :             : 
      81                 :             : gboolean mct_child_timer_service_get_busy   (MctChildTimerService  *self);
      82                 :             : 
      83                 :             : G_END_DECLS
        

Generated by: LCOV version 2.0-1