Example #1
0
 private static extern bool imageflow_job_get_output_buffer_by_id(ContextPointer context, JobPointer job, int io_id, [Out] out IntPtr result_buffer, [Out] out long result_buffer_length);
Example #2
0
 public static extern JobIoPointer imageflow_job_get_io(ContextPointer context, JobPointer job, int placeholder_id);
Example #3
0
        /// <summary>
        ///		Provides access to the underlying buffer for the given <see cref="JobPointer"/>.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="job"></param>
        /// <param name="io_id"></param>
        /// <param name="resultBuffer"></param>
        /// <returns></returns>
        /// <exception cref="BufferOverflowException"></exception>
        public static bool imageflow_job_get_output_buffer_by_id(ContextPointer context, JobPointer job, int io_id, out JsonReader resultBuffer)
        {
            IntPtr resultBufferPointer;
            long   bufferSize;
            bool   @return = imageflow_job_get_output_buffer_by_id(context, job, io_id, out resultBufferPointer, out bufferSize);

            if (!@return)
            {
                resultBuffer = null;
                return(false);
            }
#pragma warning disable HeapAnalyzerExplicitNewObjectRule // Explicit new reference type allocation
            resultBuffer = new UnmanagedJsonReader(resultBufferPointer, bufferSize);
#pragma warning restore HeapAnalyzerExplicitNewObjectRule // Explicit new reference type allocation
            return(true);
        }
Example #4
0
 private static extern JsonResponsePointer imageflow_job_send_json(ContextPointer context, JobPointer job, [MarshalAs(UnmanagedType.LPStr)][In] string method, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)][In] byte[] json_buffer, IntPtr json_buffer_size);
Example #5
0
 /// <summary>
 ///		Sends a JSON message to the <see cref="JobPointer"/>.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="job">The job.</param>
 /// <param name="method">Determines which code path will be used to process the provided JSON data and compose a response.</param>
 /// <param name="json">The json.</param>
 /// <returns><see cref="JsonResponsePointer.Zero"/> on failure.</returns>
 public static JsonResponsePointer imageflow_job_send_json(ContextPointer context, JobPointer job, string method, string json)
 {
     byte[] json_buffer = Encoding.UTF8.GetBytes(json);
     return(imageflow_job_send_json(context, job, method, json_buffer, new IntPtr(json_buffer.Length)));
 }
Example #6
0
 public static extern bool imageflow_job_destroy(ContextPointer context, JobPointer job);
Example #7
0
 public static extern bool imageflow_job_add_io(ContextPointer context, JobPointer job, IntPtr io, int placeholder_id, Direction direction);