}
fprintf(ci->fh, "};\n\n");
+ fprintf(ci->fh, "static const char * const %s_method_names[%d] = {\n",
+ id, num_methods);
+ for(sub = IDL_INTERFACE(tree).body; sub; sub = IDL_LIST(sub).next) {
+ IDL_tree cur = IDL_LIST(sub).data;
+
+ switch(IDL_NODE_TYPE(cur)) {
+ case IDLN_OP_DCL: {
+ char *op_id;
+ op_id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_OP_DCL(cur).ident), "_", 0);
+ fprintf(ci->fh, " \"%s\",\n", op_id);
+ g_free(op_id);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ fprintf(ci->fh, "};\n\n");
+
fprintf(ci->fh, "static const struct forb_interface %s_interface = {\n", id);
fprintf(ci->fh, " .name = \"%s\",\n", id);
fprintf(ci->fh, " .num_methods = %d,\n", num_methods);
fprintf(ci->fh, " .skeletons = %s_skeletons,\n", id);
+ fprintf(ci->fh, " .method_names = %s_method_names,\n", id);
fprintf(ci->fh, " .type_hash = 0 /* not implemented */\n");
fprintf(ci->fh, "};\n\n");