error-types.h (4187B)
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20#ifndef _GUAC_ERROR_TYPES_H 21#define _GUAC_ERROR_TYPES_H 22 23/** 24 * Type definitions related to return values and errors. 25 * 26 * @file error-types.h 27 */ 28 29/** 30 * Return codes shared by all Guacamole functions which can fail. 31 */ 32typedef enum guac_status { 33 34 /** 35 * No errors occurred and the operation was successful. 36 */ 37 GUAC_STATUS_SUCCESS = 0, 38 39 /** 40 * Insufficient memory to complete the operation. 41 */ 42 GUAC_STATUS_NO_MEMORY, 43 44 /** 45 * The resource associated with the operation can no longer be used as it 46 * has reached the end of its normal lifecycle. 47 */ 48 GUAC_STATUS_CLOSED, 49 50 /** 51 * Time ran out before the operation could complete. 52 */ 53 GUAC_STATUS_TIMEOUT, 54 55 /** 56 * An error occurred, and further information about the error is already 57 * stored in errno. 58 */ 59 GUAC_STATUS_SEE_ERRNO, 60 61 /** 62 * An I/O error prevented the operation from succeeding. 63 */ 64 GUAC_STATUS_IO_ERROR, 65 66 /** 67 * The operation could not be performed because an invalid argument was 68 * given. 69 */ 70 GUAC_STATUS_INVALID_ARGUMENT, 71 72 /** 73 * The operation failed due to a bug in the software or a serious system 74 * problem. 75 */ 76 GUAC_STATUS_INTERNAL_ERROR, 77 78 /** 79 * Insufficient space remaining to complete the operation. 80 */ 81 GUAC_STATUS_NO_SPACE, 82 83 /** 84 * The operation failed because the input provided is too large. 85 */ 86 GUAC_STATUS_INPUT_TOO_LARGE, 87 88 /** 89 * The operation failed because the result could not be stored in the 90 * space provided. 91 */ 92 GUAC_STATUS_RESULT_TOO_LARGE, 93 94 /** 95 * Permission was denied to perform the operation. 96 */ 97 GUAC_STATUS_PERMISSION_DENIED, 98 99 /** 100 * The operation could not be performed because associated resources are 101 * busy. 102 */ 103 GUAC_STATUS_BUSY, 104 105 /** 106 * The operation could not be performed because, while the associated 107 * resources do exist, they are not currently available for use. 108 */ 109 GUAC_STATUS_NOT_AVAILABLE, 110 111 /** 112 * The requested operation is not supported. 113 */ 114 GUAC_STATUS_NOT_SUPPORTED, 115 116 /** 117 * Support for the requested operation is not yet implemented. 118 */ 119 GUAC_STATUS_NOT_INPLEMENTED, 120 121 /** 122 * The operation is temporarily unable to be performed, but may succeed if 123 * reattempted. 124 */ 125 GUAC_STATUS_TRY_AGAIN, 126 127 /** 128 * A violation of the Guacamole protocol occurred. 129 */ 130 GUAC_STATUS_PROTOCOL_ERROR, 131 132 /** 133 * The operation could not be performed because the requested resources do 134 * not exist. 135 */ 136 GUAC_STATUS_NOT_FOUND, 137 138 /** 139 * The operation was canceled prior to completion. 140 */ 141 GUAC_STATUS_CANCELED, 142 143 /** 144 * The operation could not be performed because input values are outside 145 * the allowed range. 146 */ 147 GUAC_STATUS_OUT_OF_RANGE, 148 149 /** 150 * The operation could not be performed because access to an underlying 151 * resource is explicitly not allowed, though not necessarily due to 152 * permissions. 153 */ 154 GUAC_STATUS_REFUSED, 155 156 /** 157 * The operation failed because too many resources are already in use. 158 */ 159 GUAC_STATUS_TOO_MANY, 160 161 /** 162 * The operation was not performed because it would otherwise block. 163 */ 164 GUAC_STATUS_WOULD_BLOCK 165 166} guac_status; 167 168#endif 169