Пример #1
0
    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);
    }
Пример #2
0
    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 = "";
    }
Пример #3
0
Файл: Qt.cs Проект: KDE/qyoto
 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);
 }
Пример #4
0
 public static IQDBusPendingCall FromCompletedCall(QDBusMessage message)
 {
     return (IQDBusPendingCall) staticInterceptor.Invoke("fromCompletedCall#", "fromCompletedCall(const QDBusMessage&)", typeof(IQDBusPendingCall), typeof(QDBusMessage), message);
 }
Пример #5
0
 // 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);
 }
Пример #6
0
 public bool Send(QDBusMessage message)
 {
     return (bool) interceptor.Invoke("send#", "send(const QDBusMessage&) const", typeof(bool), typeof(QDBusMessage), message);
 }
Пример #7
0
 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);
 }
Пример #8
0
 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);
 }
Пример #9
0
 public QDBusMessage Call(QDBusMessage message)
 {
     return (QDBusMessage) interceptor.Invoke("call#", "call(const QDBusMessage&) const", typeof(QDBusMessage), typeof(QDBusMessage), message);
 }
Пример #10
0
 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);
 }
Пример #11
0
 public IQDBusPendingCall AsyncCall(QDBusMessage message)
 {
     return (IQDBusPendingCall) interceptor.Invoke("asyncCall#", "asyncCall(const QDBusMessage&) const", typeof(IQDBusPendingCall), typeof(QDBusMessage), message);
 }
Пример #12
0
 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);
 }
Пример #13
0
 protected void Assign(QDBusMessage message)
 {
     interceptor.Invoke("assign#", "assign(const QDBusMessage&)", typeof(void), typeof(QDBusMessage), message);
 }