[CommonError] Add common errors and utility functions
[platform/core/csapi/tizen.git] / Tizen.Internals / Tizen.Internals.Errors / ErrorCode.cs
1 /// Copyright 2016 by Samsung Electronics, Inc.,
2 ///
3 /// This software is the confidential and proprietary information
4 /// of Samsung Electronics, Inc. ("Confidential Information"). You
5 /// shall not disclose such Confidential Information and shall use
6 /// it only in accordance with the terms of the license agreement
7 /// you entered into with Samsung.
8
9
10 namespace Tizen.Internals.Errors
11 {
12     public enum ErrorCode : int
13     {
14         None = 0, //  0, /**< Successful */
15         NotPermitted = -1, //  -EPERM, /**< Operation not permitted */
16         NoSuchFile = -2, //  -ENOENT, /**< No such file or directory */
17         NoSuchProcess = -3, //  -ESRCH, /**< No such process */
18         InterruptedSysCall = -4, //  -EINTR, /**< Interrupted system call */
19         IoError = -5, //  -EIO, /**< I/O error */
20         NoSuchDevice = -6, //  -ENXIO, /**< No such device or address */
21         ArgumentListTooLong = -7, //  -E2BIG, /**< Argument list too long */
22         ExecFormatError = -8, //  -ENOEXEC, /**< Exec format error */
23         BadFileNumber = -9, //  -EBADF, /**< Bad file number */
24         TryAgain = -11, //  -EAGAIN, /**< Try again */
25         OutOfMemory = -12, //  -ENOMEM, /**< Out of memory */
26         PermissionDenied = -13, //  -EACCES, /**< Permission denied */
27         BadAddress = -14, //  -EFAULT, /**< Bad address */
28         BlockDeviceRequired = -15, //  -ENOTBLK, /**< Block device required */
29         ResourceBusy = -16, //  -EBUSY, /**< Device or resource busy */
30         FileExists = -17, //  -EEXIST, /**< File exists */
31         CrossDeviceLink = -18, //  -EXDEV, /**< Cross-device link */
32         NotaDirectory = -20, //  -ENOTDIR, /**< Not a directory */
33         IsADirectory = -21, //  -EISDIR, /**< Is a directory */
34         InvalidParameter = -22, //  -EINVAL, /**< Invalid function parameter */
35         FileTableOverflow = -23, //  -ENFILE, /**< File table overflow */
36         TooManyOpenFiles = -24, //  -EMFILE, /**< Too many open files */
37         TooNotaTerminal = -25, //  -ENOTTY, /**< Not a terminal */
38         TooTextFileBusy = -26, //  -ETXTBSY, /**< Not a terminal */
39         FileTooLarge = -27, //  -EFBIG, /**< File too large */
40         FileNoSpaceOnDevice = -28, //  -ENOSPC, /**< No space left on device */
41         IllegalSeek = -29, //  -ESPIPE, /**< Illegal seek */
42         ReadOnlyFilesystem = -30, //  -EROFS, /**< Read-only file system */
43         NoData = -61, //  -ENODATA, /**< No data available */
44         TooManyLinks = -31, //  -EMLINK, /**< Too many links */
45         BrokenPipe = -32, //  -EPIPE, /**< Broken pipe */
46         ArgumentOutOfDomain = -33, //  -EDOM, /**< Math argument out of domain of func */
47         ResultOutOfRange = -34, //  -ERANGE, /**< Math result not representable */
48         WouldCauseDeadlock = -35, //  -EDEADLK, /**< Resource deadlock would occur */
49         FileNameTooLong = -36, //  -ENAMETOOLONG,/**< File name too long */
50         FileNoLocksAvailable = -37, //  -ENOLCK, /**< No record locks available */
51         InvalidOperation = -38, //  -ENOSYS, /**< Function not implemented */
52         DirNotEmpty = -39, //  -ENOTEMPTY, /**< Directory not empty */
53         TooManySymbolicLinks = -40, //  -ELOOP, /**< Too many symbolic links encountered */
54         WouldBlock = -11, //  TryAgain (-EAGAIN), /**< Operation would block */
55         CorruptedSharedLib = -80, //  -ELIBBAD, /**< Accessing a corrupted shared library */
56         LibSectionCorrupted = -81, //  -ELIBSCN, /**< .lib section in a.out corrupted */
57         LinkTooManySharedLib = -82, //  -ELIBMAX, /**< Attempting to link in too many shared libraries */
58         SharedLibExec = -83, //  -ELIBEXEC, /**< Cannot exec a shared library directly */
59         IllegalByteSeq = -84, //  -EILSEQ, /**< Illegal byte sequence */
60         SystemCallRestart = -85, //  -ERESTART, /**< Interrupted system call should be restarted */
61         StreamsPipe = -86, //  -ESTRPIPE, /**< Streams pipe error */
62         TooManyUsers = -87, //  -EUSERS, /**< Too many users */
63         NonSocket = -88, //  -ENOTSOCK, /**< Socket operation on non-socket */
64         NoDestAddress = -89, //  -EDESTADDRREQ, /**< Destination address required */
65         MsgTooLong = -90, //  -EMSGSIZE, /**< Message too long */
66         ProtocolWrongType = -91, //  -EPROTOTYPE, /**< Protocol wrong type for socket */
67         ProtocolNotAvaliable = -92, //  -ENOPROTOOPT, /**< Protocol not available */
68         ProtocolNotSupported = -93, //  -EPROTONOSUPPORT, /**< Protocol not supported */
69         SocketTypeNotSupported = -94, //  -ESOCKTNOSUPPORT, /**< Socket type not supported */
70         EndpointOperatinNotSupported = -95, //  -EOPNOTSUPP, /**< Operation not supported on transport endpoint */
71         ProtocolFamilyNotSupported = -96, //  -EPFNOSUPPORT, /**< Protocol family not supported */
72         AddressFamilyNotSupported = -97, //  -EAFNOSUPPORT, /**< Address family not supported by protocol */
73         AddresInUse = -98, //  -EADDRINUSE, /**< Address already in use */
74         CannotAssignAddress = -99, //  -EADDRNOTAVAIL, /**< Cannot assign requested address */
75         Networkdown = -100, //  -ENETDOWN, /**< Network is down */
76         NetworkUnreachable = -101, //  -ENETUNREACH, /**< Network is unreachable */
77         NetworkReset = -102, //  -ENETRESET, /**< Network dropped connection because of reset */
78         ConnectionAborted = -103, //  -ECONNABORTED, /**< Software caused connection abort */
79         ConnectionResetByPeer = -104, //  -ECONNRESET, /**< Connection reset by peer */
80         BufferSpace = -105, //  -ENOBUFS, /**< No buffer space available */
81         EndpointConnected = -106, //  -EISCONN, /**< Transport endpoint is already connected */
82         EndpointNotConnected = -107, //  -ENOTCONN, /**< Transport endpoint is not connected */
83         EndpointShutdown = -108, //  -ESHUTDOWN, /**< Cannot send after transport endpoint shutdown */
84         TooManyReferences = -109, //  -ETOOMANYREFS, /**< Too many references: cannot splice */
85         ConnectionTimeout = -110, //  -ETIMEDOUT, /**< Connection timed out */
86         ConnectionRefused = -111, //  -ECONNREFUSED, /**< Connection refused */
87         Hostdown = -112, //  -EHOSTDOWN, /**< Host is down */
88         NoRouteToHost = -113, //  -EHOSTUNREACH, /**< No route to host */
89         AlreadyInProgress = -114, //  -EALREADY, /**< Operation already in progress */
90         NowInProgress = -115, //  -EINPROGRESS, /**< Operation now in progress */
91         StaleNfsFileHandle = -116, //  -ESTALE, /**< Stale NFS file handle */
92         StructureUnclean = -117, //  -EUCLEAN, /**< Structure needs cleaning */
93         NotXenixNamedTypeFile = -118, //  -ENOTNAM, /**< Not a XENIX named type file */
94         NoXenixSemaphoresAvailable = -119, //  -ENAVAIL, /**< No XENIX semaphores available */
95         IsNamedTypeFile = -120, //  -EISNAM, /**< Is a named type file */
96         RemoteIo = -121, //  -EREMOTEIO, /**< Remote I/O error */
97         QuotaExceeded = -122, //  -EDQUOT, /**< Quota exceeded */
98         NoMedium = -123, //  -ENOMEDIUM, /**< No medium found */
99         WrongMediumType = -124, //  -EMEDIUMTYPE, /**< Wrong medium type */
100         Canceled = -125, //  -ECANCELED, /**< Operation Canceled */
101         KeyNotAvailable = -126, //  -ENOKEY, /**< Required key not available */
102         KeyExpired = -127, //  -EKEYEXPIRED, /**< Key has expired */
103         KeyRevoked = -128, //  -EKEYREVOKED, /**< Key has been revoked */
104         KeyRejected = -129, //  -EKEYREJECTED, /**< Key was rejected by service */
105
106         OwnerDead = -130, //  -EOWNERDEAD, /**< Owner died (for robust mutexes) */
107
108         Unknown = -1073741824, //  TIZEN_ERROR_MIN_PLATFORM_ERROR, /**< Unknown error */
109
110         TimedOut,   // /**< Time out */
111         NotSupported, // /**< Not Supported */
112         UserNotConsented,//  /**< Not Consented */
113         EndofCollection  //
114     }
115 }