milter 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/milter.h DELETED
@@ -1,76 +0,0 @@
1
- /**
2
- */
3
-
4
- #ifndef MILTER_H
5
- #define MILTER_H
6
-
7
- #include <node/uv.h>
8
- #include <node.h>
9
- #include <v8.h>
10
- #include "forward.h"
11
-
12
- using namespace node;
13
- using namespace v8;
14
-
15
-
16
- struct bindings
17
- {
18
- bindings ()
19
- : first(NULL), last(NULL)
20
- {
21
- // TODO: deal with error case
22
- pthread_mutex_init(&lck_queue, NULL);
23
- }
24
-
25
- ~bindings ()
26
- {
27
- // TODO: lock queue, clear it, unlock it
28
- // ensure no further events can be delivered
29
-
30
- pthread_mutex_destroy(&lck_queue);
31
- }
32
-
33
- uv_loop_t *loop;
34
- uv_work_t request;
35
- uv_async_t trigger;
36
-
37
- pthread_mutex_t lck_queue;
38
- MilterEvent *first, *last;
39
-
40
- struct
41
- {
42
- Persistent<Function> negotiate;
43
- Persistent<Function> connect;
44
- Persistent<Function> unknown;
45
- Persistent<Function> helo;
46
- Persistent<Function> envfrom;
47
- Persistent<Function> envrcpt;
48
- Persistent<Function> data;
49
- Persistent<Function> header;
50
- Persistent<Function> eoh;
51
- Persistent<Function> body;
52
- Persistent<Function> eom;
53
- Persistent<Function> abort;
54
- Persistent<Function> close;
55
- } fcall;
56
-
57
- int retval;
58
- };
59
-
60
-
61
- struct envelope
62
- {
63
- envelope (bindings_t *local)
64
- : local(local)
65
- { }
66
-
67
- bindings_t *local;
68
-
69
- /**
70
- * this is an ObjectWrap'd Envelope
71
- * it lives from connect to close
72
- */
73
- Persistent<Object> object;
74
- };
75
-
76
- #endif