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

           Branch data     Line data    Source code
       1                 :            : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
       2                 :            :  *
       3                 :            :  * Copyright © 2018, 2019 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 <gio/gio.h>
      26                 :            : #include <glib.h>
      27                 :            : #include <glib-object.h>
      28                 :            : 
      29                 :            : G_BEGIN_DECLS
      30                 :            : 
      31                 :            : /**
      32                 :            :  * MwscScheduleEntryError:
      33                 :            :  * @MWSC_SCHEDULE_ENTRY_ERROR_INVALIDATED: The schedule entry has disappeared
      34                 :            :  *    on the bus, due to the service disappearing or the entry being explicitly
      35                 :            :  *    removed.
      36                 :            :  * @MWSC_SCHEDULE_ENTRY_ERROR_UNKNOWN_ENTRY: The entry didn’t exist or this
      37                 :            :  *    process doesn’t have permission to access it.
      38                 :            :  *
      39                 :            :  * Errors which can be returned by #MwscScheduleEntry.
      40                 :            :  *
      41                 :            :  * Since: 0.1.0
      42                 :            :  */
      43                 :            : typedef enum
      44                 :            : {
      45                 :            :   MWSC_SCHEDULE_ENTRY_ERROR_INVALIDATED = 0,
      46                 :            :   MWSC_SCHEDULE_ENTRY_ERROR_UNKNOWN_ENTRY,
      47                 :            : } MwscScheduleEntryError;
      48                 :            : #define MWSC_SCHEDULE_ENTRY_N_ERRORS (MWSC_SCHEDULE_ENTRY_ERROR_INVALIDATED + 1)
      49                 :            : 
      50                 :            : GQuark mwsc_schedule_entry_error_quark (void);
      51                 :            : #define MWSC_SCHEDULE_ENTRY_ERROR mwsc_schedule_entry_error_quark ()
      52                 :            : 
      53                 :            : #define MWSC_TYPE_SCHEDULE_ENTRY mwsc_schedule_entry_get_type ()
      54   [ -  +  #  #  :         19 : G_DECLARE_FINAL_TYPE (MwscScheduleEntry, mwsc_schedule_entry, MWSC, SCHEDULE_ENTRY, GObject)
                   #  # ]
      55                 :            : 
      56                 :            : MwscScheduleEntry  *mwsc_schedule_entry_new_full         (GDBusConnection      *connection,
      57                 :            :                                                           const gchar          *name,
      58                 :            :                                                           const gchar          *object_path,
      59                 :            :                                                           GCancellable         *cancellable,
      60                 :            :                                                           GError              **error);
      61                 :            : void                mwsc_schedule_entry_new_full_async   (GDBusConnection      *connection,
      62                 :            :                                                           const gchar          *name,
      63                 :            :                                                           const gchar          *object_path,
      64                 :            :                                                           GCancellable         *cancellable,
      65                 :            :                                                           GAsyncReadyCallback   callback,
      66                 :            :                                                           gpointer              user_data);
      67                 :            : MwscScheduleEntry  *mwsc_schedule_entry_new_full_finish  (GAsyncResult         *result,
      68                 :            :                                                           GError              **error);
      69                 :            : 
      70                 :            : MwscScheduleEntry  *mwsc_schedule_entry_new_from_proxy   (GDBusProxy           *proxy,
      71                 :            :                                                           GError              **error);
      72                 :            : 
      73                 :            : const gchar        *mwsc_schedule_entry_get_id           (MwscScheduleEntry    *self);
      74                 :            : 
      75                 :            : gboolean            mwsc_schedule_entry_get_download_now (MwscScheduleEntry    *self);
      76                 :            : 
      77                 :            : guint32             mwsc_schedule_entry_get_priority     (MwscScheduleEntry    *self);
      78                 :            : void                mwsc_schedule_entry_set_priority     (MwscScheduleEntry    *self,
      79                 :            :                                                           guint32               priority);
      80                 :            : gboolean            mwsc_schedule_entry_get_resumable    (MwscScheduleEntry    *self);
      81                 :            : void                mwsc_schedule_entry_set_resumable    (MwscScheduleEntry    *self,
      82                 :            :                                                           gboolean              resumable);
      83                 :            : 
      84                 :            : gboolean mwsc_schedule_entry_send_properties        (MwscScheduleEntry    *self,
      85                 :            :                                                      GCancellable         *cancellable,
      86                 :            :                                                      GError              **error);
      87                 :            : void     mwsc_schedule_entry_send_properties_async  (MwscScheduleEntry    *self,
      88                 :            :                                                      GCancellable         *cancellable,
      89                 :            :                                                      GAsyncReadyCallback   callback,
      90                 :            :                                                      gpointer              user_data);
      91                 :            : gboolean mwsc_schedule_entry_send_properties_finish (MwscScheduleEntry    *self,
      92                 :            :                                                      GAsyncResult         *result,
      93                 :            :                                                      GError              **error);
      94                 :            : 
      95                 :            : gboolean mwsc_schedule_entry_remove        (MwscScheduleEntry    *self,
      96                 :            :                                             GCancellable         *cancellable,
      97                 :            :                                             GError              **error);
      98                 :            : void     mwsc_schedule_entry_remove_async  (MwscScheduleEntry    *self,
      99                 :            :                                             GCancellable         *cancellable,
     100                 :            :                                             GAsyncReadyCallback   callback,
     101                 :            :                                             gpointer              user_data);
     102                 :            : gboolean mwsc_schedule_entry_remove_finish (MwscScheduleEntry    *entry,
     103                 :            :                                             GAsyncResult         *result,
     104                 :            :                                             GError              **error);
     105                 :            : 
     106                 :            : G_END_DECLS

Generated by: LCOV version 1.16