diff --git a/tools/widl/client.c b/tools/widl/client.c index 7e1e70b6a2f..eb1ade2bb7e 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -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); diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 929d95c5570..81eacbad793 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -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" }, diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 348833733b2..d046447412b 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -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,