1 #include "rb_application_handler.h"
2 #include "surf/surfxml_parse.h"
10 rb_require("ApplicationHandler.rb");
14 static void application_handler_on_start_document(void)
19 current = rb_funcall3(rb_const_get(rb_cObject, rb_intern("ApplicationHandler")), rb_intern("new"), 0, 0);
20 rb_funcall(current,rb_intern("onStartDocument"),0);
25 static void application_handler_on_end_document(void)
29 rb_funcall(current,rb_intern("onEndDocument"),0);
33 static void application_handler_on_begin_process(void)
39 VALUE hostName = rb_str_new2(A_surfxml_process_host);
40 VALUE function = rb_str_new2(A_surfxml_process_function);
42 rb_funcall(current,rb_intern("onBeginProcess"),2,hostName,function);
47 static void application_handler_on_process_arg(void)
52 VALUE arg = rb_str_new2(A_surfxml_argument_value);
54 rb_funcall(current,rb_intern("onProcessArg"),1,arg);
59 static void application_handler_on_property(void)
64 VALUE id = rb_str_new2(A_surfxml_prop_id);
65 VALUE val = rb_str_new2(A_surfxml_prop_value);
67 rb_funcall(current,rb_intern("onProperty"),2,id,val);
73 static void application_handler_on_end_process(void)
78 rb_funcall(current,rb_intern("onEndProcess"),0);