Example #1
0
        public void AdvertiseMethod(string signature, Func <string, TupleValue, QiValue> method)
        {
            QiApiObjectMethod callback = (completeSignature, msg, ret, userData) =>
            {
                var result   = method(completeSignature, new TupleValue(new ValueSafeHandle(msg)));
                var retValue = new AnyValue(new ValueSafeHandle(ret));

                retValue.RawValue = result.RawValue;
                //QiValue.Swap(retValue, result);
            };

            uint id = ObjectBuilderNative.qi_object_builder_advertise_method(this._handle, signature, callback, IntPtr.Zero);
        }
Example #2
0
 public QiObject BuildObject()
 {
     return(new QiObject(ObjectBuilderNative.qi_object_builder_get_object(this._handle)));
 }
Example #3
0
 public void AdvertiseProperty(string name, string signature)
 {
     uint id = ObjectBuilderNative.qi_object_builder_advertise_property(this._handle, name, signature);
 }
Example #4
0
 public ObjectBuilder()
 {
     this._handle = ObjectBuilderNative.qi_object_builder_create();
 }
 protected override bool ReleaseHandle()
 {
     ObjectBuilderNative.qi_object_builder_destroy(this.handle);
     return(true);
 }