widl: Add support for the broadcast and idempotent operation attributes.

This commit is contained in:
Rob Shearman 2008-04-14 10:59:55 +01:00 committed by Alexandre Julliard
parent 66b8574d8d
commit 56e2553eff
3 changed files with 13 additions and 0 deletions

View File

@ -186,6 +186,16 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
indent--;
fprintf(client, "\n");
if (is_attr(def->attrs, ATTR_IDEMPOTENT) || is_attr(def->attrs, ATTR_BROADCAST))
{
print_client("_RpcMessage.RpcFlags = ( RPC_NCA_FLAGS_DEFAULT ");
if (is_attr(def->attrs, ATTR_IDEMPOTENT))
fprintf(client, "| RPC_NCA_FLAGS_IDEMPOTENT ");
if (is_attr(def->attrs, ATTR_BROADCAST))
fprintf(client, "| RPC_NCA_FLAGS_BROADCAST ");
fprintf(client, ");\n\n");
}
if (implicit_handle)
{
print_client("_Handle = %s;\n", implicit_handle);

View File

@ -457,6 +457,7 @@ attribute: { $$ = NULL; }
| tASYNC { $$ = make_attr(ATTR_ASYNC); }
| tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); }
| tBINDABLE { $$ = make_attr(ATTR_BINDABLE); }
| tBROADCAST { $$ = make_attr(ATTR_BROADCAST); }
| tCALLAS '(' ident ')' { $$ = make_attrp(ATTR_CALLAS, $3); }
| tCASE '(' expr_list_const ')' { $$ = make_attrp(ATTR_CASE, $3); }
| tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); }
@ -2154,6 +2155,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, "async" },
/* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" },
/* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "bindable" },
/* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "broadcast" },
/* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "call_as" },
/* ATTR_CALLCONV */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
/* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" },

View File

@ -69,6 +69,7 @@ enum attr_type
ATTR_ASYNC,
ATTR_AUTO_HANDLE,
ATTR_BINDABLE,
ATTR_BROADCAST,
ATTR_CALLAS,
ATTR_CALLCONV, /* calling convention pseudo-attribute */
ATTR_CASE,