public QiServiceViewModel(QiSessionViewModel session, QiObject service, string name)
        {
            _session = session;
            _service = service;

            ServiceInfo = new QiServiceInfoViewModel(service.ServiceInfo, name);
            Name        = name;
        }
        public uint RegisterService(string serviceName, QiObject qiObject)
        {
            if (!IsConnected)
            {
                return(0);
            }

            if (!IsListening)
            {
                _session.Listen(ListenTarget);
            }

            return((uint)_session
                   .RegisterService(serviceName, qiObject)
                   .GetUInt64(0));
        }
Beispiel #3
0
 internal static void Destroy(QiObject obj) => qi_object_destroy(obj.Handle);
 public uint RegisterService(string serviceName, QiObject qiObject) => 0;
 internal static void Destroy(QiObject obj) => qi_object_destroy(obj.Handle);
Beispiel #6
0
 internal static QiFuture SetProperty(QiObject obj, string pname, QiValue value)
 => new QiFuture(qi_object_set_property(obj.Handle, pname, value));
Beispiel #7
0
 internal static QiFuture SignalDisconnect(QiObject obj, ulong id)
 => new QiFuture(qi_object_signal_disconnect(obj.Handle, id));
Beispiel #8
0
 internal static int Post(QiObject obj, string signature, QiValue qiTuple)
 => qi_object_post(obj.Handle, signature, qiTuple.Handle);
 internal static QiFuture GetProperty(QiObject obj, string pname)
     => new QiFuture(qi_object_get_property(obj.Handle, pname));
 internal static QiFuture SignalDisconnect(QiObject obj, ulong id)
     => new QiFuture(qi_object_signal_disconnect(obj.Handle, id));
 internal static QiFuture SignalConnect(QiObject obj, string signature, ApiSignalCallback callback, IntPtr userdata)
     => new QiFuture(qi_object_signal_connect(obj.Handle, signature, callback, userdata));
 internal static int Post(QiObject obj, string signature, QiValue qiTuple)
     => qi_object_post(obj.Handle, signature, qiTuple.Handle);
 internal static QiFuture Call(QiObject obj, string signature, QiValue qiTuple)
     => new QiFuture(qi_object_call(obj.Handle, signature, qiTuple.Handle));
 internal static QiValue GetMetaObject(QiObject obj)
     => new QiValue(qi_object_get_metaobject(obj.Handle));
Beispiel #15
0
 internal static QiValue GetMetaObject(QiObject obj)
 => new QiValue(qi_object_get_metaobject(obj.Handle));
Beispiel #16
0
 internal static QiFuture Call(QiObject obj, string signature, QiValue qiTuple)
 => new QiFuture(qi_object_call(obj.Handle, signature, qiTuple.Handle));
 internal static QiFuture SetProperty(QiObject obj, string pname, QiValue value)
     => new QiFuture(qi_object_set_property(obj.Handle, pname, value));
Beispiel #18
0
 internal static QiFuture SignalConnect(QiObject obj, string signature, ApiSignalCallback callback, IntPtr userdata)
 => new QiFuture(qi_object_signal_connect(obj.Handle, signature, callback, userdata));
Beispiel #19
0
 internal static bool SetObject(QiValue v, QiObject obj)
     => Convert.ToBoolean(qi_value_set_object(v.Handle, obj.Handle));
Beispiel #20
0
 internal static QiFuture GetProperty(QiObject obj, string pname)
 => new QiFuture(qi_object_get_property(obj.Handle, pname));
 internal static QiFuture RegisterService(QiSession session, string name, QiObject obj)
     => new QiFuture(qi_session_register_service(session.Handle, name, obj.Handle));
Beispiel #22
0
 internal static QiFuture RegisterService(QiSession session, string name, QiObject obj)
 => new QiFuture(qi_session_register_service(session.Handle, name, obj.Handle));
Beispiel #23
0
 internal static bool SetObject(QiValue v, QiObject obj)
 => Convert.ToBoolean(qi_value_set_object(v.Handle, obj.Handle));