/**
 * @(#)swbc-error.h
 *
 * 본 프로그램에 대한 저작권을 포함한 지적재산권은 삼성SDS(주)에 있으며,
 * 삼성SDS(주)가 명시적으로 허용하지 않은 사용, 복사, 변경, 제3자에의 공개,
 * 배포는 엄격히 금지되며, 삼성SDS(주)의 지적재산권 침해에 해당됩니다.
 * 
  Copyright (c) 2016 Samsung SDS Co., Ltd. All Rights neserved. Confidential.
 * 
 * All information including the intellectual and technical concepts contained
 * herein is, and remains the property of Samsung SDS Co. Ltd. Unauthorize une,
 * dissemination, or reproduction of this material is strictly forbidden unless
 * prior written permission is obtained from Samsung SDS Co. Ltd. 
 */

#ifndef HEADER_SWBC_ERROR_H
#define HEADER_SWBC_ERROR_H

#if defined(cplusplus)
extern "C"{
#endif

/**
 *
 *  ERROR NAME                            | ERROR CODES | ERROR Description
 *-----------------------------------------------------------------------------------------------------------------
 *  SWBC_SUCCESS                          |     0       |
 *  SWBC_FAILURE                          |     1       |
 *  SWBC_ERROR_PARAM_CTX_NULL             |     2       | "context parameter is NULL" 
 *  SWBC_ERROR_PARAM_KEY_NULL             |     3       | "key parameter is NULL"
 *  SWBC_ERROR_PARAM_IV_NULL              |     4       | "iv parameter is NULL"
 *  SWBC_ERROR_PARAM_OUT_NULL             |     5       | "output parameter is NULL"
 *  SWBC_ERROR_PARAM_IN_NULL              |     6       | "input parameter is NULL"
 *  SWBC_ERROR_PARAM_IN_LENGTH_INVALID    |     7       | "input length parameter is invalid
 *  SWBC_ERROR_PARAM_OUT_LENGTH_NULL      |     8       | "output length parameter is NULL"
 *  SWBC_ERROR_FILE_OPEN_FAILED           |     9       | "file open failed"
 *  SWBC_ERROR_FILE_READ_FAILED           |     10      | "file read failed"
 *  SWBC_ERROR_RESOURCE_UNLOADED          |     11      | "swbc table unloaded"
 *  SWBC_ERROR_CIPHER_MODE_INVALID        |     12      | "cipher mode is invalid"
 */

/* structure for error codes */
typedef enum
{
  SWBC_SUCCESS = 0,
  SWBC_FAILURE,
  SWBC_ERROR_PARAM_CTX_NULL,
  SWBC_ERROR_PARAM_KEY_NULL,
  SWBC_ERROR_PARAM_IV_NULL,
  SWBC_ERROR_PARAM_OUT_NULL,
  SWBC_ERROR_PARAM_IN_NULL,
  SWBC_ERROR_PARAM_IN_LENGTH_INVALID,
  SWBC_ERROR_PARAM_OUT_LENGTH_NULL,
  SWBC_ERROR_FILE_OPEN_FAILED,
  SWBC_ERROR_FILE_READ_FAILED,
  SWBC_ERROR_RESOURCE_UNLOADED,
  SWBC_ERROR_CIPHER_MODE_INVALID
} SWBC_ERROR;

#if defined(cplusplus)
}
#endif  /*  cplusplus */
#endif  /*  HEADER_SWBC_ERROR_H */
