Changeset 4870:ad85e19b3219 in roaraudio


Ignore:
Timestamp:
04/26/11 10:15:51 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Added new error codes

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4868 r4870  
     1v. 0.4beta6 - ? 
     2        * Added new error codes. 
     3 
    14v. 0.4beta5 - Tue Apr 26 2011 08:42 CEST 
    25        Prereleases: 0: Sun Apr 17 2011 20:40 CEST 
  • include/roaraudio/error.h

    r4708 r4870  
    4545#define ROAR_ERROR_NOMEM       12 /* Not enough space */ 
    4646#define ROAR_ERROR_INVAL       13 /* Invalid argument */ 
     47#define ROAR_ERROR_ALREADY     14 /* Connection already in progress */ 
     48#define ROAR_ERROR_BADRQC      15 /* Invalid request code */ 
     49#define ROAR_ERROR_DOM         16 /* Mathematics argument out of domain of function */ 
     50#define ROAR_ERROR_EXIST       17 /* File or object exists */ 
     51#define ROAR_ERROR_FAULT       18 /* Bad address */ 
     52#define ROAR_ERROR_IO          19 /* I/O-Error */ 
     53#define ROAR_ERROR_KEYEXPIRED  20 /* Key has expired */ 
     54#define ROAR_ERROR_KEYREJECTED 21 /* Key was rejected by service */ 
     55#define ROAR_ERROR_LOOP        22 /* Too many recursions */ 
     56#define ROAR_ERROR_MFILE       23 /* Too many open files or objects */ 
     57#define ROAR_ERROR_NAMETOOLONG 24 /* File or object name too long */ 
     58#define ROAR_ERROR_NODATA      25 /* No message is available on the read queue */ 
     59#define ROAR_ERROR_NODEV       26 /* No such device */ 
     60#define ROAR_ERROR_NODRV       27 /* No such driver */ 
     61#define ROAR_ERROR_NOSPC       38 /* No space left on device */ 
     62#define ROAR_ERROR_TYPEMM      39 /* Type missmatch. Object of diffrent type required */ 
     63#define ROAR_ERROR_NORSYS      40 /* Feature not implemented by remote end */ 
     64#define ROAR_ERROR_NOTCONN     41 /* Socket or object not connected */ 
     65#define ROAR_ERROR_PROTONOSUP  42 /* Protocol not supported */ 
     66#define ROAR_ERROR_RIO         43 /* Remote I/O Error */ 
     67#define ROAR_ERROR_RO          45 /* File or object is read only */ 
     68#define ROAR_ERROR_TIMEDOUT    46 /* Connection timed out */ 
     69#define ROAR_ERROR_AGAIN       47 /* Resource temporarily unavailable */ 
     70#define ROAR_ERROR_NOISE       48 /* Line too noisy */ 
     71#define ROAR_ERROR_LINKDOWN    49 /* Physical or logical link down */ 
    4772 
    4873#endif 
  • libroar/error.c

    r4869 r4870  
    156156  case EINVAL:       _roar_errno = ROAR_ERROR_INVAL; break; 
    157157#endif 
     158#ifdef EALREADY 
     159  case EALREADY:     _roar_errno = ROAR_ERROR_ALREADY; break; 
     160#endif 
     161#ifdef EBADRQC 
     162  case EBADRQC:      _roar_errno = ROAR_ERROR_BADRQC; break; 
     163#endif 
     164#ifdef EDOM 
     165  case EDOM:         _roar_errno = ROAR_ERROR_DOM; break; 
     166#endif 
     167#ifdef EEXIST 
     168  case EEXIST:       _roar_errno = ROAR_ERROR_EXIST; break; 
     169#endif 
     170#ifdef EFAULT 
     171  case EFAULT:       _roar_errno = ROAR_ERROR_FAULT; break; 
     172#endif 
     173#ifdef EIO 
     174  case EIO:          _roar_errno = ROAR_ERROR_IO; break; 
     175#endif 
     176#ifdef EKEYEXPIRED 
     177  case EKEYEXPIRED:  _roar_errno = ROAR_ERROR_KEYEXPIRED; break; 
     178#endif 
     179#ifdef EKEYREJECTED 
     180  case EKEYREJECTED: _roar_errno = ROAR_ERROR_KEYREJECTED; break; 
     181#endif 
     182#ifdef ELOOP 
     183  case ELOOP:        _roar_errno = ROAR_ERROR_LOOP; break; 
     184#endif 
     185#ifdef EMFILE 
     186  case EMFILE:       _roar_errno = ROAR_ERROR_MFILE; break; 
     187#endif 
     188#ifdef ENAMETOOLONG 
     189  case ENAMETOOLONG: _roar_errno = ROAR_ERROR_NAMETOOLONG; break; 
     190#endif 
     191#ifdef ENODATA 
     192  case ENODATA:      _roar_errno = ROAR_ERROR_NODATA; break; 
     193#endif 
     194#ifdef ENODEV 
     195  case ENODEV:       _roar_errno = ROAR_ERROR_NODEV; break; 
     196#endif 
     197#ifdef ENOSPC 
     198  case ENOSPC:       _roar_errno = ROAR_ERROR_NOSPC; break; 
     199#endif 
     200#ifdef ENOTCONN 
     201  case ENOTCONN:     _roar_errno = ROAR_ERROR_NOTCONN; break; 
     202#endif 
     203#ifdef EPROTONOSUPPORT 
     204  case EPROTONOSUPPORT: _roar_errno = ROAR_ERROR_PROTONOSUP; break; 
     205#endif 
     206#ifdef EROFS 
     207  case EROFS:        _roar_errno = ROAR_ERROR_RO; break; 
     208#endif 
     209#ifdef ETIMEDOUT 
     210  case ETIMEDOUT:    _roar_errno = ROAR_ERROR_TIMEDOUT; break; 
     211#endif 
     212#ifdef EAGAIN 
     213  case EAGAIN:       _roar_errno = ROAR_ERROR_AGAIN; break; 
     214#endif 
     215#ifdef ENETDOWN 
     216  case ENETDOWN:     _roar_errno = ROAR_ERROR_LINKDOWN; break; 
     217#endif 
    158218  default: 
    159219    _roar_errno = ROAR_ERROR_UNKNOWN; 
     
    233293  case ROAR_ERROR_INVAL: 
    234294    errno = EINVAL; 
     295   break; 
     296#endif 
     297#ifdef EALREADY 
     298  case ROAR_ERROR_ALREADY: 
     299    errno = EALREADY; 
     300   break; 
     301#endif 
     302#ifdef EBADRQC 
     303  case ROAR_ERROR_BADRQC: 
     304    errno = EBADRQC; 
     305   break; 
     306#endif 
     307#ifdef EDOM 
     308  case ROAR_ERROR_DOM: 
     309    errno = EDOM; 
     310   break; 
     311#endif 
     312#ifdef EEXIST 
     313  case ROAR_ERROR_EXIST: 
     314    errno = EEXIST; 
     315   break; 
     316#endif 
     317#ifdef EFAULT 
     318  case ROAR_ERROR_FAULT: 
     319    errno = EFAULT; 
     320   break; 
     321#endif 
     322#ifdef EIO 
     323  case ROAR_ERROR_IO: 
     324  case ROAR_ERROR_RIO: 
     325    errno = EIO; 
     326   break; 
     327#endif 
     328#ifdef EKEYEXPIRED 
     329  case ROAR_ERROR_KEYEXPIRED: 
     330    errno = EKEYEXPIRED; 
     331   break; 
     332#endif 
     333#ifdef EKEYREJECTED 
     334  case ROAR_ERROR_KEYREJECTED: 
     335    errno = EKEYREJECTED; 
     336   break; 
     337#endif 
     338#ifdef ELOOP 
     339  case ROAR_ERROR_LOOP: 
     340    errno = ELOOP; 
     341   break; 
     342#endif 
     343#ifdef EMFILE 
     344  case ROAR_ERROR_MFILE: 
     345    errno = EMFILE; 
     346   break; 
     347#endif 
     348#ifdef ENAMETOOLONG 
     349  case ROAR_ERROR_NAMETOOLONG: 
     350    errno = ENAMETOOLONG; 
     351   break; 
     352#endif 
     353#ifdef ENODATA 
     354  case ROAR_ERROR_NODATA: 
     355    errno = ENODATA; 
     356   break; 
     357#endif 
     358#ifdef ENODEV 
     359  case ROAR_ERROR_NODEV: 
     360  case ROAR_ERROR_NODRV: 
     361    errno = ENODEV; 
     362   break; 
     363#endif 
     364#ifdef ENOSPC 
     365  case ROAR_ERROR_NOSPC: 
     366    errno = ENOSPC; 
     367   break; 
     368#endif 
     369#ifdef EINVAL 
     370  case ROAR_ERROR_TYPEMM: 
     371    errno = EINVAL; 
     372   break; 
     373#endif 
     374#ifdef ENOSYS 
     375  case ROAR_ERROR_NORSYS: 
     376    errno = ENOSYS; 
     377   break; 
     378#endif 
     379#ifdef ENOTCONN 
     380  case ROAR_ERROR_NOTCONN: 
     381    errno = ENOTCONN; 
     382   break; 
     383#endif 
     384#ifdef EPROTONOSUPPORT 
     385  case ROAR_ERROR_PROTONOSUP: 
     386    errno = EPROTONOSUPPORT; 
     387   break; 
     388#endif 
     389#ifdef EROFS 
     390  case ROAR_ERROR_RO: 
     391    errno = EROFS; 
     392   break; 
     393#endif 
     394#ifdef ETIMEDOUT 
     395  case ROAR_ERROR_TIMEDOUT: 
     396    errno = ETIMEDOUT; 
     397   break; 
     398#endif 
     399#ifdef EAGAIN 
     400  case ROAR_ERROR_AGAIN: 
     401    errno = EAGAIN; 
     402   break; 
     403#endif 
     404#ifdef ENETDOWN 
     405  case ROAR_ERROR_LINKDOWN: 
     406    errno = ENETDOWN; 
    235407   break; 
    236408#endif 
     
    265437  {ROAR_ERROR_NOMEM,       "Not enough space"}, 
    266438  {ROAR_ERROR_INVAL,       "Invalid argument"}, 
     439  {ROAR_ERROR_ALREADY,     "Connection already in progress"}, 
     440  {ROAR_ERROR_BADRQC,      "Invalid request code"}, 
     441  {ROAR_ERROR_DOM,         "Mathematics argument out of domain of function"}, 
     442  {ROAR_ERROR_EXIST,       "File or object exists"}, 
     443  {ROAR_ERROR_FAULT,       "Bad address"}, 
     444  {ROAR_ERROR_IO,          "I/O-Error"}, 
     445  {ROAR_ERROR_KEYEXPIRED,  "Key has expired"}, 
     446  {ROAR_ERROR_KEYREJECTED, "Key was rejected by service"}, 
     447  {ROAR_ERROR_LOOP,        "Too many recursions"}, 
     448  {ROAR_ERROR_MFILE,       "Too many open files or objects"}, 
     449  {ROAR_ERROR_NAMETOOLONG, "File or object name too long"}, 
     450  {ROAR_ERROR_NODATA,      "No message is available on the read queue"}, 
     451  {ROAR_ERROR_NODEV,       "No such device"}, 
     452  {ROAR_ERROR_NODRV,       "No such driver"}, 
     453  {ROAR_ERROR_NOSPC,       "No space left on device"}, 
     454  {ROAR_ERROR_TYPEMM,      "Type missmatch. Object of diffrent type required"}, 
     455  {ROAR_ERROR_NORSYS,      "Feature not implemented by remote end"}, 
     456  {ROAR_ERROR_NOTCONN,     "Socket or object not connected"}, 
     457  {ROAR_ERROR_PROTONOSUP,  "Protocol not supported"}, 
     458  {ROAR_ERROR_RIO,         "Remote I/O Error"}, 
     459  {ROAR_ERROR_RO,          "File or object is read only"}, 
     460  {ROAR_ERROR_TIMEDOUT,    "Connection timed out"}, 
     461  {ROAR_ERROR_AGAIN,       "Resource temporarily unavailable"}, 
     462  {ROAR_ERROR_NOISE,       "Line too noisy"}, 
     463  {ROAR_ERROR_LINKDOWN,    "Physical or logical link down"}, 
    267464  {-1, NULL} 
    268465 }; 
Note: See TracChangeset for help on using the changeset viewer.