source: trunk/libtransmission/watchdir-common.h

Last change on this file was 14724, checked in by jordan, 5 years ago

use '#pragma once' instead of #ifndef..#define..#endif guards

  • Property svn:keywords set to Date Rev Author Id
File size: 1.4 KB
Line 
1/*
2 * This file Copyright (C) 2015-2016 Mnemosyne LLC
3 *
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
6 *
7 * $Id: watchdir-common.h 14724 2016-03-29 16:37:21Z mikedld $
8 */
9
10#pragma once
11
12#ifndef __LIBTRANSMISSION_WATCHDIR_MODULE__
13 #error only the libtransmission watchdir module should #include this header.
14#endif
15
16struct tr_ptrArray;
17
18typedef struct tr_watchdir_backend
19{
20  void (* free_func) (struct tr_watchdir_backend *);
21}
22tr_watchdir_backend;
23
24#define BACKEND_DOWNCAST(b) ((tr_watchdir_backend *) (b))
25
26/* ... */
27
28tr_watchdir_backend * tr_watchdir_get_backend    (tr_watchdir_t        handle);
29
30struct event_base   * tr_watchdir_get_event_base (tr_watchdir_t        handle);
31
32/* ... */
33
34void                  tr_watchdir_process        (tr_watchdir_t        handle,
35                                                  const char         * name);
36
37void                  tr_watchdir_scan           (tr_watchdir_t        handle,
38                                                  struct tr_ptrArray * dir_entries);
39
40/* ... */
41
42tr_watchdir_backend * tr_watchdir_generic_new    (tr_watchdir_t        handle);
43
44#ifdef WITH_INOTIFY
45tr_watchdir_backend * tr_watchdir_inotify_new    (tr_watchdir_t        handle);
46#endif
47#ifdef WITH_KQUEUE
48tr_watchdir_backend * tr_watchdir_kqueue_new     (tr_watchdir_t        handle);
49#endif
50#ifdef _WIN32
51tr_watchdir_backend * tr_watchdir_win32_new      (tr_watchdir_t        handle);
52#endif
53
Note: See TracBrowser for help on using the repository browser.