Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 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 | |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 17 | // Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 18 | |
| 19 | /* |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 20 | * rs_io.rsh: Input/Output Functions |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 21 | * |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 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. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 25 | */ |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 26 | |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 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: |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 36 | * a: Allocation to work on. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 37 | */ |
| 38 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 39 | extern 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: |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 49 | * a: Allocation to work on. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 50 | */ |
| 51 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 52 | extern void __attribute__((overloadable)) |
| 53 | rsAllocationIoSend(rs_allocation a); |
| 54 | #endif |
| 55 | |
| 56 | /* |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 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. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 70 | */ |
| 71 | extern bool __attribute__((overloadable)) |
| 72 | rsSendToClient(int cmdID); |
| 73 | |
| 74 | extern bool __attribute__((overloadable)) |
| 75 | rsSendToClient(int cmdID, const void* data, uint len); |
| 76 | |
| 77 | /* |
Stephen Hines | 3f86823 | 2015-04-10 09:22:19 -0700 | [diff] [blame] | 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. |
Jean-Luc Brouillet | 4fbd903 | 2015-04-02 14:46:27 -0700 | [diff] [blame] | 92 | */ |
| 93 | extern void __attribute__((overloadable)) |
| 94 | rsSendToClientBlocking(int cmdID); |
| 95 | |
| 96 | extern void __attribute__((overloadable)) |
| 97 | rsSendToClientBlocking(int cmdID, const void* data, uint len); |
| 98 | |
| 99 | #endif // RENDERSCRIPT_RS_IO_RSH |