* qt/Makfile.am:
[platform/upstream/dbus.git] / mono / MethodCall.cs
1 namespace DBus
2 {
3   using System;
4   using System.Runtime.InteropServices;
5   using System.Diagnostics;
6   
7   public class MethodCall : Message
8   {
9     public MethodCall() : base(MessageType.MethodCall)
10     {
11     }
12     
13     internal MethodCall(IntPtr rawMessage, Service service) : base(rawMessage, service)
14     {
15     }
16
17     public MethodCall(Service service) : base(MessageType.MethodCall, service)
18     {
19     }
20
21     public MethodCall(Service service, string pathName, string interfaceName, string name)
22     {
23       this.service = service;
24
25       RawMessage = dbus_message_new_method_call(service.Name, pathName, interfaceName, name);
26       
27       if (RawMessage == IntPtr.Zero) {
28         throw new OutOfMemoryException();
29       }
30       
31       this.pathName = pathName;
32       this.interfaceName = interfaceName;
33       this.name = name;
34
35       dbus_message_unref(RawMessage);
36     }
37     
38     public new string PathName
39     {
40       get
41         {
42           return base.PathName;
43         }
44
45       set
46         {
47           base.PathName = value;
48         }
49     }
50
51     public new string InterfaceName
52     {
53       get
54         {
55           return base.InterfaceName;
56         }
57
58       set
59         {
60           base.InterfaceName = value;
61         }
62     }
63
64     public new string Name
65     {
66       get
67         {
68           return base.Name;
69         }
70
71       set
72         {
73           base.Name = value;
74         }
75     }
76     
77     [DllImport("dbus-1")]
78     private extern static IntPtr dbus_message_new_method_call(string serviceName, string pathName, string interfaceName, string name);
79   }
80 }