nmsg  0.9.0
email.pb-c.h
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/base/email.proto */
3 
4 #ifndef PROTOBUF_C_nmsg_2fbase_2femail_2eproto__INCLUDED
5 #define PROTOBUF_C_nmsg_2fbase_2femail_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
11 #if PROTOBUF_C_VERSION_NUMBER < 1000000
12 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13 #elif 1000001 < PROTOBUF_C_MIN_COMPILER_VERSION
14 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
15 #endif
16 
17 
18 typedef struct _Nmsg__Base__Email Nmsg__Base__Email;
19 
20 
21 /* --- enums --- */
22 
23 typedef enum _Nmsg__Base__EmailType {
24  NMSG__BASE__EMAIL_TYPE__unknown = 0,
25  NMSG__BASE__EMAIL_TYPE__spamtrap = 1,
26  NMSG__BASE__EMAIL_TYPE__rej_network = 2,
27  NMSG__BASE__EMAIL_TYPE__rej_content = 3,
28  NMSG__BASE__EMAIL_TYPE__rej_user = 4
29  PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NMSG__BASE__EMAIL_TYPE)
30 } Nmsg__Base__EmailType;
31 
32 /* --- messages --- */
33 
34 struct _Nmsg__Base__Email
35 {
36  ProtobufCMessage base;
37  protobuf_c_boolean has_type;
38  Nmsg__Base__EmailType type;
39  protobuf_c_boolean has_headers;
40  ProtobufCBinaryData headers;
41  protobuf_c_boolean has_srcip;
42  ProtobufCBinaryData srcip;
43  protobuf_c_boolean has_srchost;
44  ProtobufCBinaryData srchost;
45  protobuf_c_boolean has_helo;
46  ProtobufCBinaryData helo;
47  protobuf_c_boolean has_from;
48  ProtobufCBinaryData from;
49  size_t n_rcpt;
50  ProtobufCBinaryData *rcpt;
51  size_t n_bodyurl;
52  ProtobufCBinaryData *bodyurl;
53  protobuf_c_boolean has_body;
54  ProtobufCBinaryData body;
55 };
56 #define NMSG__BASE__EMAIL__INIT \
57  { PROTOBUF_C_MESSAGE_INIT (&nmsg__base__email__descriptor) \
58  , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,NULL, 0,NULL, 0,{0,NULL} }
59 
60 
61 /* Nmsg__Base__Email methods */
62 void nmsg__base__email__init
63  (Nmsg__Base__Email *message);
64 size_t nmsg__base__email__get_packed_size
65  (const Nmsg__Base__Email *message);
66 size_t nmsg__base__email__pack
67  (const Nmsg__Base__Email *message,
68  uint8_t *out);
69 size_t nmsg__base__email__pack_to_buffer
70  (const Nmsg__Base__Email *message,
71  ProtobufCBuffer *buffer);
72 Nmsg__Base__Email *
73  nmsg__base__email__unpack
74  (ProtobufCAllocator *allocator,
75  size_t len,
76  const uint8_t *data);
77 void nmsg__base__email__free_unpacked
78  (Nmsg__Base__Email *message,
79  ProtobufCAllocator *allocator);
80 /* --- per-message closures --- */
81 
82 typedef void (*Nmsg__Base__Email_Closure)
83  (const Nmsg__Base__Email *message,
84  void *closure_data);
85 
86 /* --- services --- */
87 
88 
89 /* --- descriptors --- */
90 
91 extern const ProtobufCEnumDescriptor nmsg__base__email_type__descriptor;
92 extern const ProtobufCMessageDescriptor nmsg__base__email__descriptor;
93 
94 PROTOBUF_C__END_DECLS
95 
96 
97 #endif /* PROTOBUF_C_nmsg_2fbase_2femail_2eproto__INCLUDED */