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.42.0_alltests Lines: 12 12 100.0 %
Date: 2022-10-01 11:23:42 Functions: 0 0 -

          Line data    Source code
       1             : /* File: data_database_listener.inl; Copyright and License: see below */
       2             : 
       3             : #include "trace/trace.h"
       4             : #include <assert.h>
       5             : 
       6         244 : 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         244 :     (*this_).listener_instance = listener_instance;
      11         244 :     (*this_).listener_callback = listener_callback;
      12             : }
      13             : 
      14          44 : static inline void data_database_listener_destroy ( data_database_listener_t *this_ )
      15             : {
      16          44 :     (*this_).listener_instance = NULL;
      17          42 :     (*this_).listener_callback = NULL;
      18             : }
      19             : 
      20          62 : static inline void data_database_listener_notify ( data_database_listener_t *this_, data_database_listener_signal_t signal_id )
      21             : {
      22          62 :     assert( (*this_).listener_instance != NULL );
      23          62 :     assert( (*this_).listener_callback != NULL );
      24          62 :     TRACE_INFO("data_database_listener_notify()");
      25          62 :     ((*this_).listener_callback)( (*this_).listener_instance, signal_id );
      26          62 : }
      27             : 
      28             : 
      29             : /*
      30             : Copyright 2016-2022 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.14