Coverage Report

Created: 2025-12-04 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/curl/lib/multi_ntfy.h
Line
Count
Source
1
#ifndef HEADER_CURL_MULTI_NTFY_H
2
#define HEADER_CURL_MULTI_NTFY_H
3
/***************************************************************************
4
 *                                  _   _ ____  _
5
 *  Project                     ___| | | |  _ \| |
6
 *                             / __| | | | |_) | |
7
 *                            | (__| |_| |  _ <| |___
8
 *                             \___|\___/|_| \_\_____|
9
 *
10
 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11
 *
12
 * This software is licensed as described in the file COPYING, which
13
 * you should have received as part of this distribution. The terms
14
 * are also available at https://curl.se/docs/copyright.html.
15
 *
16
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17
 * copies of the Software, and permit persons to whom the Software is
18
 * furnished to do so, under the terms of the COPYING file.
19
 *
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
 * KIND, either express or implied.
22
 *
23
 * SPDX-License-Identifier: curl
24
 *
25
 ***************************************************************************/
26
27
#include "uint-bset.h"
28
29
struct Curl_easy;
30
struct Curl_multi;
31
32
struct curl_multi_ntfy {
33
  curl_notify_callback ntfy_cb;
34
  void *ntfy_cb_data;
35
  struct uint32_bset enabled;
36
  CURLMcode failure;
37
  struct mntfy_chunk *head;
38
  struct mntfy_chunk *tail;
39
};
40
41
void Curl_mntfy_init(struct Curl_multi *multi);
42
CURLMcode Curl_mntfy_resize(struct Curl_multi *multi);
43
void Curl_mntfy_cleanup(struct Curl_multi *multi);
44
45
CURLMcode Curl_mntfy_enable(struct Curl_multi *multi, unsigned int type);
46
CURLMcode Curl_mntfy_disable(struct Curl_multi *multi, unsigned int type);
47
48
void Curl_mntfy_add(struct Curl_easy *data, unsigned int type);
49
50
#define CURLM_NTFY(d, t)                              \
51
0
  do {                                                \
52
0
    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
53
0
      Curl_mntfy_add((d), (t));                       \
54
0
  } while(0)
55
56
CURLMcode Curl_mntfy_dispatch_all(struct Curl_multi *multi);
57
58
#endif /* HEADER_CURL_MULTI_NTFY_H */