LCOV - code coverage report
Current view: top level - src/libvalent/contacts - valent-contact-store.h (source / functions) Hit Total Coverage
Test: Code Coverage Lines: 1 1 100.0 %
Date: 2023-06-06 02:20:50 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 10 50.0 %

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: GPL-3.0-or-later
       2                 :            : // SPDX-FileCopyrightText: Andy Holmes <andrew.g.r.holmes@gmail.com>
       3                 :            : 
       4                 :            : #pragma once
       5                 :            : 
       6                 :            : #if !defined (VALENT_INSIDE) && !defined (VALENT_COMPILATION)
       7                 :            : # error "Only <valent.h> can be included directly."
       8                 :            : #endif
       9                 :            : 
      10                 :            : #include "../core/valent-component.h"
      11                 :            : #include "valent-eds.h"
      12                 :            : 
      13                 :            : G_BEGIN_DECLS
      14                 :            : 
      15                 :            : #define VALENT_TYPE_CONTACT_STORE (valent_contact_store_get_type())
      16                 :            : 
      17                 :            : VALENT_AVAILABLE_IN_1_0
      18   [ +  -  +  -  :        284 : G_DECLARE_DERIVABLE_TYPE (ValentContactStore, valent_contact_store, VALENT, CONTACT_STORE, ValentObject)
          +  -  +  -  +  
                      - ]
      19                 :            : 
      20                 :            : struct _ValentContactStoreClass
      21                 :            : {
      22                 :            :   ValentObjectClass   parent_class;
      23                 :            : 
      24                 :            :   /* virtual functions */
      25                 :            :   void                (*add_contacts)    (ValentContactStore   *store,
      26                 :            :                                           GSList               *contacts,
      27                 :            :                                           GCancellable         *cancellable,
      28                 :            :                                           GAsyncReadyCallback   callback,
      29                 :            :                                           gpointer              user_data);
      30                 :            :   void                (*remove_contacts) (ValentContactStore   *store,
      31                 :            :                                           GSList               *uids,
      32                 :            :                                           GCancellable         *cancellable,
      33                 :            :                                           GAsyncReadyCallback   callback,
      34                 :            :                                           gpointer              user_data);
      35                 :            :   void                (*query)           (ValentContactStore   *store,
      36                 :            :                                           const char           *query,
      37                 :            :                                           GCancellable         *cancellable,
      38                 :            :                                           GAsyncReadyCallback   callback,
      39                 :            :                                           gpointer              user_data);
      40                 :            :   void                (*get_contact)     (ValentContactStore   *store,
      41                 :            :                                           const char           *uid,
      42                 :            :                                           GCancellable         *cancellable,
      43                 :            :                                           GAsyncReadyCallback   callback,
      44                 :            :                                           gpointer              user_data);
      45                 :            : 
      46                 :            :   /* signals */
      47                 :            :   void                (*contact_added)   (ValentContactStore   *store,
      48                 :            :                                           EContact             *contact);
      49                 :            :   void                (*contact_removed) (ValentContactStore   *store,
      50                 :            :                                           const char           *uid);
      51                 :            : 
      52                 :            :   /*< private >*/
      53                 :            :   gpointer            padding[8];
      54                 :            : };
      55                 :            : 
      56                 :            : 
      57                 :            : VALENT_AVAILABLE_IN_1_0
      58                 :            : void         valent_contact_store_contact_added          (ValentContactStore   *store,
      59                 :            :                                                           EContact             *contact);
      60                 :            : VALENT_AVAILABLE_IN_1_0
      61                 :            : void         valent_contact_store_contact_removed        (ValentContactStore   *store,
      62                 :            :                                                           const char           *uid);
      63                 :            : VALENT_AVAILABLE_IN_1_0
      64                 :            : const char * valent_contact_store_get_name               (ValentContactStore   *store);
      65                 :            : VALENT_AVAILABLE_IN_1_0
      66                 :            : void         valent_contact_store_set_name               (ValentContactStore   *store,
      67                 :            :                                                           const char           *name);
      68                 :            : VALENT_AVAILABLE_IN_1_0
      69                 :            : ESource    * valent_contact_store_get_source             (ValentContactStore   *store);
      70                 :            : VALENT_AVAILABLE_IN_1_0
      71                 :            : const char * valent_contact_store_get_uid                (ValentContactStore   *store);
      72                 :            : 
      73                 :            : VALENT_AVAILABLE_IN_1_0
      74                 :            : void         valent_contact_store_add_contact            (ValentContactStore   *store,
      75                 :            :                                                           EContact             *contact,
      76                 :            :                                                           GCancellable         *cancellable,
      77                 :            :                                                           GAsyncReadyCallback   callback,
      78                 :            :                                                           gpointer              user_data);
      79                 :            : VALENT_AVAILABLE_IN_1_0
      80                 :            : void         valent_contact_store_add_contacts           (ValentContactStore   *store,
      81                 :            :                                                           GSList               *contacts,
      82                 :            :                                                           GCancellable         *cancellable,
      83                 :            :                                                           GAsyncReadyCallback   callback,
      84                 :            :                                                           gpointer              user_data);
      85                 :            : VALENT_AVAILABLE_IN_1_0
      86                 :            : gboolean     valent_contact_store_add_contacts_finish    (ValentContactStore   *store,
      87                 :            :                                                           GAsyncResult         *result,
      88                 :            :                                                           GError              **error);
      89                 :            : VALENT_AVAILABLE_IN_1_0
      90                 :            : void         valent_contact_store_remove_contact         (ValentContactStore   *store,
      91                 :            :                                                           const char           *uid,
      92                 :            :                                                           GCancellable         *cancellable,
      93                 :            :                                                           GAsyncReadyCallback   callback,
      94                 :            :                                                           gpointer              user_data);
      95                 :            : VALENT_AVAILABLE_IN_1_0
      96                 :            : void         valent_contact_store_remove_contacts        (ValentContactStore   *store,
      97                 :            :                                                           GSList               *uids,
      98                 :            :                                                           GCancellable         *cancellable,
      99                 :            :                                                           GAsyncReadyCallback   callback,
     100                 :            :                                                           gpointer              user_data);
     101                 :            : VALENT_AVAILABLE_IN_1_0
     102                 :            : gboolean     valent_contact_store_remove_contacts_finish (ValentContactStore   *store,
     103                 :            :                                                           GAsyncResult         *result,
     104                 :            :                                                           GError              **error);
     105                 :            : VALENT_AVAILABLE_IN_1_0
     106                 :            : void         valent_contact_store_get_contact            (ValentContactStore   *store,
     107                 :            :                                                           const char           *uid,
     108                 :            :                                                           GCancellable         *cancellable,
     109                 :            :                                                           GAsyncReadyCallback   callback,
     110                 :            :                                                           gpointer              user_data);
     111                 :            : VALENT_AVAILABLE_IN_1_0
     112                 :            : EContact   * valent_contact_store_get_contact_finish     (ValentContactStore   *store,
     113                 :            :                                                           GAsyncResult         *result,
     114                 :            :                                                           GError              **error);
     115                 :            : VALENT_AVAILABLE_IN_1_0
     116                 :            : void         valent_contact_store_get_contacts           (ValentContactStore   *store,
     117                 :            :                                                           char                **uids,
     118                 :            :                                                           GCancellable         *cancellable,
     119                 :            :                                                           GAsyncReadyCallback   callback,
     120                 :            :                                                           gpointer              user_data);
     121                 :            : VALENT_AVAILABLE_IN_1_0
     122                 :            : void         valent_contact_store_query                  (ValentContactStore   *store,
     123                 :            :                                                           const char           *query,
     124                 :            :                                                           GCancellable         *cancellable,
     125                 :            :                                                           GAsyncReadyCallback   callback,
     126                 :            :                                                           gpointer              user_data);
     127                 :            : VALENT_AVAILABLE_IN_1_0
     128                 :            : GSList     * valent_contact_store_query_finish           (ValentContactStore   *store,
     129                 :            :                                                           GAsyncResult         *result,
     130                 :            :                                                           GError              **error);
     131                 :            : 
     132                 :            : G_END_DECLS

Generated by: LCOV version 1.14