public static int Main(string[] args) { new QCoreApplication(args); if (!QDBusConnection.SessionBus().IsConnected()) { Console.WriteLine("Cannot connect to the D-BUS session bus.\n" + "To start it, run:\n" + "\teval `dbus-launch --auto-syntax`\n"); return(1); } QDBusInterface iface = new QDBusInterface(SERVICE_NAME, "/", "", QDBusConnection.SessionBus()); if (iface.IsValid()) { QDBusMessage message = iface.Call("ping", args.Length > 0 ? args[0] : ""); QDBusReply <string> reply = new QDBusReply <string>(message); if (reply.IsValid()) { Console.WriteLine("Reply was: {0}", reply.Value()); return(0); } Console.WriteLine("Call failed: {0}\n", reply.Error().Message()); return(1); } Console.WriteLine(QDBusConnection.SessionBus().LastError().Message()); return(1); }
void SendClickedSlot() { //Emit.message(m_nickname, messageLineEdit.text()); QDBusMessage msg = QDBusMessage.CreateSignal("/","com.trolltech.chat","message"); msg.Write(m_nickname).Write(m_ui.messageLineEdit.Text); QDBusConnection.SessionBus().Send(msg); m_ui.messageLineEdit.Text = ""; }
public static void QDBusReplyFill(QDBusMessage reply, QDBusError error, QVariant data) { staticInterceptor.Invoke("qDBusReplyFill###", "qDBusReplyFill(const QDBusMessage&, QDBusError&, QVariant&)", typeof(void), typeof(QDBusMessage), reply, typeof(QDBusError), error, typeof(QVariant), data); }
public static IQDBusPendingCall FromCompletedCall(QDBusMessage message) { return (IQDBusPendingCall) staticInterceptor.Invoke("fromCompletedCall#", "fromCompletedCall(const QDBusMessage&)", typeof(IQDBusPendingCall), typeof(QDBusMessage), message); }
// QDBusError* QDBusError(const DBusError* arg1); >>>> NOT CONVERTED public QDBusError(QDBusMessage msg) : this((Type) null) { CreateProxy(); interceptor.Invoke("QDBusError#", "QDBusError(const QDBusMessage&)", typeof(void), typeof(QDBusMessage), msg); }
public bool Send(QDBusMessage message) { return (bool) interceptor.Invoke("send#", "send(const QDBusMessage&) const", typeof(bool), typeof(QDBusMessage), message); }
public bool CallWithCallback(QDBusMessage message, QObject receiver, string returnMethod, string errorMethod, int timeout) { return (bool) interceptor.Invoke("callWithCallback##$$$", "callWithCallback(const QDBusMessage&, QObject*, const char*, const char*, int) const", typeof(bool), typeof(QDBusMessage), message, typeof(QObject), receiver, typeof(string), returnMethod, typeof(string), errorMethod, typeof(int), timeout); }
public bool CallWithCallback(QDBusMessage message, QObject receiver, string slot) { return (bool) interceptor.Invoke("callWithCallback##$", "callWithCallback(const QDBusMessage&, QObject*, const char*) const", typeof(bool), typeof(QDBusMessage), message, typeof(QObject), receiver, typeof(string), slot); }
public QDBusMessage Call(QDBusMessage message) { return (QDBusMessage) interceptor.Invoke("call#", "call(const QDBusMessage&) const", typeof(QDBusMessage), typeof(QDBusMessage), message); }
public QDBusMessage Call(QDBusMessage message, QDBus.CallMode mode) { return (QDBusMessage) interceptor.Invoke("call#$", "call(const QDBusMessage&, QDBus::CallMode) const", typeof(QDBusMessage), typeof(QDBusMessage), message, typeof(QDBus.CallMode), mode); }
public IQDBusPendingCall AsyncCall(QDBusMessage message) { return (IQDBusPendingCall) interceptor.Invoke("asyncCall#", "asyncCall(const QDBusMessage&) const", typeof(IQDBusPendingCall), typeof(QDBusMessage), message); }
public IQDBusPendingCall AsyncCall(QDBusMessage message, int timeout) { return (IQDBusPendingCall) interceptor.Invoke("asyncCall#$", "asyncCall(const QDBusMessage&, int) const", typeof(IQDBusPendingCall), typeof(QDBusMessage), message, typeof(int), timeout); }
protected void Assign(QDBusMessage message) { interceptor.Invoke("assign#", "assign(const QDBusMessage&)", typeof(void), typeof(QDBusMessage), message); }