Esempio n. 1
0
 public static extern int usbmuxd_subscribe(UsbmuxdEventCallBack callback, System.IntPtr userData);
Esempio n. 2
0
        /// <summary>
        /// Subscribe a callback function to be called upon device add/remove events.
        /// This method can be called multiple times to register multiple callbacks
        /// since every subscription will have its own context (returned in the
        /// first parameter).
        /// </summary>
        /// <param name="context">
        /// A pointer to a usbmuxd_subscription_context_t that will be
        /// set upon creation of the subscription. The returned context must be
        /// passed to usbmuxd_events_unsubscribe() to unsubscribe the callback.
        /// </param>
        /// <param name="callback">
        /// A callback function that is executed when an event occurs.
        /// </param>
        /// <param name="user_data">
        /// Custom data passed on to the callback function. The data
        /// needs to be kept available until the callback function is unsubscribed.
        /// </param>
        /// <returns>
        /// 0 on success or a negative errno value.
        /// </returns>
        public virtual int usbmuxd_events_subscribe(out UsbmuxdSubscriptionContextHandle context, UsbmuxdEventCallBack callback, System.IntPtr userData)
        {
            int returnValue;

            returnValue = UsbmuxdNativeMethods.usbmuxd_events_subscribe(out context, callback, userData);
            context.Api = this.Parent;
            return(returnValue);
        }
Esempio n. 3
0
 /// <summary>
 /// Subscribe a callback function so that applications get to know about
 /// device add/remove events.
 /// </summary>
 /// <param name="callback">
 /// A callback function that is executed when an event occurs.
 /// </param>
 /// <returns>
 /// 0 on success or negative on error.
 /// </returns>
 public virtual int usbmuxd_subscribe(UsbmuxdEventCallBack callback, System.IntPtr userData)
 {
     return(UsbmuxdNativeMethods.usbmuxd_subscribe(callback, userData));
 }
Esempio n. 4
0
 public static extern int usbmuxd_events_subscribe(out UsbmuxdSubscriptionContextHandle context, UsbmuxdEventCallBack callback, System.IntPtr userData);