comparison man/irccd-api-hook.3 @ 1002:ec5461750efd

man: add Irccd.Rule and Irccd.Hook manual pages
author David Demelier <markand@malikania.fr>
date Sat, 13 Feb 2021 22:15:16 +0100
parents
children f06e9761cc90
comparison
equal deleted inserted replaced
1001:b01f5d65d62a 1002:ec5461750efd
1 .\"
2 .\" Copyright (c) 2013-2021 David Demelier <markand@malikania.fr>
3 .\"
4 .\" Permission to use, copy, modify, and/or distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd @IRCCD_MAN_DATE@
17 .Dt IRCCD-API-HOOK 3
18 .Os
19 .\" NAME
20 .Sh NAME
21 .Nm Irccd.Hook
22 .Nd irccd hook API
23 .\" SYNOPSIS
24 .Sh SYNOPSIS
25 .Fn Irccd.Hook.add "name, path"
26 .Fn Irccd.Hook.list
27 .Fn irccd.Hook.remove "name"
28 .\" DESCRIPTION
29 .Sh DESCRIPTION
30 Add, remove and list hooks.
31 .\" METHODS
32 .Sh METHODS
33 .\" Irccd.Hook.add
34 The
35 .Fn Irccd.Hook.add
36 method adds the rule specified by
37 .Fa path
38 with the identifier
39 .Fa name .
40 The API does not check the presence of the hook file and therefore can be used
41 before the hook actually exists on the filesystem.
42 .Pp
43 .\" Irccd.Hook.list
44 The
45 .Fn Irccd.Hook.list
46 method return an array of object for all hooks loaded. Each entry consists of
47 two properties:
48 .Fa name
49 and
50 .Fa path
51 which denotes the hook's name and its filesystem path respectively.
52 .Pp
53 .\" Irccd.Hook.remove
54 The
55 .Fn Irccd.Hook.remove
56 method removes the hook specified by
57 .Fa name .
58 .\" EXCEPTIONS
59 .Sh EXCEPTIONS
60 .Bl -tag -width Er
61 .It Bq Er Error
62 Thrown from
63 .Fn Irccd.Hook.add
64 if a hook with
65 .Fa name
66 already exists.
67 .El
68 .\" SEE ALSO
69 .Sh SEE ALSO
70 .Xr irccd-api 3