LCOV - code coverage report
Current view: top level - data/include/storage - data_database_listener.inl (source / functions) Hit Total Coverage
Test: crystal-facet-uml_v1.57.0_covts Lines: 14 14 100.0 %
Date: 2024-04-07 11:14:42 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /* File: data_database_listener.inl; Copyright and License: see below */
       2             : 
       3             : #include "u8/u8_trace.h"
       4             : #include <assert.h>
       5             : 
       6         221 : static inline void data_database_listener_init ( data_database_listener_t *this_,
       7             :                                                  void *listener_instance,
       8             :                                                  void (*listener_callback)(void* listener_instance, data_database_listener_signal_t signal_id) )
       9             : {
      10         221 :     (*this_).listener_instance = listener_instance;
      11         221 :     (*this_).listener_callback = listener_callback;
      12         221 : }
      13             : 
      14          23 : static inline void data_database_listener_destroy ( data_database_listener_t *this_ )
      15             : {
      16          23 :     (*this_).listener_instance = NULL;
      17          23 :     (*this_).listener_callback = NULL;
      18          23 : }
      19             : 
      20          40 : static inline void data_database_listener_notify ( data_database_listener_t *this_, data_database_listener_signal_t signal_id )
      21             : {
      22          40 :     assert( (*this_).listener_instance != NULL );
      23          40 :     assert( (*this_).listener_callback != NULL );
      24          40 :     U8_TRACE_INFO("data_database_listener_notify()");
      25          40 :     ((*this_).listener_callback)( (*this_).listener_instance, signal_id );
      26          40 : }
      27             : 
      28             : 
      29             : /*
      30             : Copyright 2016-2024 Andreas Warnke
      31             : 
      32             : Licensed under the Apache License, Version 2.0 (the "License");
      33             : you may not use this file except in compliance with the License.
      34             : You may obtain a copy of the License at
      35             : 
      36             :     http://www.apache.org/licenses/LICENSE-2.0
      37             : 
      38             : Unless required by applicable law or agreed to in writing, software
      39             : distributed under the License is distributed on an "AS IS" BASIS,
      40             : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      41             : See the License for the specific language governing permissions and
      42             : limitations under the License.
      43             : */

Generated by: LCOV version 1.16