コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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) { }
        }
コード例 #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);
        }
コード例 #9
0
 public static extern void adl_disconnect(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId);
コード例 #10
0
 public static extern void adl_stop_measuring_stats(adl_void_rclbck_t rclbck, ADLH handle,
                                                    IntPtr opaque, ref ADLString scopeId);
コード例 #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);
コード例 #12
0
 public static extern void adl_unpublish(adl_void_rclbck_t rclbck,
                                         ADLH handle, IntPtr opaque, ref ADLString scopeId,
                                         ref ADLString what);
コード例 #13
0
 public static extern void adl_stop_measuring_stats(adl_void_rclbck_t rclbck, ADLH handle, 
     IntPtr opaque, ref ADLString scopeId);
コード例 #14
0
 public static extern void adl_set_audio_output_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
コード例 #15
0
 public static extern void adl_set_video_capture_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
コード例 #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);
コード例 #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);
コード例 #18
0
 public static extern void adl_set_audio_output_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
コード例 #19
0
 public static extern void adl_set_video_capture_device(
     adl_void_rclbck_t rclbck, ADLH handle, IntPtr opaque,
     ref ADLString device_id);
コード例 #20
0
 public static extern void adl_disconnect(adl_void_rclbck_t rclbck,
                                          ADLH handle, IntPtr opaque, ref ADLString scopeId);
コード例 #21
0
 public static extern void adl_unpublish(adl_void_rclbck_t rclbck,
     ADLH handle, IntPtr opaque, ref ADLString scopeId,
     ref ADLString what);
コード例 #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);