Ejemplo n.º 1
0
		public void SendSignal (string iface, string member, string inSigStr, MessageWriter writer, Type retType, out Exception exception)
		{
			exception = null;

			//TODO: don't ignore retVal, exception etc.

			Signature outSig = String.IsNullOrEmpty (inSigStr) ? Signature.Empty : new Signature (inSigStr);

			Signal signal = new Signal (object_path, iface, member);
			signal.message.Signature = outSig;

			Message signalMsg = signal.message;
			signalMsg.Body = writer.ToArray ();

			conn.Send (signalMsg);
		}
Ejemplo n.º 2
0
        void RaiseNameSignal(string memberSuffix, string name)
        {
            // Name* signals on org.freedesktop.DBus are connection-specific.
            // We handle them here as a special case.

            Signal nameSignal = new Signal (Path, DBusInterface, "Name" + memberSuffix);
            MessageWriter mw = new MessageWriter ();
            mw.Write (name);
            nameSignal.message.Body = mw.ToArray ();
            nameSignal.message.Signature = Signature.StringSig;
            Caller.Send (nameSignal.message);
        }
Ejemplo n.º 3
0
		public void SendSignal (MethodInfo mi, string @interface, string member, object[] outValues)
		{
			//TODO: make use of bus_name?

			Type[] outTypes = Mapper.GetTypes (ArgDirection.In, mi.GetParameters ());
			Signature outSig = Signature.GetSig (outTypes);

			Signal signal = new Signal (object_path, @interface, member);
			signal.message.Signature = outSig;

			if (outValues != null && outValues.Length != 0) {
				MessageWriter writer = new MessageWriter (Connection.NativeEndianness);
				writer.connection = conn;

				for (int i = 0 ; i != outTypes.Length ; i++)
					writer.Write (outTypes[i], outValues[i]);

				signal.message.Body = writer.ToArray ();
			}

			conn.Send (signal.message);
		}