[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-187-g356a5d2

Jelmer Vernooij jelmer at samba.org
Wed Apr 16 15:30:15 GMT 2008


The branch, v4-0-test has been updated
       via  356a5d24747bb5e1ef9774c690a5ec386a4a165e (commit)
      from  49367e044e3ab94639ab3209bfd06c6286b44b59 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 356a5d24747bb5e1ef9774c690a5ec386a4a165e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Apr 16 17:21:48 2008 +0200

    Provide stubs when the [todo] attribute is set.

-----------------------------------------------------------------------

Summary of changes:
 source/librpc/idl/policyagent.idl               |    2 +-
 source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm |   54 +++++++++++++++++-----
 2 files changed, 42 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/idl/policyagent.idl b/source/librpc/idl/policyagent.idl
index 295b70a..ab137fa 100644
--- a/source/librpc/idl/policyagent.idl
+++ b/source/librpc/idl/policyagent.idl
@@ -9,5 +9,5 @@
 {
 	/*****************/
 	/* Function 0x00 */
-	WERROR policyagent_Dummy();
+	[todo] WERROR policyagent_Dummy();
 }
diff --git a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index e9c158e..f8209be 100644
--- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -7,6 +7,7 @@
 package Parse::Pidl::Samba4::NDR::Client;
 
 use Parse::Pidl::Samba4 qw(choose_header is_intree);
+use Parse::Pidl::Util qw(has_property);
 
 use vars qw($VERSION);
 $VERSION = '0.01';
@@ -15,30 +16,45 @@ use strict;
 
 my($res,$res_hdr);
 
-#####################################################################
-# parse a function
-sub ParseFunction($$)
+sub ParseFunctionSend($$$)
 {
-	my ($interface, $fn) = @_;
-	my $name = $fn->{NAME};
+	my ($interface, $fn, $name) = @_;
 	my $uname = uc $name;
 
-	$res_hdr .= "\nstruct rpc_request *dcerpc_$name\_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r);
-NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r);
-";
+	my $proto = "struct rpc_request *dcerpc_$name\_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)";
 
-	$res .= "
-struct rpc_request *dcerpc_$name\_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)
-{
+	$res_hdr .= "\n$proto;\n";
+
+	$res .= "$proto\n{\n";
+
+	if (has_property($fn, "todo")) {
+		$res .= "\treturn NULL;\n";
+	} else {
+		$res .= "
 	if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) {
 		NDR_PRINT_IN_DEBUG($name, r);
 	}
 	
 	return dcerpc_ndr_request_send(p, NULL, &ndr_table_$interface->{NAME}, NDR_$uname, mem_ctx, r);
+";
+	}
+
+	$res .= "}\n\n";
 }
 
-NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)
+sub ParseFunctionSync($$$)
 {
+	my ($interface, $fn, $name) = @_;
+
+	my $proto = "NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)";
+
+	$res_hdr .= "\n$proto;\n";
+	$res .= "$proto\n{\n";
+
+	if (has_property($fn, "todo")) {
+		$res .= "\treturn NT_STATUS_NOT_IMPLEMENTED;\n";
+	} else {
+		$res .= "
 	struct rpc_request *req;
 	NTSTATUS status;
 	
@@ -58,8 +74,20 @@ NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *
 	$res .= 
 "
 	return status;
-}
 ";
+	}
+
+	$res .= "}\n\n";
+}
+
+#####################################################################
+# parse a function
+sub ParseFunction($$)
+{
+	my ($interface, $fn) = @_;
+
+	ParseFunctionSend($interface, $fn, $fn->{NAME});
+	ParseFunctionSync($interface, $fn, $fn->{NAME});
 }
 
 my %done;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list