1 /* This file has been automatically generated by builder part of the ferite distribution */
2 /* file: unix_Unix_SyslogStream.c */
3 /* class: SyslogStream */
4
5 #include <ferite.h> /* we need this without a doubt */
6 #include "unix_header.h" /* this is the module header */
7
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_emerg_s)8 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_emerg_s )
9 {
10 FeriteString *s;
11 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
12 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
13
14 ferite_get_parameters( params, 1, &s );
15
16 { /* Main function body. */
17 #line 264 "syslog.fec"
18
19
20 SelfObj->filedata = (void *)LOG_EMERG;
21 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
22
23 }
24 FE_RETURN_VOID;
25 self = NULL;
26 super = NULL;
27 }
28
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_debug_s)29 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_debug_s )
30 {
31 FeriteString *s;
32 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
33 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
34
35 ferite_get_parameters( params, 1, &s );
36
37 { /* Main function body. */
38 #line 336 "syslog.fec"
39
40
41 SelfObj->filedata = (void *)LOG_DEBUG;
42 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
43
44 }
45 FE_RETURN_VOID;
46 self = NULL;
47 super = NULL;
48 }
49
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream___read___n)50 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream___read___n )
51 {
52 double count;
53 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
54 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
55
56 ferite_get_parameters( params, 1, &count );
57
58 { /* Main function body. */
59 #line 347 "syslog.fec"
60
61
62 ferite_error( script, 0, "The syslog is write only." );
63
64 }
65 FE_RETURN_VOID;
66 self = NULL;
67 super = NULL;
68 }
69
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream___close___)70 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream___close___ )
71 {
72 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
73 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
74
75 { /* Main function body. */
76 #line 352 "syslog.fec"
77
78
79 closelog();
80
81 }
82 FE_RETURN_VOID;
83 self = NULL;
84 super = NULL;
85 }
86
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_notice_s)87 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_notice_s )
88 {
89 FeriteString *s;
90 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
91 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
92
93 ferite_get_parameters( params, 1, &s );
94
95 { /* Main function body. */
96 #line 324 "syslog.fec"
97
98
99 SelfObj->filedata = (void *)LOG_NOTICE;
100 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
101
102 }
103 FE_RETURN_VOID;
104 self = NULL;
105 super = NULL;
106 }
107
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_error_s)108 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_error_s )
109 {
110 FeriteString *s;
111 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
112 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
113
114 ferite_get_parameters( params, 1, &s );
115
116 { /* Main function body. */
117 #line 300 "syslog.fec"
118
119
120 SelfObj->filedata = (void *)LOG_ERR;
121 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
122
123 }
124 FE_RETURN_VOID;
125 self = NULL;
126 super = NULL;
127 }
128
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_constructor_)129 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_constructor_ )
130 {
131 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
132 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
133
134 { /* Main function body. */
135 #line 234 "syslog.fec"
136
137
138 FeriteVariable *c = ferite_create_object_variable_with_data( script, "SyslogStream", self, FE_STATIC );
139
140 ferite_variable_destroy( script, ferite_object_call_super(script, c, NULL) );
141 ferite_variable_destroy( script, c );
142
143 SelfObj->filedata = (void *)LOG_NOTICE;
144 SelfObj->read = ferite_object_get_function(script, self, "__read__" );
145 SelfObj->write = ferite_object_get_function(script, self, "__write__" );
146
147 }
148 FE_RETURN_VOID;
149 self = NULL;
150 super = NULL;
151 }
152
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_warning_s)153 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_warning_s )
154 {
155 FeriteString *s;
156 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
157 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
158
159 ferite_get_parameters( params, 1, &s );
160
161 { /* Main function body. */
162 #line 312 "syslog.fec"
163
164
165 SelfObj->filedata = (void *)LOG_WARNING;
166 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
167
168 }
169 FE_RETURN_VOID;
170 self = NULL;
171 super = NULL;
172 }
173
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_alert_s)174 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_alert_s )
175 {
176 FeriteString *s;
177 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
178 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
179
180 ferite_get_parameters( params, 1, &s );
181
182 { /* Main function body. */
183 #line 276 "syslog.fec"
184
185
186 SelfObj->filedata = (void *)LOG_ALERT;
187 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
188
189 }
190 FE_RETURN_VOID;
191 self = NULL;
192 super = NULL;
193 }
194
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_info_s)195 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_info_s )
196 {
197 FeriteString *s;
198 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
199 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
200
201 ferite_get_parameters( params, 1, &s );
202
203 { /* Main function body. */
204 #line 252 "syslog.fec"
205
206
207 SelfObj->filedata = (void *)LOG_INFO;
208 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
209
210 }
211 FE_RETURN_VOID;
212 self = NULL;
213 super = NULL;
214 }
215
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream___write___s)216 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream___write___s )
217 {
218 FeriteString *s;
219 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
220 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
221
222 ferite_get_parameters( params, 1, &s );
223
224 { /* Main function body. */
225 #line 342 "syslog.fec"
226
227
228 syslog((int)SelfObj->filedata, "%s", s->data);
229
230 }
231 FE_RETURN_VOID;
232 self = NULL;
233 super = NULL;
234 }
235
FE_NATIVE_FUNCTION(ferite_unix_Unix_SyslogStream_critical_s)236 FE_NATIVE_FUNCTION( ferite_unix_Unix_SyslogStream_critical_s )
237 {
238 FeriteString *s;
239 FeriteObject *self = FE_CONTAINER_TO_OBJECT;
240 FeriteObject *super = FE_CONTAINER_TO_OBJECT;
241
242 ferite_get_parameters( params, 1, &s );
243
244 { /* Main function body. */
245 #line 288 "syslog.fec"
246
247
248 SelfObj->filedata = (void *)LOG_CRIT;
249 FE_RETURN_VAR(ferite_call_function(script, self, NULL, SelfObj->write, params));
250
251 }
252 FE_RETURN_VOID;
253 self = NULL;
254 super = NULL;
255 }
256
257