LCOV - code coverage report
Current view: top level - libmogwai-schedule - schedule-entry.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 3 3 100.0 %
Date: 2022-06-30 20:59:16 Functions: 5 5 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 6 10 60.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
       2                 :            :  *
       3                 :            :  * Copyright © 2017, 2018 Endless Mobile, Inc.
       4                 :            :  *
       5                 :            :  * This library is free software; you can redistribute it and/or
       6                 :            :  * modify it under the terms of the GNU Lesser General Public
       7                 :            :  * License as published by the Free Software Foundation; either
       8                 :            :  * version 2.1 of the License, or (at your option) any later version.
       9                 :            :  *
      10                 :            :  * This library is distributed in the hope that it will be useful,
      11                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      12                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13                 :            :  * Lesser General Public License for more details.
      14                 :            :  *
      15                 :            :  * You should have received a copy of the GNU Lesser General Public
      16                 :            :  * License along with this library; if not, write to the Free Software
      17                 :            :  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
      18                 :            :  *
      19                 :            :  * Authors:
      20                 :            :  *  - Philip Withnall <withnall@endlessm.com>
      21                 :            :  */
      22                 :            : 
      23                 :            : #pragma once
      24                 :            : 
      25                 :            : #include <glib.h>
      26                 :            : #include <glib-object.h>
      27                 :            : 
      28                 :            : G_BEGIN_DECLS
      29                 :            : 
      30                 :            : /**
      31                 :            :  * mws_schedule_entry_id_is_valid:
      32                 :            :  * @entry_id: a potentially valid entry ID
      33                 :            :  *
      34                 :            :  * Validate @entry_id to check it’s not a disallowed ID.
      35                 :            :  *
      36                 :            :  * Returns: %TRUE if @entry_id is valid, %FALSE otherwise
      37                 :            :  * Since: 0.1.0
      38                 :            :  */
      39                 :            : static inline gboolean
      40                 :         26 : mws_schedule_entry_id_is_valid (const gchar *entry_id)
      41                 :            : {
      42   [ +  -  +  - ]:         26 :   return (entry_id != NULL && *entry_id != '\0');
      43                 :            : }
      44                 :            : 
      45                 :            : #define MWS_TYPE_SCHEDULE_ENTRY mws_schedule_entry_get_type ()
      46   [ +  +  +  -  :       1773 : G_DECLARE_FINAL_TYPE (MwsScheduleEntry, mws_schedule_entry, MWS, SCHEDULE_ENTRY, GObject)
                   +  - ]
      47                 :            : 
      48                 :            : MwsScheduleEntry   *mws_schedule_entry_new              (const gchar       *owner);
      49                 :            : MwsScheduleEntry   *mws_schedule_entry_new_from_variant (const gchar       *owner,
      50                 :            :                                                          GVariant          *parameters,
      51                 :            :                                                          GError           **error);
      52                 :            : 
      53                 :            : const gchar        *mws_schedule_entry_get_id           (MwsScheduleEntry  *self);
      54                 :            : const gchar        *mws_schedule_entry_get_owner        (MwsScheduleEntry  *self);
      55                 :            : 
      56                 :            : guint32             mws_schedule_entry_get_priority     (MwsScheduleEntry  *self);
      57                 :            : void                mws_schedule_entry_set_priority     (MwsScheduleEntry  *self,
      58                 :            :                                                          guint32            priority);
      59                 :            : gboolean            mws_schedule_entry_get_resumable    (MwsScheduleEntry  *self);
      60                 :            : void                mws_schedule_entry_set_resumable    (MwsScheduleEntry  *self,
      61                 :            :                                                          gboolean           resumable);
      62                 :            : 
      63                 :            : G_END_DECLS

Generated by: LCOV version 1.16