rubyfb 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Manifest +0 -1
- data/Rakefile +1 -1
- data/ext/AddUser.c +217 -248
- data/ext/AddUser.h +3 -3
- data/ext/Backup.c +337 -404
- data/ext/Backup.h +3 -3
- data/ext/Blob.c +197 -248
- data/ext/Blob.h +30 -31
- data/ext/Common.c +17 -18
- data/ext/Common.h +10 -10
- data/ext/Connection.c +413 -487
- data/ext/Connection.h +18 -19
- data/ext/DataArea.c +172 -189
- data/ext/DataArea.h +11 -11
- data/ext/Database.c +198 -238
- data/ext/Database.h +16 -17
- data/ext/FireRuby.c +118 -142
- data/ext/FireRuby.h +17 -17
- data/ext/FireRubyException.c +68 -138
- data/ext/FireRubyException.h +14 -21
- data/ext/Generator.c +296 -377
- data/ext/Generator.h +17 -18
- data/ext/RemoveUser.c +91 -102
- data/ext/RemoveUser.h +3 -3
- data/ext/Restore.c +353 -423
- data/ext/Restore.h +3 -3
- data/ext/ResultSet.c +423 -456
- data/ext/ResultSet.h +26 -27
- data/ext/Row.c +505 -568
- data/ext/Row.h +27 -28
- data/ext/ServiceManager.c +143 -164
- data/ext/ServiceManager.h +17 -18
- data/ext/Services.c +58 -67
- data/ext/Services.h +3 -3
- data/ext/Statement.c +388 -449
- data/ext/Statement.h +30 -31
- data/ext/Transaction.c +374 -448
- data/ext/Transaction.h +17 -18
- data/ext/TypeMap.c +654 -774
- data/ext/TypeMap.h +17 -17
- data/ext/rfbint.h +3 -3
- data/lib/active_record/connection_adapters/rubyfb_adapter.rb +1 -1
- data/lib/rubyfb_lib.so +0 -0
- data/lib/src.rb +33 -0
- data/rubyfb.gemspec +3 -3
- data/test/ResultSetTest.rb +13 -0
- data/test/RowTest.rb +16 -0
- metadata +4 -5
- data/test/UnitTest.rb +0 -65
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
v0.5.6 ==
|
2
|
+
Fix rubyforge issue #28870 - by simplifying the Exception class ;)
|
3
|
+
Fix rubyforge issue #28860 - rubyfb_adapter.rb and local files as proposed by Leonid Myravjev (asm)
|
4
|
+
Merge pilcrow-scale branch - introduce column_scale() methods in ResultSet/Row classes thanks to Mike Pomraning (pilcrow)
|
5
|
+
Drop old unit test suite
|
6
|
+
|
1
7
|
v0.5.5 ==
|
2
8
|
Ruby 1.9 compatibility
|
3
9
|
Initial Rails 3 support
|
data/Manifest
CHANGED
data/Rakefile
CHANGED
data/ext/AddUser.c
CHANGED
@@ -59,64 +59,57 @@ VALUE cAddUser;
|
|
59
59
|
* @return A reference to the newly initialized AddUser object.
|
60
60
|
*
|
61
61
|
*/
|
62
|
-
VALUE initializeAddUser(int argc, VALUE *argv, VALUE self)
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
{
|
85
|
-
middle = rb_funcall(argv[3], rb_intern("to_s"), 0);
|
86
|
-
if(argc > 4)
|
87
|
-
{
|
88
|
-
last = rb_funcall(argv[4], rb_intern("to_s"), 0);
|
89
|
-
}
|
62
|
+
VALUE initializeAddUser(int argc, VALUE *argv, VALUE self) {
|
63
|
+
VALUE username = Qnil,
|
64
|
+
password = Qnil,
|
65
|
+
first = Qnil,
|
66
|
+
middle = Qnil,
|
67
|
+
last = Qnil,
|
68
|
+
value = Qnil;
|
69
|
+
int length = 0;
|
70
|
+
|
71
|
+
/* Check that sufficient parameters have been supplied. */
|
72
|
+
if(argc < 2) {
|
73
|
+
rb_raise(rb_eArgError, "Wrong number of arguments (%d for %d).", argc, 2);
|
74
|
+
}
|
75
|
+
|
76
|
+
username = rb_funcall(argv[0], rb_intern("to_s"), 0);
|
77
|
+
password = rb_funcall(argv[1], rb_intern("to_s"), 0);
|
78
|
+
if(argc > 2) {
|
79
|
+
first= rb_funcall(argv[2], rb_intern("to_s"), 0);
|
80
|
+
if(argc > 3) {
|
81
|
+
middle = rb_funcall(argv[3], rb_intern("to_s"), 0);
|
82
|
+
if(argc > 4) {
|
83
|
+
last = rb_funcall(argv[4], rb_intern("to_s"), 0);
|
90
84
|
}
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
return(self);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
/* Check that the parameters are valid. */
|
89
|
+
value = rb_funcall(username, rb_intern("length"), 0);
|
90
|
+
length = TYPE(value) == T_FIXNUM ? FIX2INT(value) : NUM2INT(value);
|
91
|
+
if(length < 1 || length > 31) {
|
92
|
+
rb_fireruby_raise(NULL,
|
93
|
+
"Invalid user name specified. A user name must not be " \
|
94
|
+
"blank and may have no more than 31 characters.");
|
95
|
+
}
|
96
|
+
|
97
|
+
value = rb_funcall(password, rb_intern("length"), 0);
|
98
|
+
length = TYPE(value) == T_FIXNUM ? FIX2INT(value) : NUM2INT(value);
|
99
|
+
if(length < 1 || length > 31) {
|
100
|
+
rb_fireruby_raise(NULL,
|
101
|
+
"Invalid password specified. A user password must not " \
|
102
|
+
"be blank and may have no more than 31 characters.");
|
103
|
+
}
|
104
|
+
|
105
|
+
/* Assign class values. */
|
106
|
+
rb_iv_set(self, "@user_name", username);
|
107
|
+
rb_iv_set(self, "@password", password);
|
108
|
+
rb_iv_set(self, "@first_name", first);
|
109
|
+
rb_iv_set(self, "@middle_name", middle);
|
110
|
+
rb_iv_set(self, "@last_name", last);
|
111
|
+
|
112
|
+
return(self);
|
120
113
|
}
|
121
114
|
|
122
115
|
|
@@ -129,9 +122,8 @@ VALUE initializeAddUser(int argc, VALUE *argv, VALUE self)
|
|
129
122
|
* @return A reference to the attribute value for the object.
|
130
123
|
*
|
131
124
|
*/
|
132
|
-
VALUE getUserName(VALUE self)
|
133
|
-
|
134
|
-
return(rb_iv_get(self, "@user_name"));
|
125
|
+
VALUE getUserName(VALUE self) {
|
126
|
+
return(rb_iv_get(self, "@user_name"));
|
135
127
|
}
|
136
128
|
|
137
129
|
|
@@ -144,22 +136,20 @@ VALUE getUserName(VALUE self)
|
|
144
136
|
* @return A reference to the newly update AddUser object.
|
145
137
|
*
|
146
138
|
*/
|
147
|
-
VALUE setUserName(VALUE self, VALUE setting)
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
return(self);
|
139
|
+
VALUE setUserName(VALUE self, VALUE setting) {
|
140
|
+
VALUE actual = rb_funcall(setting, rb_intern("to_s"), 0),
|
141
|
+
value = rb_funcall(actual, rb_intern("length"), 0);
|
142
|
+
int length = 0;
|
143
|
+
|
144
|
+
length = TYPE(value) == T_FIXNUM ? FIX2INT(value) : NUM2INT(value);
|
145
|
+
if(length < 1 || length > 31) {
|
146
|
+
rb_fireruby_raise(NULL,
|
147
|
+
"Invalid user name specified. A user name must not be " \
|
148
|
+
"blank and may have no more than 31 characters.");
|
149
|
+
}
|
150
|
+
rb_iv_set(self, "@user_name", actual);
|
151
|
+
|
152
|
+
return(self);
|
163
153
|
}
|
164
154
|
|
165
155
|
|
@@ -172,9 +162,8 @@ VALUE setUserName(VALUE self, VALUE setting)
|
|
172
162
|
* @return A reference to the attribute value for the object.
|
173
163
|
*
|
174
164
|
*/
|
175
|
-
VALUE getUserPassword(VALUE self)
|
176
|
-
|
177
|
-
return(rb_iv_get(self, "@password"));
|
165
|
+
VALUE getUserPassword(VALUE self) {
|
166
|
+
return(rb_iv_get(self, "@password"));
|
178
167
|
}
|
179
168
|
|
180
169
|
|
@@ -187,22 +176,20 @@ VALUE getUserPassword(VALUE self)
|
|
187
176
|
* @return A reference to the newly update AddUser object.
|
188
177
|
*
|
189
178
|
*/
|
190
|
-
VALUE setUserPassword(VALUE self, VALUE setting)
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
return(self);
|
179
|
+
VALUE setUserPassword(VALUE self, VALUE setting) {
|
180
|
+
VALUE actual = rb_funcall(setting, rb_intern("to_s"), 0),
|
181
|
+
value = rb_funcall(actual, rb_intern("length"), 0);
|
182
|
+
int length = 0;
|
183
|
+
|
184
|
+
length = TYPE(value) == T_FIXNUM ? FIX2INT(value) : NUM2INT(value);
|
185
|
+
if(length < 1 || length > 31) {
|
186
|
+
rb_fireruby_raise(NULL,
|
187
|
+
"Invalid password specified. A user password must not " \
|
188
|
+
"be blank and may have no more than 31 characters.");
|
189
|
+
}
|
190
|
+
rb_iv_set(self, "@password", actual);
|
191
|
+
|
192
|
+
return(self);
|
206
193
|
}
|
207
194
|
|
208
195
|
|
@@ -215,9 +202,8 @@ VALUE setUserPassword(VALUE self, VALUE setting)
|
|
215
202
|
* @return A reference to the attribute value for the object.
|
216
203
|
*
|
217
204
|
*/
|
218
|
-
VALUE getUserFirstName(VALUE self)
|
219
|
-
|
220
|
-
return(rb_iv_get(self, "@first_name"));
|
205
|
+
VALUE getUserFirstName(VALUE self) {
|
206
|
+
return(rb_iv_get(self, "@first_name"));
|
221
207
|
}
|
222
208
|
|
223
209
|
|
@@ -231,10 +217,9 @@ VALUE getUserFirstName(VALUE self)
|
|
231
217
|
* @return A reference to the newly update AddUser object.
|
232
218
|
*
|
233
219
|
*/
|
234
|
-
VALUE setUserFirstName(VALUE self, VALUE setting)
|
235
|
-
|
236
|
-
|
237
|
-
return(self);
|
220
|
+
VALUE setUserFirstName(VALUE self, VALUE setting) {
|
221
|
+
rb_iv_set(self, "@first_name", setting);
|
222
|
+
return(self);
|
238
223
|
}
|
239
224
|
|
240
225
|
|
@@ -247,9 +232,8 @@ VALUE setUserFirstName(VALUE self, VALUE setting)
|
|
247
232
|
* @return A reference to the attribute value for the object.
|
248
233
|
*
|
249
234
|
*/
|
250
|
-
VALUE getUserMiddleName(VALUE self)
|
251
|
-
|
252
|
-
return(rb_iv_get(self, "@middle_name"));
|
235
|
+
VALUE getUserMiddleName(VALUE self) {
|
236
|
+
return(rb_iv_get(self, "@middle_name"));
|
253
237
|
}
|
254
238
|
|
255
239
|
|
@@ -263,10 +247,9 @@ VALUE getUserMiddleName(VALUE self)
|
|
263
247
|
* @return A reference to the newly update AddUser object.
|
264
248
|
*
|
265
249
|
*/
|
266
|
-
VALUE setUserMiddleName(VALUE self, VALUE setting)
|
267
|
-
|
268
|
-
|
269
|
-
return(self);
|
250
|
+
VALUE setUserMiddleName(VALUE self, VALUE setting) {
|
251
|
+
rb_iv_set(self, "@middle_name", setting);
|
252
|
+
return(self);
|
270
253
|
}
|
271
254
|
|
272
255
|
|
@@ -279,9 +262,8 @@ VALUE setUserMiddleName(VALUE self, VALUE setting)
|
|
279
262
|
* @return A reference to the attribute value for the object.
|
280
263
|
*
|
281
264
|
*/
|
282
|
-
VALUE getUserLastName(VALUE self)
|
283
|
-
|
284
|
-
return(rb_iv_get(self, "@last_name"));
|
265
|
+
VALUE getUserLastName(VALUE self) {
|
266
|
+
return(rb_iv_get(self, "@last_name"));
|
285
267
|
}
|
286
268
|
|
287
269
|
|
@@ -295,10 +277,9 @@ VALUE getUserLastName(VALUE self)
|
|
295
277
|
* @return A reference to the newly update AddUser object.
|
296
278
|
*
|
297
279
|
*/
|
298
|
-
VALUE setUserLastName(VALUE self, VALUE setting)
|
299
|
-
|
300
|
-
|
301
|
-
return(self);
|
280
|
+
VALUE setUserLastName(VALUE self, VALUE setting) {
|
281
|
+
rb_iv_set(self, "@last_name", setting);
|
282
|
+
return(self);
|
302
283
|
}
|
303
284
|
|
304
285
|
|
@@ -312,32 +293,29 @@ VALUE setUserLastName(VALUE self, VALUE setting)
|
|
312
293
|
* @return A reference to the AddUser object executed.
|
313
294
|
*
|
314
295
|
*/
|
315
|
-
VALUE executeAddUser(VALUE self, VALUE manager)
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
free(buffer);
|
339
|
-
|
340
|
-
return(self);
|
296
|
+
VALUE executeAddUser(VALUE self, VALUE manager) {
|
297
|
+
ManagerHandle *handle = NULL;
|
298
|
+
char *buffer = NULL;
|
299
|
+
short length = 0;
|
300
|
+
ISC_STATUS status[ISC_STATUS_LENGTH];
|
301
|
+
|
302
|
+
/* Check that the service manager is connected. */
|
303
|
+
Data_Get_Struct(manager, ManagerHandle, handle);
|
304
|
+
if(handle->handle == 0) {
|
305
|
+
rb_fireruby_raise(NULL,
|
306
|
+
"Add user error. Service manager not connected.");
|
307
|
+
}
|
308
|
+
|
309
|
+
createAddUserBuffer(self, &buffer, &length);
|
310
|
+
|
311
|
+
/* Start the service request. */
|
312
|
+
if(isc_service_start(status, &handle->handle, NULL, length, buffer)) {
|
313
|
+
free(buffer);
|
314
|
+
rb_fireruby_raise(status, "Error adding user.");
|
315
|
+
}
|
316
|
+
free(buffer);
|
317
|
+
|
318
|
+
return(self);
|
341
319
|
}
|
342
320
|
|
343
321
|
|
@@ -351,97 +329,89 @@ VALUE executeAddUser(VALUE self, VALUE manager)
|
|
351
329
|
* of the buffer.
|
352
330
|
*
|
353
331
|
*/
|
354
|
-
void createAddUserBuffer(VALUE self, char **buffer, short *length)
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
if(last != Qnil)
|
438
|
-
{
|
439
|
-
*offset++ = isc_spb_sec_lastname;
|
440
|
-
number = strlen(StringValuePtr(last));
|
441
|
-
ADD_SPB_LENGTH(offset, number);
|
442
|
-
memcpy(offset, StringValuePtr(last), number);
|
443
|
-
offset += number;
|
444
|
-
}
|
332
|
+
void createAddUserBuffer(VALUE self, char **buffer, short *length) {
|
333
|
+
VALUE value = Qnil,
|
334
|
+
first = Qnil,
|
335
|
+
middle = Qnil,
|
336
|
+
last = Qnil,
|
337
|
+
tmp_str = Qnil;
|
338
|
+
char *offset = NULL;
|
339
|
+
int number = 0;
|
340
|
+
|
341
|
+
/* Calculate the required buffer length. */
|
342
|
+
*length = 1;
|
343
|
+
|
344
|
+
tmp_str = rb_iv_get(self, "@user_name");
|
345
|
+
*length += strlen(StringValuePtr(tmp_str)) + 3;
|
346
|
+
|
347
|
+
tmp_str = rb_iv_get(self, "@password");
|
348
|
+
*length += strlen(StringValuePtr(tmp_str)) + 3;
|
349
|
+
|
350
|
+
value = rb_iv_get(self, "@first_name");
|
351
|
+
if(value != Qnil) {
|
352
|
+
first = rb_funcall(value, rb_intern("to_s"), 0);
|
353
|
+
*length += strlen(StringValuePtr(first)) + 3;
|
354
|
+
}
|
355
|
+
|
356
|
+
value = rb_iv_get(self, "@middle_name");
|
357
|
+
if(value != Qnil) {
|
358
|
+
middle = rb_funcall(value, rb_intern("to_s"), 0);
|
359
|
+
*length += strlen(StringValuePtr(middle)) + 3;
|
360
|
+
}
|
361
|
+
|
362
|
+
value = rb_iv_get(self, "@last_name");
|
363
|
+
if(value != Qnil) {
|
364
|
+
last = rb_funcall(value, rb_intern("to_s"), 0);
|
365
|
+
*length += strlen(StringValuePtr(last)) + 3;
|
366
|
+
}
|
367
|
+
|
368
|
+
/* Create and populate the buffer. */
|
369
|
+
offset = *buffer = ALLOC_N(char, *length);
|
370
|
+
if(*buffer == NULL) {
|
371
|
+
rb_raise(rb_eNoMemError,
|
372
|
+
"Memory allocation error preparing to add user.");
|
373
|
+
}
|
374
|
+
memset(*buffer, 0, *length);
|
375
|
+
|
376
|
+
*offset++ = isc_action_svc_add_user;
|
377
|
+
|
378
|
+
*offset++ = isc_spb_sec_username;
|
379
|
+
value = rb_iv_get(self, "@user_name");
|
380
|
+
number = strlen(StringValuePtr(value));
|
381
|
+
ADD_SPB_LENGTH(offset, number);
|
382
|
+
memcpy(offset, StringValuePtr(value), number);
|
383
|
+
offset += number;
|
384
|
+
|
385
|
+
*offset++ = isc_spb_sec_password;
|
386
|
+
value = rb_iv_get(self, "@password");
|
387
|
+
number = strlen(StringValuePtr(value));
|
388
|
+
ADD_SPB_LENGTH(offset, number);
|
389
|
+
memcpy(offset, StringValuePtr(value), number);
|
390
|
+
offset += number;
|
391
|
+
|
392
|
+
if(first != Qnil) {
|
393
|
+
*offset++ = isc_spb_sec_firstname;
|
394
|
+
number = strlen(StringValuePtr(first));
|
395
|
+
ADD_SPB_LENGTH(offset, number);
|
396
|
+
memcpy(offset, StringValuePtr(first), number);
|
397
|
+
offset += number;
|
398
|
+
}
|
399
|
+
|
400
|
+
if(middle != Qnil) {
|
401
|
+
*offset++ = isc_spb_sec_middlename;
|
402
|
+
number = strlen(StringValuePtr(middle));
|
403
|
+
ADD_SPB_LENGTH(offset, number);
|
404
|
+
memcpy(offset, StringValuePtr(middle), number);
|
405
|
+
offset += number;
|
406
|
+
}
|
407
|
+
|
408
|
+
if(last != Qnil) {
|
409
|
+
*offset++ = isc_spb_sec_lastname;
|
410
|
+
number = strlen(StringValuePtr(last));
|
411
|
+
ADD_SPB_LENGTH(offset, number);
|
412
|
+
memcpy(offset, StringValuePtr(last), number);
|
413
|
+
offset += number;
|
414
|
+
}
|
445
415
|
}
|
446
416
|
|
447
417
|
|
@@ -451,19 +421,18 @@ void createAddUserBuffer(VALUE self, char **buffer, short *length)
|
|
451
421
|
* @param module The module to create the new class definition under.
|
452
422
|
*
|
453
423
|
*/
|
454
|
-
void Init_AddUser(VALUE module)
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
rb_define_method(cAddUser, "execute", executeAddUser, 1);
|
424
|
+
void Init_AddUser(VALUE module) {
|
425
|
+
cAddUser = rb_define_class_under(module, "AddUser", rb_cObject);
|
426
|
+
rb_define_method(cAddUser, "initialize", initializeAddUser, -1);
|
427
|
+
rb_define_method(cAddUser, "user_name", getUserName, 0);
|
428
|
+
rb_define_method(cAddUser, "user_name=", setUserName, 1);
|
429
|
+
rb_define_method(cAddUser, "password", getUserPassword, 0);
|
430
|
+
rb_define_method(cAddUser, "password=", setUserPassword, 1);
|
431
|
+
rb_define_method(cAddUser, "first_name", getUserFirstName, 0);
|
432
|
+
rb_define_method(cAddUser, "first_name=", setUserFirstName, 1);
|
433
|
+
rb_define_method(cAddUser, "middle_name", getUserMiddleName, 0);
|
434
|
+
rb_define_method(cAddUser, "middle_name=", setUserMiddleName, 1);
|
435
|
+
rb_define_method(cAddUser, "last_name", getUserLastName, 0);
|
436
|
+
rb_define_method(cAddUser, "last_name=", setUserLastName, 1);
|
437
|
+
rb_define_method(cAddUser, "execute", executeAddUser, 1);
|
469
438
|
}
|
data/ext/AddUser.h
CHANGED
@@ -25,13 +25,13 @@
|
|
25
25
|
#ifndef FIRERUBY_ADD_USER_H
|
26
26
|
#define FIRERUBY_ADD_USER_H
|
27
27
|
|
28
|
-
|
28
|
+
/* Includes. */
|
29
29
|
#ifndef RUBY_H_INCLUDED
|
30
30
|
#include "ruby.h"
|
31
31
|
#define RUBY_H_INCLUDED
|
32
32
|
#endif
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
/* Function prototypes. */
|
35
|
+
void Init_AddUser(VALUE);
|
36
36
|
|
37
37
|
#endif /* FIRERUBY_ADD_USER_H */
|