widl: Write out the pre- and postamble for RPC interfaces with no methods.

This commit is contained in:
Robert Shearman 2006-03-31 12:50:34 +01:00 committed by Alexandre Julliard
parent b38cd7ff5f
commit 071dfb188a
1 changed files with 8 additions and 7 deletions

View File

@ -917,18 +917,19 @@ static void write_rpc_interface(const type_t *iface)
unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION); unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION);
const char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); const char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
if (!iface->funcs) return;
fprintf(header, "/*****************************************************************************\n"); fprintf(header, "/*****************************************************************************\n");
fprintf(header, " * %s interface (v%d.%d)\n", iface->name, LOWORD(ver), HIWORD(ver)); fprintf(header, " * %s interface (v%d.%d)\n", iface->name, LOWORD(ver), HIWORD(ver));
fprintf(header, " */\n"); fprintf(header, " */\n");
fprintf(header,"#ifndef __%s_INTERFACE_DEFINED__\n", iface->name); fprintf(header,"#ifndef __%s_INTERFACE_DEFINED__\n", iface->name);
fprintf(header,"#define __%s_INTERFACE_DEFINED__\n\n", iface->name); fprintf(header,"#define __%s_INTERFACE_DEFINED__\n\n", iface->name);
write_iface_guid(iface); if (iface->funcs)
if (var) fprintf(header, "extern handle_t %s;\n", var); {
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_c_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver)); write_iface_guid(iface);
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_s_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver)); if (var) fprintf(header, "extern handle_t %s;\n", var);
write_function_proto(iface); fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_c_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
fprintf(header, "extern RPC_IF_HANDLE %s_v%d_%d_s_ifspec;\n", iface->name, LOWORD(ver), HIWORD(ver));
write_function_proto(iface);
}
fprintf(header,"\n#endif /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name); fprintf(header,"\n#endif /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name);
/* FIXME: server/client code */ /* FIXME: server/client code */