summaryrefslogtreecommitdiffstats
path: root/mono/MethodReturn.cs
diff options
context:
space:
mode:
authorOwen Fraser-Green <owen@discobabe.net>2004-03-23 12:10:32 +0000
committerOwen Fraser-Green <owen@discobabe.net>2004-03-23 12:10:32 +0000
commitc916037773d7d3d8d37ca2c5a8899b7b728e377d (patch)
tree21c37372ab9795583e724e8459578b7fe0be330b /mono/MethodReturn.cs
parent2195cf0dbde2ae26b5a684c6d914c1711f44c28d (diff)
First checkin of the Mono bindings.
Diffstat (limited to 'mono/MethodReturn.cs')
-rw-r--r--mono/MethodReturn.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/mono/MethodReturn.cs b/mono/MethodReturn.cs
new file mode 100644
index 00000000..1e7731df
--- /dev/null
+++ b/mono/MethodReturn.cs
@@ -0,0 +1,57 @@
+namespace DBus
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.Diagnostics;
+
+ public class MethodReturn : Message
+ {
+ private MethodReturn() : base(MessageType.MethodReturn)
+ {
+ }
+
+ internal MethodReturn(IntPtr rawMessage, Service service) : base(rawMessage, service)
+ {
+ }
+
+ public MethodReturn(MethodCall methodCall)
+ {
+ this.service = methodCall.Service;
+
+ RawMessage = dbus_message_new_method_return(methodCall.RawMessage);
+
+ if (RawMessage == IntPtr.Zero) {
+ throw new OutOfMemoryException();
+ }
+
+ dbus_message_unref(RawMessage);
+ }
+
+ public new string PathName
+ {
+ get
+ {
+ return base.PathName;
+ }
+ }
+
+ public new string InterfaceName
+ {
+ get
+ {
+ return base.InterfaceName;
+ }
+ }
+
+ public new string Name
+ {
+ get
+ {
+ return base.Name;
+ }
+ }
+
+ [DllImport("dbus-1")]
+ private extern static IntPtr dbus_message_new_method_return(IntPtr rawMessage);
+ }
+}