1/* 2 * Copyright 2010-2013 Intel Corporation. 3 * 4 * This library is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published 6 * by the Free Software Foundation, version 2.1. 7 * 8 * This library is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with this library; if not, write to the Free Software 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 * 02110-1301 USA. 17 * 18 * Disclaimer: The codes contained in these modules may be specific 19 * to the Intel Software Development Platform codenamed Knights Ferry, 20 * and the Intel product codenamed Knights Corner, and are not backward 21 * compatible with other Intel products. Additionally, Intel will NOT 22 * support the codes or instruction set in future products. 23 * 24 * Intel offers no warranty of any kind regarding the code. This code is 25 * licensed on an "AS IS" basis and Intel is not obligated to provide 26 * any support, assistance, installation, training, or other services 27 * of any kind. Intel is also not obligated to provide any updates, 28 * enhancements or extensions. Intel specifically disclaims any warranty 29 * of merchantability, non-infringement, fitness for any particular 30 * purpose, and any other warranty. 31 * 32 * Further, Intel disclaims all liability of any kind, including but 33 * not limited to liability for infringement of any proprietary rights, 34 * relating to the use of the code, even if Intel is notified of the 35 * possibility of such liability. Except as expressly stated in an Intel 36 * license agreement provided with this code and agreed upon with Intel, 37 * no license, express or implied, by estoppel or otherwise, to any 38 * intellectual property rights is granted herein. 39 */ 40 41#ifndef _COIRESULT_COMMON_H 42#define _COIRESULT_COMMON_H 43 44/** @ingroup COIResult 45 * @addtogroup COIResultCommon 46@{ 47 48* @file common/COIResult_common.h 49* Result codes and definitions. */ 50 51#include "../common/COITypes_common.h" 52 53#ifdef __cplusplus 54extern "C" { 55#endif 56 57typedef enum COIRESULT 58{ 59 COI_SUCCESS = 0, ///< The function succeeded without error. 60 COI_ERROR, ///< Unspecified error. 61 COI_NOT_INITIALIZED, ///< The function was called before the 62 ///< system was initialized. 63 COI_ALREADY_INITIALIZED, ///< The function was called after the 64 ///< system was initialized. 65 COI_ALREADY_EXISTS, ///< Cannot complete the request due to 66 ///< the existence of a similar object. 67 COI_DOES_NOT_EXIST, ///< The specified object was not found. 68 COI_INVALID_POINTER, ///< One of the provided addresses was not 69 ///< valid. 70 COI_OUT_OF_RANGE, ///< One of the arguments contains a value 71 ///< that is invalid. 72 COI_NOT_SUPPORTED, ///< This function is not currently 73 ///< supported as used. 74 COI_TIME_OUT_REACHED, ///< The specified time out caused the 75 ///< function to abort. 76 COI_MEMORY_OVERLAP, ///< The source and destination range 77 ///< specified overlaps for the same 78 ///< buffer. 79 COI_ARGUMENT_MISMATCH, ///< The specified arguments are not 80 ///< compatible. 81 COI_SIZE_MISMATCH, ///< The specified size does not match the 82 ///< expected size. 83 COI_OUT_OF_MEMORY, ///< The function was unable to allocate 84 ///< the required memory. 85 COI_INVALID_HANDLE, ///< One of the provided handles was not 86 ///< valid. 87 COI_RETRY, ///< This function currently can't 88 ///< complete, but might be able to later. 89 COI_RESOURCE_EXHAUSTED, ///< The resource was not large enough. 90 COI_ALREADY_LOCKED, ///< The object was expected to be 91 ///< unlocked, but was locked. 92 COI_NOT_LOCKED, ///< The object was expected to be locked, 93 ///< but was unlocked. 94 COI_MISSING_DEPENDENCY, ///< One or more dependent components 95 ///< could not be found. 96 COI_UNDEFINED_SYMBOL, ///< One or more symbols the component 97 ///< required was not defined in any 98 ///< library. 99 COI_PENDING, ///< Operation is not finished 100 COI_BINARY_AND_HARDWARE_MISMATCH, ///< A specified binary will not run on 101 ///< the specified hardware. 102 COI_PROCESS_DIED, 103 COI_INVALID_FILE, ///< The file is invalid for its intended 104 ///< usage in the function. 105 COI_EVENT_CANCELED, ///< Event wait on a user event that 106 ///< was unregistered or is being 107 ///< unregistered returns 108 ///< COI_EVENT_CANCELED. 109 COI_VERSION_MISMATCH, ///< The version of Intel(R) Coprocessor 110 ///< Offload Infrastructure on the host 111 ///< is not compatible with the version 112 ///< on the device. 113 COI_BAD_PORT, ///< The port that the host is set to 114 ///< connect to is invalid. 115 COI_AUTHENTICATION_FAILURE, ///< The daemon was unable to authenticate 116 ///< the user that requested an engine. 117 ///< Only reported if daemon is set up for 118 ///< authorization. 119 COI_NUM_RESULTS ///< Reserved, do not use. 120} 121COIRESULT; 122 123////////////////////////////////////////////////////////////////////////////// 124/// 125/// Returns the string version of the passed in COIRESULT. Thus if 126/// COI_RETRY is passed in, this function returns the string "COI_RETRY". If 127/// the error code passed ins is not valid then "COI_ERROR" will be returned. 128/// 129/// @param in_ResultCode 130/// [in] COIRESULT code to return the string version of. 131/// 132/// @return String version of the passed in COIRESULT code. 133/// 134COIACCESSAPI 135const char* 136COIResultGetName( 137 COIRESULT in_ResultCode); 138 139#ifdef __cplusplus 140} /* extern "C" */ 141#endif 142 143#endif /* _COIRESULT_COMMON_H */ 144 145/*! @} */ 146