LCOV - code coverage report
Current view: top level - src/libvalent/messages - valent-messages-adapter.h (source / functions) Coverage Total Hit
Test: Code Coverage Lines: 100.0 % 1 1
Test Date: 2024-10-18 21:32:59 Functions: 0.0 % 1 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 16.7 % 12 2

             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 <gio/gio.h>
      11                 :             : 
      12                 :             : #include "../core/valent-extension.h"
      13                 :             : #include "valent-message.h"
      14                 :             : 
      15                 :             : G_BEGIN_DECLS
      16                 :             : 
      17                 :             : #define VALENT_TYPE_MESSAGES_ADAPTER (valent_messages_adapter_get_type())
      18                 :             : 
      19                 :             : VALENT_AVAILABLE_IN_1_0
      20   [ -  +  +  -  :           1 : G_DECLARE_DERIVABLE_TYPE (ValentMessagesAdapter, valent_messages_adapter, VALENT, MESSAGES_ADAPTER, ValentExtension)
          #  #  #  #  #  
                #  #  # ]
      21                 :             : 
      22                 :             : /**
      23                 :             :  * ValentMessagesAdapterClass:
      24                 :             :  * @export_adapter: the virtual function pointer for valent_messages_adapter_export_adapter()
      25                 :             :  * @unexport_adapter: the virtual function pointer for valent_messages_adapter_unexport_adapter()
      26                 :             :  *
      27                 :             :  * The virtual function table for `ValentMessagesAdapter`.
      28                 :             :  *
      29                 :             :  * Since: 1.0
      30                 :             :  */
      31                 :             : struct _ValentMessagesAdapterClass
      32                 :             : {
      33                 :             :   ValentExtensionClass  parent_class;
      34                 :             : 
      35                 :             :   void                  (*send_message)        (ValentMessagesAdapter  *adapter,
      36                 :             :                                                 ValentMessage          *message,
      37                 :             :                                                 GCancellable           *cancellable,
      38                 :             :                                                 GAsyncReadyCallback     callback,
      39                 :             :                                                 gpointer                user_data);
      40                 :             :   gboolean              (*send_message_finish) (ValentMessagesAdapter  *adapter,
      41                 :             :                                                 GAsyncResult           *result,
      42                 :             :                                                 GError                **error);
      43                 :             : 
      44                 :             :   /* virtual functions */
      45                 :             :   void                  (*export_adapter)      (ValentMessagesAdapter  *adapter,
      46                 :             :                                                 ValentMessagesAdapter  *object);
      47                 :             :   void                  (*unexport_adapter)    (ValentMessagesAdapter  *adapter,
      48                 :             :                                                 ValentMessagesAdapter  *object);
      49                 :             : 
      50                 :             :   /*< private >*/
      51                 :             :   gpointer              padding[8];
      52                 :             : };
      53                 :             : 
      54                 :             : VALENT_AVAILABLE_IN_1_0
      55                 :             : void       valent_messages_adapter_send_message        (ValentMessagesAdapter  *adapter,
      56                 :             :                                                         ValentMessage          *message,
      57                 :             :                                                         GCancellable           *cancellable,
      58                 :             :                                                         GAsyncReadyCallback     callback,
      59                 :             :                                                         gpointer                user_data);
      60                 :             : VALENT_AVAILABLE_IN_1_0
      61                 :             : gboolean   valent_messages_adapter_send_message_finish (ValentMessagesAdapter  *adapter,
      62                 :             :                                                         GAsyncResult           *result,
      63                 :             :                                                         GError                **error);
      64                 :             : VALENT_AVAILABLE_IN_1_0
      65                 :             : void       valent_messages_adapter_export_adapter      (ValentMessagesAdapter  *adapter,
      66                 :             :                                                         ValentMessagesAdapter  *object);
      67                 :             : VALENT_AVAILABLE_IN_1_0
      68                 :             : void       valent_messages_adapter_unexport_adapter    (ValentMessagesAdapter  *adapter,
      69                 :             :                                                         ValentMessagesAdapter  *object);
      70                 :             : 
      71                 :             : G_END_DECLS
      72                 :             : 
        

Generated by: LCOV version 2.0-1