/*
 * Copyright (c) 2017 SELVAS AI,  All rights reserved.
 * 
 * Error Number Ver.1.0
 */

#ifndef _PSERRNO_H_
#define _PSERRNO_H_

#define PSEPERM                          1  /* Operation not permitted */
#define PSENOENT                         2  /* No such file or directory */
#define PSESRCH                          3  /* No such process */
#define PSEINTR                          4  /* Interrupted system call */
#define PSEIO                            5  /* I/O error */
#define PSENXIO                          6  /* No such device or address */
#define PSE2BIG                          7  /* Arg list too long */
#define PSENOEXEC                        8  /* Exec format error */
#define PSEBADF                          9  /* Bad file number */
#define PSECHILD                        10  /* No child processes */
#define PSEAGAIN                        11  /* Try again */
#define PSENOMEM                        12  /* Out of memory */
#define PSEACCES                        13  /* Permission denied */
#define PSEFAULT                        14  /* Bad address */
#define PSEBUSY                         16  /* Device or resource busy */
#define PSEXDEV                         18  /* Cross-device link */
#define PSENODEV                        19  /* No such device(library, dll, so, ...) */
#define PSENOTDIR                       20  /* Not a directory */
#define PSEISDIR                        21  /* Is a directory */
#define PSEINVAL                        22  /* Invalid argument */
#define PSENFILE                        23  /* File table overflow */
#define PSEMFILE                        24  /* Too many open files */
#define PSENOTTY                        25  /* Not a typewriter */
#define PSEFBIG                         27  /* File too large */
#define PSENOSPC                        28  /* No space left on device */
#define PSESPIPE                        29  /* Illegal seek */
#define PSEROFS                         30  /* Read-only file system */
#define PSEMLINK                        31  /* Too many links */
#define PSEPIPE                         32  /* Broken pipe */
#define PSEDOM                          33  /* Math argument out of domain of func */
#define PSERANGE                        34  /* Math result not representable */
#define PSEDEADLK                       35  /* Resource deadlock would occur */
#define PSENAMETOOLONG                  36  /* File name too long */
#define PSENOLCK                        37  /* No record locks available */
#define PSENOSYS                        38  /* Function not implemented */
#define PSENOTEMPTY                     39  /* Directory not empty */

#define PSEDEADLOCK     PSEDEADLK           /* Resource deadlock would occur */
#define PSEWOULDBLOCK   PSEAGAIN            /* Operation would block */

