1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r5486: - Use references to interfaces in coclasses rather then

full interfaces.
- Couple of bugfixes in odl.pm
- First use of multiple pointers in dcom.idl
This commit is contained in:
Jelmer Vernooij 2005-02-21 12:13:42 +00:00 committed by Gerald (Jerry) Carter
parent d0d4251d6f
commit 3110c2ec44
4 changed files with 440 additions and 437 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ idl:
| idl coclass { push(@{$_[1]}, $_[2]); $_[1] }
;
coclass: property_list 'coclass' identifier '{' interfaces '}' optional_semicolon
coclass: property_list 'coclass' identifier '{' interface_names '}' optional_semicolon
{$_[3] => {
"TYPE" => "COCLASS",
"PROPERTIES" => $_[1],
@ -29,9 +29,9 @@ coclass: property_list 'coclass' identifier '{' interfaces '}' optional_semicolo
}}
;
interfaces:
interface_names:
#empty { {} }
| interfaces interface { push(@{$_[1]}, $_[2]); $_[1] }
| interface_names 'interface' identifier ';' { push(@{$_[1]}, $_[2]); $_[1] }
;
interface: property_list 'interface' identifier base_interface '{' definitions '}' optional_semicolon

View File

@ -29,8 +29,8 @@ sub ReplaceInterfacePointers($)
my $e = shift;
foreach my $x (@{$e->{ELEMENTS}}) {
next unless typelist::hasType($x);
next unless typelist::getType($x)->{DATA}->{TYPE} eq "INTERFACE";
next unless (typelist::hasType($x->{TYPE}));
next unless typelist::getType($x->{TYPE})->{DATA}->{TYPE} eq "INTERFACE";
$x->{TYPE} = "MInterfacePointer";
}
@ -40,9 +40,8 @@ sub ReplaceInterfacePointers($)
sub ODL2IDL($)
{
my $odl = shift;
my @idl = @{$odl};
foreach my $x (@idl) {
foreach my $x (@{$odl}) {
# Add [in] ORPCTHIS *this, [out] ORPCTHAT *that
# for 'object' interfaces
if (util::has_property($x, "object")) {
@ -53,7 +52,7 @@ sub ODL2IDL($)
}
}
return \@idl;
return $odl;
}
1;

View File

@ -31,7 +31,7 @@ interface IUnknown
/* Returns the interface with the specified IID
if implemented by this object */
[local] WERROR QueryInterface([in] GUID *iid,
[out,iid_is(riid)] MInterfacePointer *data);
[out,iid_is(riid),ref] IUnknown **data);
/*****************/
/* Function 0x01 */
@ -263,21 +263,22 @@ object,
WERROR UnMarshalInterface();
}
[
uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique),
object
] interface ICoffeeMachine : IUnknown
{
[helpstring("method MakeCoffee")] WERROR MakeCoffee(BSTR *flavor);
}
[
uuid(DB7C21F8-FE33-4C11-AEA5-CEB56F076FBB),
helpstring("CoffeeMachine Class")
] coclass CoffeeMachine
{
[
uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique)
]
interface ICoffeeMachine : IUnknown
{
[helpstring("method MakeCoffee")] HRESULT MakeCoffee(BSTR *flavor);
}
interface ICoffeeMachine;
}
[