LCOV - code coverage report
Current view: top level - src/libvalent/clipboard - valent-clipboard-adapter.h (source / functions) Coverage Total Hit
Test: Code Coverage Lines: 100.0 % 1 1
Test Date: 2024-04-23 06:02:46 Functions: 100.0 % 1 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 50.0 % 6 3

             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-extension.h"
      11                 :             : 
      12                 :             : G_BEGIN_DECLS
      13                 :             : 
      14                 :             : #define VALENT_TYPE_CLIPBOARD_ADAPTER (valent_clipboard_adapter_get_type())
      15                 :             : 
      16                 :             : VALENT_AVAILABLE_IN_1_0
      17   [ +  -  +  -  :         281 : G_DECLARE_DERIVABLE_TYPE (ValentClipboardAdapter, valent_clipboard_adapter, VALENT, CLIPBOARD_ADAPTER, ValentExtension)
                   +  - ]
      18                 :             : 
      19                 :             : struct _ValentClipboardAdapterClass
      20                 :             : {
      21                 :             :   ValentExtensionClass   parent_class;
      22                 :             : 
      23                 :             :   /* virtual functions */
      24                 :             :   GStrv                  (*get_mimetypes)      (ValentClipboardAdapter  *adapter);
      25                 :             :   int64_t                (*get_timestamp)      (ValentClipboardAdapter  *adapter);
      26                 :             :   void                   (*read_bytes)         (ValentClipboardAdapter  *adapter,
      27                 :             :                                                 const char              *mimetype,
      28                 :             :                                                 GCancellable            *cancellable,
      29                 :             :                                                 GAsyncReadyCallback      callback,
      30                 :             :                                                 gpointer                 user_data);
      31                 :             :   GBytes               * (*read_bytes_finish)  (ValentClipboardAdapter  *adapter,
      32                 :             :                                                 GAsyncResult            *result,
      33                 :             :                                                 GError                 **error);
      34                 :             :   void                   (*write_bytes)        (ValentClipboardAdapter  *adapter,
      35                 :             :                                                 const char              *mimetype,
      36                 :             :                                                 GBytes                  *bytes,
      37                 :             :                                                 GCancellable            *cancellable,
      38                 :             :                                                 GAsyncReadyCallback      callback,
      39                 :             :                                                 gpointer                 user_data);
      40                 :             :   gboolean               (*write_bytes_finish) (ValentClipboardAdapter  *adapter,
      41                 :             :                                                 GAsyncResult            *result,
      42                 :             :                                                 GError                 **error);
      43                 :             : 
      44                 :             :   /* signals */
      45                 :             :   void                   (*changed)            (ValentClipboardAdapter  *adapter);
      46                 :             : 
      47                 :             :   /*< private >*/
      48                 :             :   gpointer               padding[8];
      49                 :             : };
      50                 :             : 
      51                 :             : VALENT_AVAILABLE_IN_1_0
      52                 :             : void       valent_clipboard_adapter_changed            (ValentClipboardAdapter  *adapter);
      53                 :             : VALENT_AVAILABLE_IN_1_0
      54                 :             : GStrv      valent_clipboard_adapter_get_mimetypes      (ValentClipboardAdapter  *adapter);
      55                 :             : VALENT_AVAILABLE_IN_1_0
      56                 :             : int64_t    valent_clipboard_adapter_get_timestamp      (ValentClipboardAdapter  *adapter);
      57                 :             : VALENT_AVAILABLE_IN_1_0
      58                 :             : void       valent_clipboard_adapter_read_bytes         (ValentClipboardAdapter  *adapter,
      59                 :             :                                                         const char              *mimetype,
      60                 :             :                                                         GCancellable            *cancellable,
      61                 :             :                                                         GAsyncReadyCallback      callback,
      62                 :             :                                                         gpointer                 user_data);
      63                 :             : VALENT_AVAILABLE_IN_1_0
      64                 :             : GBytes   * valent_clipboard_adapter_read_bytes_finish  (ValentClipboardAdapter  *adapter,
      65                 :             :                                                         GAsyncResult            *result,
      66                 :             :                                                         GError                 **error);
      67                 :             : VALENT_AVAILABLE_IN_1_0
      68                 :             : void       valent_clipboard_adapter_write_bytes        (ValentClipboardAdapter  *adapter,
      69                 :             :                                                         const char              *mimetype,
      70                 :             :                                                         GBytes                  *bytes,
      71                 :             :                                                         GCancellable            *cancellable,
      72                 :             :                                                         GAsyncReadyCallback      callback,
      73                 :             :                                                         gpointer                 user_data);
      74                 :             : VALENT_AVAILABLE_IN_1_0
      75                 :             : gboolean   valent_clipboard_adapter_write_bytes_finish (ValentClipboardAdapter  *adapter,
      76                 :             :                                                         GAsyncResult            *result,
      77                 :             :                                                         GError                 **error);
      78                 :             : 
      79                 :             : G_END_DECLS
      80                 :             : 
        

Generated by: LCOV version 2.0-1