#define PSENOTBLK                       15  /* Block device required */
#define PSEEXIST                        17  /* File exists */
#define PSETXTBSY                       26  /* Text file busy */
#define PSELOOP                         40  /* Too many symbolic links encountered */
#define PSENOMSG                        42  /* No message of desired type */
#define PSEIDRM                         43  /* Identifier removed */
#define PSECHRNG                        44  /* Channel number out of range */
#define PSEL2NSYNC                      45  /* Level 2 not synchronized */
#define PSEL3HLT                        46  /* Level 3 halted */
#define PSEL3RST                        47  /* Level 3 reset */
#define PSELNRNG                        48  /* Link number out of range */
#define PSEUNATCH                       49  /* Protocol driver not attached */
#define PSENOCSI                        50  /* No CSI structure available */
#define PSEL2HLT                        51  /* Level 2 halted */
#define PSEBADE                         52  /* Invalid exchange */
#define PSEBADR                         53  /* Invalid request descriptor */
#define PSEXFULL                        54  /* Exchange full */
#define PSENOANO                        55  /* No anode */
#define PSEBADRQC                       56  /* Invalid request code */
#define PSEBADSLT                       57  /* Invalid slot */
#define PSEBFONT                        59  /* Bad font file format */
#define PSENOSTR                        60  /* Device not a stream */
#define PSENODATA                       61  /* No data available */
#define PSETIME                         62  /* Timer expired */
#define PSENOSR                         63  /* Out of streams resources */
#define PSENONET                        64  /* Machine is not on the network */
#define PSENOPKG                        65  /* Package not installed */
#define PSEREMOTE                       66  /* Object is remote */
#define PSENOLINK                       67  /* Link has been severed */
#define PSEADV                          68  /* Advertise error */
#define PSESRMNT                        69  /* Srmount error */
#define PSECOMM                         70  /* Communication error on send */
#define PSEPROTO                        71  /* Protocol error */
#define PSEMULTIHOP                     72  /* Multihop attempted */
#define PSEDOTDOT                       73  /* RFS specific error */
#define PSEBADMSG                       74  /* Not a data message */
#define PSEOVERFLOW                     75  /* Value too large for defined data type */
#define PSENOTUNIQ                      76  /* Name not unique on network */
#define PSEBADFD                        77  /* File descriptor in bad state */
#define PSEREMCHG                       78  /* Remote address changed */
#define PSELIBACC                       79  /* Can not access a needed shared library */
#define PSELIBBAD                       80  /* Accessing a corrupted shared library */
#define PSELIBSCN                       81  /* .lib section in a.out corrupted */
#define PSELIBMAX                       82  /* Attempting to link in too many shared libraries */
#define PSELIBEXEC                      83  /* Cannot exec a shared library directly */
#define PSEILSEQ                        84  /* Illegal byte sequence */
#define PSERESTART                      85  /* Interrupted system call should be restarted */
#define PSESTRPIPE                      86  /* Streams pipe error */
#define PSEUSERS                        87  /* Too many users */
#define PSENOTSOCK                      88  /* Socket operation on non-socket */
#define PSEDESTADDRREQ                  89  /* Destination address required */
#define PSEMSGSIZE                      90  /* Message too long */
#define PSEPROTOTYPE                    91  /* Protocol wrong type for socket */
#define PSENOPROTOOPT                   92  /* Protocol not available */
#define PSEPROTONOSUPPORT               93  /* Protocol not supported */
#define PSESOCKTNOSUPPORT               94  /* Socket type not supported */
#define PSEOPNOTSUPP                    95  /* Operation not supported on transport endpoint */
#define PSEPFNOSUPPORT                  96  /* Protocol family not supported */
#define PSEAFNOSUPPORT                  97  /* Address family not supported by protocol */
#define PSEADDRINUSE                    98  /* Address already in use */
#define PSEADDRNOTAVAIL                 99  /* Cannot assign requested address */
#define PSENETDOWN                      100 /* Network is down */
#define PSENETUNREACH                   101 /* Network is unreachable */
#define PSENETRESET                     102 /* Network dropped connection because of reset */
#define PSECONNABORTED                  103 /* Software caused connection abort */
#define PSECONNRESET                    104 /* Connection reset by peer */
#define PSENOBUFS                       105 /* No buffer space available */
#define PSEISCONN                       106 /* Transport endpoint is already connected */
#define PSENOTCONN                      107 /* Transport endpoint is not connected */
#define PSESHUTDOWN                     108 /* Cannot send after transport endpoint shutdown */
#define PSETOOMANYREFS                  109 /* Too many references: cannot splice */
#define PSETIMEDOUT                     110 /* Connection timed out */
#define PSECONNREFUSED                  111 /* Connection refused */
#define PSEHOSTDOWN                     112 /* Host is down */
#define PSEHOSTUNREACH                  113 /* No route to host */
#define PSEALREADY                      114 /* Operation already in progress */
#define PSEINPROGRESS                   115 /* Operation now in progress */
#define PSESTALE                        116 /* Stale NFS file handle */
#define PSEUCLEAN                       117 /* Structure needs cleaning */
#define PSENOTNAM                       118 /* Not a XENIX named type file */
#define PSENAVAIL                       119 /* No XENIX semaphores available */
#define PSEISNAM                        120 /* Is a named type file */
#define PSEREMOTEIO                     121 /* Remote I/O error */
#define PSEDQUOT                        122 /* Quota exceeded */
#define PSENOMEDIUM                     123 /* No medium found */
#define PSEMEDIUMTYPE                   124 /* Wrong medium type */

#define PSEPROCLIM                      200 /* Too many processes */
#define PSESYSNOTREADY                  201 /* Network subsystem is unvailable */
#define PSEVERNOTSUPPORTED              202 /* WinSock version is not supported */
#define PSENOTINITIALISED               203 /* Successful WSAStartup() not yet performed */
#define PSEDISCON                       204 /* Graceful shutdown in progress */
#define PSENOMORE                       205 /* No more results can be returned by 'WSALookupServiceNext' */
#define PSECANCELLED                    206 /* A call to 'WSALookupServiceEnd' was made while this call was still processing. The call has been canceled. */
#define PSEINVALIDPROCTABLE             207 /* The procedure call table is invalid. */
#define PSEINVALIDPROVIDER              208 /* The requested service provider is invalid. */
#define PSEPROVIDERFAILEDINIT           209 /* The requested service provider could not be loaded or initialized. */
#define PSESYSCALLFAILURE               210 /* A system call that should never fail has failed. */
#define PSESERVICE_NOT_FOUND            211 /* No such service is known. The service cannot be found in the specified name space. */
#define PSETYPE_NOT_FOUND               212 /* Class type not found. The specified class was not found. */
#define PSE_NO_MORE                     213 /* No more results can be returned by 'WSALookupServiceNext' */
#define PSE_CANCELLED                   214 /* A call to 'WSALookupServiceEnd' was made while this call was still processing. The call has been canceled. */
#define PSEREFUSED                      215 /* A database query failed because it was actively refused. */
#define PSEHOST_NOT_FOUND               216 /* No such host is known */
#define PSETRY_AGAIN                    217 /* Host not found, or server failed */
#define PSENO_RECOVERY                  218 /* Unexpected server error encountered */
#define PSENO_DATA                      219 /* Valid name without requested data */
#define PSENO_ADDRESS                   220 /* No address, look for MX record */

