Example #1
0
        /// <summary>
        /// Start Mama in the background. This method invokes Mama.start() in a separate thread.
        /// </summary>
        /// <param name="bridgeImpl">
        /// The bridge specific structure.
        /// </param>
        /// <param name="callback">
        /// The callback for asynchronous status.
        /// </param>
        public static void startBackground(MamaBridge bridgeImpl, MamaStartBackgroundCallback callback)
        {
            // Allocate a fowarder object
            mStartBackgroundCallbackForwarder = new StartBackgroundCallbackForwarder(callback);
            mStartBackgroundShimCallback      = new StartBackgroundCallbackForwarder.StartBackgroundCompleteDelegate(mStartBackgroundCallbackForwarder.onStartBackgroundCompleted);

            // Call the native function
            MamaWrapper.CheckResultCode(NativeMethods.mama_startBackground(bridgeImpl.NativeHandle, mStartBackgroundShimCallback));
        }
Example #2
0
 public static extern int mama_startBackground(IntPtr bridgeImpl, StartBackgroundCallbackForwarder.StartBackgroundCompleteDelegate callback);
Example #3
0
        /// <summary>
        /// Start Mama in the background. This method invokes Mama.start() in a separate thread.
        /// </summary>
        /// <param name="bridgeImpl">
        /// The bridge specific structure.
        /// </param>
        /// <param name="callback">
        /// The callback for asynchronous status.
        /// </param>
        public static void startBackground(MamaBridge bridgeImpl, MamaStartBackgroundCallback callback)
        {
            // Allocate a fowarder object
            mStartBackgroundCallbackForwarder = new StartBackgroundCallbackForwarder(callback);
            mStartBackgroundShimCallback = new StartBackgroundCallbackForwarder.StartBackgroundCompleteDelegate(mStartBackgroundCallbackForwarder.onStartBackgroundCompleted);

            // Call the native function
            MamaWrapper.CheckResultCode(NativeMethods.mama_startBackground(bridgeImpl.NativeHandle, mStartBackgroundShimCallback));
        }