summaryrefslogtreecommitdiffstats
path: root/mono/ErrorMessage.cs
diff options
context:
space:
mode:
authorOwen Fraser-Green <owen@discobabe.net>2004-03-26 15:25:59 +0000
committerOwen Fraser-Green <owen@discobabe.net>2004-03-26 15:25:59 +0000
commit45277e93d8c8e18a04d1c28eb666337316726152 (patch)
tree46502f3644fad7cad6932e3d3267edf3a4a42eec /mono/ErrorMessage.cs
parent7dd57040236dc34a313948f75b403a49df693649 (diff)
Added signal support.
Diffstat (limited to 'mono/ErrorMessage.cs')
-rw-r--r--mono/ErrorMessage.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/mono/ErrorMessage.cs b/mono/ErrorMessage.cs
new file mode 100644
index 00000000..773a05b6
--- /dev/null
+++ b/mono/ErrorMessage.cs
@@ -0,0 +1,45 @@
+namespace DBus
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.Diagnostics;
+
+ public class ErrorMessage : Message
+ {
+ public ErrorMessage() : base(MessageType.Error)
+ {
+ }
+
+ internal ErrorMessage(IntPtr rawMessage, Service service) : base(rawMessage, service)
+ {
+ }
+
+ public ErrorMessage(Service service) : base(MessageType.Error, service)
+ {
+ }
+
+ public new string Name
+ {
+ get {
+ if (this.name == null) {
+ this.name = Marshal.PtrToStringAnsi(dbus_message_get_error_name(RawMessage));
+ }
+
+ return this.name;
+ }
+
+ set {
+ if (value != this.name) {
+ dbus_message_set_error_name(RawMessage, value);
+ this.name = value;
+ }
+ }
+ }
+
+ [DllImport("dbus-1")]
+ private extern static bool dbus_message_set_error_name(IntPtr rawMessage, string name);
+
+ [DllImport("dbus-1")]
+ private extern static IntPtr dbus_message_get_error_name(IntPtr rawMessage);
+ }
+}