#define PSESERVICESTOPPED               300 /* Service stopped, Try again */
#define PSEALEADYINUSE                  301 /* Aleady in use (DB or Model loaded) */
#define PSENOTINITAPI                   302 /* INIT API function not initialized */
#define PSENOTFORMAT                    303 /* Format is not supported */
#define PSENOTOPEN                      304 /* Channel not opened, or Channel closed */
#define PSENOTINUSE                     305 /* No such database */

// �߰�
#define PSEASERVICESTARTED				306 /* Service is already running */
#define PSEASERVICESTOPPED				307 /* Service is already stopped */
#define PSEASERVICEREADY				308 /* Service not ready or not stopped */

#define PSEEXCEED_TEXTLIMIT				400
#define PSEEXCEED_PCMLIMIT				401
#define PSEERROR_TEXTTOSPEECH			402
#define PSEERROR_TEXTFORMAT				403

#if defined UNIX

#define WSABASEERR              10000

#define WSAEINTR                (WSABASEERR+4)
#define WSAEBADF                (WSABASEERR+9)
#define WSAEACCES               (WSABASEERR+13)
#define WSAEFAULT               (WSABASEERR+14)
#define WSAEINVAL               (WSABASEERR+22)
#define WSAEMFILE               (WSABASEERR+24)

#define WSAEWOULDBLOCK          (WSABASEERR+35)
#define WSAEINPROGRESS          (WSABASEERR+36)
#define WSAEALREADY             (WSABASEERR+37)
#define WSAENOTSOCK             (WSABASEERR+38)
#define WSAEDESTADDRREQ         (WSABASEERR+39)
#define WSAEMSGSIZE             (WSABASEERR+40)
#define WSAEPROTOTYPE           (WSABASEERR+41)
#define WSAENOPROTOOPT          (WSABASEERR+42)
#define WSAEPROTONOSUPPORT      (WSABASEERR+43)
#define WSAESOCKTNOSUPPORT      (WSABASEERR+44)
#define WSAEOPNOTSUPP           (WSABASEERR+45)
#define WSAEPFNOSUPPORT         (WSABASEERR+46)
#define WSAEAFNOSUPPORT         (WSABASEERR+47)
#define WSAEADDRINUSE           (WSABASEERR+48)
#define WSAEADDRNOTAVAIL        (WSABASEERR+49)
#define WSAENETDOWN             (WSABASEERR+50)
#define WSAENETUNREACH          (WSABASEERR+51)
#define WSAENETRESET            (WSABASEERR+52)
#define WSAECONNABORTED         (WSABASEERR+53)
#define WSAECONNRESET           (WSABASEERR+54)
#define WSAENOBUFS              (WSABASEERR+55)
#define WSAEISCONN              (WSABASEERR+56)
#define WSAENOTCONN             (WSABASEERR+57)
#define WSAESHUTDOWN            (WSABASEERR+58)
#define WSAETOOMANYREFS         (WSABASEERR+59)
#define WSAETIMEDOUT            (WSABASEERR+60)
#define WSAECONNREFUSED         (WSABASEERR+61)
#define WSAELOOP                (WSABASEERR+62)
#define WSAENAMETOOLONG         (WSABASEERR+63)
#define WSAEHOSTDOWN            (WSABASEERR+64)
#define WSAEHOSTUNREACH         (WSABASEERR+65)
#define WSAENOTEMPTY            (WSABASEERR+66)
#define WSAEPROCLIM             (WSABASEERR+67)
#define WSAEUSERS               (WSABASEERR+68)
#define WSAEDQUOT               (WSABASEERR+69)
#define WSAESTALE               (WSABASEERR+70)
#define WSAEREMOTE              (WSABASEERR+71)

#define WSASYSNOTREADY          (WSABASEERR+91)
#define WSAVERNOTSUPPORTED      (WSABASEERR+92)
#define WSANOTINITIALISED       (WSABASEERR+93)
#define WSAEDISCON              (WSABASEERR+101)
#define WSAENOMORE              (WSABASEERR+102)
#define WSAECANCELLED           (WSABASEERR+103)
#define WSAEINVALIDPROCTABLE    (WSABASEERR+104)
#define WSAEINVALIDPROVIDER     (WSABASEERR+105)
#define WSAEPROVIDERFAILEDINIT  (WSABASEERR+106)
#define WSASYSCALLFAILURE       (WSABASEERR+107)
#define WSASERVICE_NOT_FOUND    (WSABASEERR+108)
#define WSATYPE_NOT_FOUND       (WSABASEERR+109)
#define WSA_E_NO_MORE           (WSABASEERR+110)
#define WSA_E_CANCELLED         (WSABASEERR+111)
#define WSAEREFUSED             (WSABASEERR+112)

#define WSAHOST_NOT_FOUND       (WSABASEERR+1001)
#define WSATRY_AGAIN            (WSABASEERR+1002)
#define WSANO_RECOVERY          (WSABASEERR+1003)
#define WSANO_DATA              (WSABASEERR+1004)
#define WSANO_ADDRESS           WSANO_DATA

#endif

#endif /* _PSERRNO_H_ */