BltErrors.h

Go to the documentation of this file.
00001 /*****************************************************************
00002 |
00003 |   BlueTune - Error Constants
00004 |
00005 |   (c) 2002-2006 Gilles Boccon-Gibod
00006 |   Author: Gilles Boccon-Gibod (bok@bok.net)
00007 |
00008  ****************************************************************/
00013 #ifndef _BLT_ERRORS_H_
00014 #define _BLT_ERRORS_H_
00015 
00016 /*----------------------------------------------------------------------
00017 |    error codes
00018 +---------------------------------------------------------------------*/
00019 #define BLT_SUCCESS      0
00020 #define BLT_FAILURE      (-1)
00021 
00022 #define BLT_FAILED(result)       ((result) != BLT_SUCCESS)
00023 #define BLT_SUCCEEDED(result)    ((result) == BLT_SUCCESS)
00024 
00025 /* import some ATX error codes */
00026 #define BLT_ERROR_OUT_OF_MEMORY         ATX_ERROR_OUT_OF_MEMORY  
00027 #define BLT_ERROR_BASE_GENERAL          ATX_ERROR_BASE_GENERAL
00028 #define BLT_ERROR_OUT_OF_MEMORY         ATX_ERROR_OUT_OF_MEMORY
00029 #define BLT_ERROR_OUT_OF_RESOURCES      ATX_ERROR_OUT_OF_RESOURCES
00030 #define BLT_ERROR_INTERNAL              ATX_ERROR_INTERNAL
00031 #define BLT_ERROR_INVALID_PARAMETERS    ATX_ERROR_INVALID_PARAMETERS
00032 #define BLT_ERROR_INVALID_STATE         ATX_ERROR_INVALID_STATE
00033 #define BLT_ERROR_NOT_IMPLEMENTED       ATX_ERROR_NOT_IMPLEMENTED
00034 #define BLT_ERROR_OUT_OF_RANGE          ATX_ERROR_OUT_OF_RANGE
00035 #define BLT_ERROR_NO_SUCH_FILE          ATX_ERROR_NO_SUCH_FILE
00036 #define BLT_ERROR_ACCESS_DENIED         ATX_ERROR_ACCESS_DENIED
00037 #define BLT_ERROR_BASE_DEVICE           ATX_ERROR_BASE_DEVICE
00038 #define BLT_ERROR_DEVICE_BUSY           ATX_ERROR_DEVICE_BUSY
00039 #define BLT_ERROR_NO_SUCH_DEVICE        ATX_ERROR_NO_SUCH_DEVICE
00040 #define BLT_ERROR_OPEN_FAILED           ATX_ERROR_OPEN_FAILED
00041 #define BLT_ERROR_EOS                   ATX_ERROR_EOS
00042 #define BLT_ERROR_INVALID_INTERFACE     ATX_ERROR_INVALID_INTERFACE
00043 #define BLT_ERROR_NO_MEDIUM             ATX_ERROR_NO_MEDIUM
00044 
00045 /* Error base */
00046 #ifndef BLT_ERROR_BASE               
00047 #define BLT_ERROR_BASE                (-40000)
00048 #endif
00049 
00050 /* Generic errors */
00051 #define BLT_ERROR_BASE_GENERIC        (BLT_ERROR_BASE-0)
00052 #define BLT_ERROR_PROTOCOL_FAILURE    (BLT_ERROR_BASE_GENERIC-0)
00053 #define BLT_ERROR_NOT_SUPPORTED       (BLT_ERROR_BASE_GENERIC-1)
00054 
00055 /* Media errors */
00056 #define BLT_ERROR_BASE_MEDIA          (BLT_ERROR_BASE-100)
00057 
00058 /* Media Node Errors */
00059 #define BLT_ERROR_BASE_MEDIA_NODE     (BLT_ERROR_BASE-200)
00060 
00061 /* Media Port errors */
00062 #define BLT_ERROR_BASE_MEDIA_PORT     (BLT_ERROR_BASE-300)
00063 
00064 /* Stream Errors */
00065 #define BLT_ERROR_BASE_STREAM         (BLT_ERROR_BASE-400)
00066 
00067 /* Registry errors */
00068 #define BLT_ERROR_BASE_REGISTRY       (BLT_ERROR_BASE-500)
00069 
00070 /* Module errors */
00071 #define BLT_ERROR_BASE_MODULE         (BLT_ERROR_BASE-600)
00072 
00073 #endif /* _BLT_ERRORS_H_ */