Ejemplo n.º 1
0
        // =====================================================================

        /// <inheritdoc />
        public void disconnect(Responder <object> responder, string scopeId)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString scpId = StringHelper.toNative(scopeId);

            NativeAPI.adl_disconnect(_voidRCallback,
                                     _platformHandle, saveResponder(responder),
                                     ref scpId);
        }
Ejemplo n.º 2
0
        // =====================================================================

        /// <inheritdoc />
        public void stopMeasuringStatistics(Responder <object> responder,
                                            string scopeId)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString nScopeId = StringHelper.toNative(scopeId);

            NativeAPI.adl_stop_measuring_stats(_voidRCallback, _platformHandle,
                                               saveResponder(responder), ref nScopeId);
        }
Ejemplo n.º 3
0
        // =====================================================================

        /// <inheritdoc />
        public void setAudioOutputDevice(Responder <object> responder,
                                         string deviceId)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString devId = StringHelper.toNative(deviceId);

            NativeAPI.adl_set_audio_output_device(
                _voidRCallback, _platformHandle,
                saveResponder(responder), ref devId);
        }
Ejemplo n.º 4
0
        // =====================================================================

        /// <inheritdoc />
        public void setVideoCaptureDevice(Responder <object> responder,
                                          string deviceId)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString devId = StringHelper.toNative(deviceId);

            NativeAPI.adl_set_video_capture_device(
                _voidRCallback, _platformHandle,
                saveResponder(responder), ref devId);
        }
Ejemplo n.º 5
0
        // =====================================================================

        /// <inheritdoc />
        public void sendMessage(Responder <object> responder, string scopeId,
                                string message, long targetUserId)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString scpId = StringHelper.toNative(scopeId);
            UIntPtr   msgSz =
                new UIntPtr((message != null) ? (uint)message.Length : 0u);

            NativeAPI.adl_send_message(_voidRCallback,
                                       _platformHandle, saveResponder(responder),
                                       ref scpId, message, msgSz, ref targetUserId);
        }
Ejemplo n.º 6
0
        // =====================================================================

        /// <inheritdoc />
        public void unpublish(Responder <object> responder, string scopeId,
                              MediaType mediaType)
        {
            if (!isPlatformInitialized <object>(responder))
            {
                return;
            }

            ADLString scpId   = StringHelper.toNative(scopeId);
            ADLString mediaTp =
                StringHelper.toNative(mediaType.StringValue);

            NativeAPI.adl_unpublish(_voidRCallback,
                                    _platformHandle, saveResponder(responder),
                                    ref scpId, ref mediaTp);
        }
Ejemplo n.º 7
0
        // =====================================================================

        /// <summary>
        ///
        /// </summary>
        /// <param name="opaque"></param>
        /// <param name="error"></param>
        /// <param name="str"></param>
        private void stringRCallback(IntPtr opaque,
                                     ref ADLError error,
                                     ref ADLString str)
        {
            Responder <string> responder = (Responder <string>)getResponder(
                (uint)opaque);

            try
            {
                if (error.err_code == 0)
                {
                    responder.resultHandler(str.body);
                }
                else
                {
                    responder.errHandler(error.err_code, error.err_message.body);
                }
            }
            catch (Exception) { }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Initializes the Cloudeo SDK with custom options.
        /// </summary>
        /// <param name="listener">
        /// Object that will process initialization state change notifications.
        /// This includes progress change and different states.
        /// </param>
        /// <param name="options">
        /// Additionall initialization options container.
        /// </param>
        public static void init(PlatformInitListener listener,
                                PlatformInitOptions options)
        {
            _listener = listener;

            //Perform platform initialization
            string sdkPath;

            if (options != null)
            {
                if (Path.IsPathRooted(options.sdkPath))
                {
                    sdkPath = options.sdkPath;
                }
                else
                {
                    sdkPath = Path.Combine(AssemblyDirectory, options.sdkPath);
                }
            }
            else
            {
                sdkPath = Path.Combine(AssemblyDirectory, DEFAULT_SDK_PATH);
            }

            SetDllDirectory(sdkPath);

            ADLString logicLibPath = new ADLString();

            logicLibPath.body   = Path.Combine(sdkPath, "libs");
            logicLibPath.length = (UInt32)sdkPath.Length;

            ADLInitOptions initOptions = new ADLInitOptions();

            initOptions.logicLibPath = logicLibPath;
            doInit(initOptions);
        }
 public static extern void adl_disconnect(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId);
Ejemplo n.º 10
0
 public static extern void adl_stop_measuring_stats(adl_void_rclbck_t rclbck, ADLH handle,
                                                    IntPtr opaque, ref ADLString scopeId);
Ejemplo n.º 11
0
 public static extern void adl_send_message(adl_void_rclbck_t rclbck,
                                            ADLH handle, IntPtr opaque, ref ADLString scopeId,
                                            [MarshalAs(UnmanagedType.LPStr)] string msgBody,
                                            UIntPtr msgSize, ref Int64 recipientId);
Ejemplo n.º 12
0
 public static extern void adl_unpublish(adl_void_rclbck_t rclbck,
                                         ADLH handle, IntPtr opaque, ref ADLString scopeId,
                                         ref ADLString what);
Ejemplo n.º 13
0
 public static extern void adl_stop_measuring_stats(adl_void_rclbck_t rclbck, ADLH handle, 
     IntPtr opaque, ref ADLString scopeId);
Ejemplo n.º 14
0
 public static extern void adl_set_audio_output_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
Ejemplo n.º 15
0
 public static extern void adl_set_video_capture_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
Ejemplo n.º 16
0
 public static extern void adl_publish(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId,
     ref ADLString what, ref ADLMediaPublishOptions options);
Ejemplo n.º 17
0
 public static extern void adl_send_message(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId,
     [MarshalAs(UnmanagedType.LPStr)]string msgBody,
     UIntPtr msgSize, ref Int64 recipientId);
Ejemplo n.º 18
0
 public static extern void adl_set_audio_output_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
Ejemplo n.º 19
0
 public static extern void adl_set_video_capture_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
Ejemplo n.º 20
0
 public static extern void adl_disconnect(adl_void_rclbck_t rclbck,
                                          ADLH handle, IntPtr opaque, ref ADLString scopeId);
Ejemplo n.º 21
0
 public static extern void adl_unpublish(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId,
     ref ADLString what);
Ejemplo n.º 22
0
 public static extern void adl_publish(adl_void_rclbck_t rclbck,
                                       ADLH handle, IntPtr opaque, ref ADLString scopeId,
                                       ref ADLString what, ref ADLMediaPublishOptions options);