milter 1.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/LICENSE +21 -0
- package/README.md +593 -118
- package/dist/constants.cjs +105 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +63 -0
- package/dist/constants.d.ts +63 -0
- package/dist/constants.js +73 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.cjs +976 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +187 -0
- package/dist/index.d.ts +187 -0
- package/dist/index.js +914 -0
- package/dist/index.js.map +1 -0
- package/package.json +116 -27
- package/res/maail-logo.svg +11 -0
- package/res/milterjs-logo.svg +79 -0
- package/.npmignore +0 -4
- package/binding.gyp +0 -13
- package/lib/milter.js +0 -1
- package/src/envelope.cc +0 -592
- package/src/envelope.h +0 -92
- package/src/events.cc +0 -426
- package/src/events.h +0 -303
- package/src/forward.h +0 -10
- package/src/milter.cc +0 -722
- package/src/milter.h +0 -76
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
|