1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// Don't edit this file!  It is auto-generated by frameworks/rs/api/generate.sh.
18
19/*
20 * rs_io.rsh: Input/Output Functions
21 *
22 * These functions are used to:
23 * - Send information to the Java client, and
24 * - Send the processed allocation or receive the next allocation to process.
25 */
26
27#ifndef RENDERSCRIPT_RS_IO_RSH
28#define RENDERSCRIPT_RS_IO_RSH
29
30/*
31 * rsAllocationIoReceive: Receive new content from the queue
32 *
33 * Receive a new set of contents from the queue.
34 *
35 * Parameters:
36 *   a: Allocation to work on.
37 */
38#if (defined(RS_VERSION) && (RS_VERSION >= 16))
39extern void __attribute__((overloadable))
40    rsAllocationIoReceive(rs_allocation a);
41#endif
42
43/*
44 * rsAllocationIoSend: Send new content to the queue
45 *
46 * Send the contents of the Allocation to the queue.
47 *
48 * Parameters:
49 *   a: Allocation to work on.
50 */
51#if (defined(RS_VERSION) && (RS_VERSION >= 16))
52extern void __attribute__((overloadable))
53    rsAllocationIoSend(rs_allocation a);
54#endif
55
56/*
57 * rsSendToClient: Send a message to the client, non-blocking
58 *
59 * Sends a message back to the client.  This call does not block.
60 * It returns true if the message was sent and false if the
61 * message queue is full.
62 *
63 * A message ID is required.  The data payload is optional.
64 *
65 * See RenderScript.RSMessageHandler.
66 *
67 * Parameters:
68 *   data: Application specific data.
69 *   len: Length of the data, in bytes.
70 */
71extern bool __attribute__((overloadable))
72    rsSendToClient(int cmdID);
73
74extern bool __attribute__((overloadable))
75    rsSendToClient(int cmdID, const void* data, uint len);
76
77/*
78 * rsSendToClientBlocking: Send a message to the client, blocking
79 *
80 * Sends a message back to the client.  This function will block
81 * until there is room on the message queue for this message.
82 * This function may return before the message was delivered and
83 * processed by the client.
84 *
85 * A message ID is required.  The data payload is optional.
86 *
87 * See RenderScript.RSMessageHandler.
88 *
89 * Parameters:
90 *   data: Application specific data.
91 *   len: Length of the data, in bytes.
92 */
93extern void __attribute__((overloadable))
94    rsSendToClientBlocking(int cmdID);
95
96extern void __attribute__((overloadable))
97    rsSendToClientBlocking(int cmdID, const void* data, uint len);
98
99#endif // RENDERSCRIPT_RS_IO_RSH
100