GoWebScan API
GoWebScanPipeTask.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanPipeTask.h
3 * @brief Declares the GoWebScanPipeTask class
4 *
5 * @internal
6 * Copyright (C) 2017-2026 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_WEB_SCAN_PIPE_TASK_H
11 #define GO_WEB_SCAN_PIPE_TASK_H
12 
14 
15 /**
16 * @class GoWebScanPipeTask
17 * @extends kObject
18 * @ingroup GoWebScanSdk-Pipe
19 * @brief Represents a processing task for the GoWebScanPipe class.
20 * Each GoWebScanPipeTask maintains a FIFO queue of messages to process (jobs), and submits jobs to the GoWebScanPipe for execution.
21 * Each GoWebScanPipeTask has at most one pending job submitted to the Pipe for execution at any given time. Multiple jobs associated
22 * with a single task cannot be run in parallel (tasks are assumed to have non-thread-safe state). Each GoWebScanPipeTask
23 * is associated with a particular stage (processing priority); multiple tasks can belong to the same stage. Messages are processed
24 * through an execution handler provided to the GoWebScanPipeTask.
25 */
26 typedef kObject GoWebScanPipeTask;
27 
28 // Forward declarations
29 typedef kObject GoWebScanPipe;
31 
32 /** Defines the signature for the job execution handler. */
34 
35 /**
36 * Sets the callback function that is used to execute processing jobs
37 *
38 * @public @memberof GoWebScanPipeTask
39 * @param task GoWebScanPipeTask object.
40 * @param function Processing execution callback function
41 * @param receiver Receiver argument for callback.
42 * @return Operation status.
43 */
45 
46 /**
47 * Gets the stage (processing priority) of a task
48 *
49 * @public @memberof GoWebScanPipeTask
50 * @param task GoWebScanPipeTask object.
51 * @return Stage.
52 */
54 
55 /**
56 * Sets the stage (processing priority) of a task
57 *
58 * @public @memberof GoWebScanPipeTask
59 * @param task GoWebScanPipeTask object.
60 * @param stage Stage.
61 * @return Operation status.
62 */
64 
65 /**
66 * Adds a message to the processing queue. Dequeues a message at the end of the queue to submit to the pipe
67 * for scheduling if no other job is currently pending.
68 *
69 * @public @memberof GoWebScanPipeTask
70 * @param task GoWebScanPipeTask object.
71 * @param message Message to enqueue.
72 * @return Operation status.
73 */
75 
76 /**
77 * Gets the maximum capacity of the message queue
78 *
79 * @public @memberof GoWebScanPipeTask
80 * @param task GoWebScanPipeTask object.
81 * @return Maximum queue capacity.
82 */
84 
85 /**
86 * Sets the maximum capacity of the message queue
87 *
88 * @public @memberof GoWebScanPipeTask
89 * @param task GoWebScanPipeTask object.
90 * @param capacity Maximum queue capacity.
91 * @return Operation status.
92 */
94 
95 #include <GoWebScanSdk/GoWebScanPipeTask.x.h>
96 
97 #endif
98 
kStatus GoWebScanPipeTask_SetMsgCapacity(GoWebScanPipeTask task, kSize capacity)
Sets the maximum capacity of the message queue.
kStatus GoWebScanPipeTask_SetStage(GoWebScanPipeTask task, k32u stage)
Sets the stage (processing priority) of a task.
Essential GoWebScan declarations.
kStatus GoWebScanPipeTask_Send(GoWebScanPipeTask task, GoWebScanPipeMsg message)
Adds a message to the processing queue.
kStatus(kCall * GoWebScanPipeTaskExecuteFx)(GoWebScanPipeTask task, GoWebScanPipeMsg msg)
Defines the signature for the job execution handler.
Definition: GoWebScanPipeTask.h:33
Represents a processing task for the GoWebScanPipe class. Each GoWebScanPipeTask maintains a FIFO que...
k32u GoWebScanPipeTask_Stage(GoWebScanPipeTask task)
Gets the stage (processing priority) of a task.
kStatus GoWebScanPipeTask_SetExecuteHandler(GoWebScanPipeTask task, GoWebScanPipeTaskExecuteFx function, kPointer receiver)
Sets the callback function that is used to execute processing jobs.
kSize GoWebScanPipeTask_MsgCapacity(GoWebScanPipeTask task)
Gets the maximum capacity of the message queue.
Represents a pipeline to run sequences of processing tasks concurrently. A GoWebScanPipe object coord...
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...