Rob Shearman : widl: Add support for the broadcast and idempotent operation attributes.
Alexandre Julliard
julliard at winehq.org
Mon Apr 14 07:14:29 CDT 2008
Module: wine
Branch: master
Commit: 56e2553eff279a853a86551b861a9de1b6059d01
URL: http://source.winehq.org/git/wine.git/?a=commit;h=56e2553eff279a853a86551b861a9de1b6059d01
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Apr 14 10:59:55 2008 +0100
widl: Add support for the broadcast and idempotent operation attributes.
---
tools/widl/client.c | 10 ++++++++++
tools/widl/parser.y | 2 ++
tools/widl/widltypes.h | 1 +
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/tools/widl/client.c b/tools/widl/client.c
index 7e1e70b..eb1ade2 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 929d95c..81eacba 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 3488337..d046447 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,
More information about the wine-cvs
mailing list