1 #ifndef SEAFILE_ERROR_H 2 #define SEAFILE_ERROR_H 3 4 /* Error codes used in RPC. */ 5 6 #define SEAF_ERR_GENERAL 500 7 #define SEAF_ERR_BAD_REPO 501 8 #define SEAF_ERR_BAD_COMMIT 502 9 #define SEAF_ERR_BAD_ARGS 503 10 #define SEAF_ERR_INTERNAL 504 11 #define SEAF_ERR_BAD_FILE 505 12 #define SEAF_ERR_BAD_RELAY 506 13 #define SEAF_ERR_LIST_COMMITS 507 14 #define SEAF_ERR_REPO_AUTH 508 15 #define SEAF_ERR_GC_NOT_STARTED 509 16 #define SEAF_ERR_MONITOR_NOT_CONNECTED 510 17 #define SEAF_ERR_BAD_DIR_ID 511 18 #define SEAF_ERR_NO_WORKTREE 512 19 #define SEAF_ERR_BAD_PEER_ID 513 20 #define SEAF_ERR_REPO_LOCKED 514 21 #define SEAF_ERR_DIR_MISSING 515 22 #define SEAF_ERR_PATH_NO_EXIST 516 /* the dir or file pointed by this path not exists */ 23 24 /* Sync errors. */ 25 26 #define SYNC_ERROR_ID_FILE_LOCKED_BY_APP 0 27 #define SYNC_ERROR_ID_FOLDER_LOCKED_BY_APP 1 28 /* When file is locked on server. Returned in update-branch. */ 29 #define SYNC_ERROR_ID_FILE_LOCKED 2 30 #define SYNC_ERROR_ID_INVALID_PATH 3 31 #define SYNC_ERROR_ID_INDEX_ERROR 4 32 #define SYNC_ERROR_ID_PATH_END_SPACE_PERIOD 5 33 #define SYNC_ERROR_ID_PATH_INVALID_CHARACTER 6 34 /* Returned in update-branch */ 35 #define SYNC_ERROR_ID_FOLDER_PERM_DENIED 7 36 /* When there is no sync permission to library */ 37 #define SYNC_ERROR_ID_PERM_NOT_SYNCABLE 8 38 /* Local error when updating a file in readonly library. */ 39 #define SYNC_ERROR_ID_UPDATE_TO_READ_ONLY_REPO 9 40 /* When there is no read access to library. */ 41 #define SYNC_ERROR_ID_ACCESS_DENIED 10 42 /* When there is no write access to library */ 43 #define SYNC_ERROR_ID_NO_WRITE_PERMISSION 11 44 #define SYNC_ERROR_ID_QUOTA_FULL 12 45 #define SYNC_ERROR_ID_NETWORK 13 46 #define SYNC_ERROR_ID_RESOLVE_PROXY 14 47 #define SYNC_ERROR_ID_RESOLVE_HOST 15 48 #define SYNC_ERROR_ID_CONNECT 16 49 #define SYNC_ERROR_ID_SSL 17 50 #define SYNC_ERROR_ID_TX 18 51 #define SYNC_ERROR_ID_TX_TIMEOUT 19 52 #define SYNC_ERROR_ID_UNHANDLED_REDIRECT 20 53 #define SYNC_ERROR_ID_SERVER 21 54 #define SYNC_ERROR_ID_LOCAL_DATA_CORRUPT 22 55 #define SYNC_ERROR_ID_WRITE_LOCAL_DATA 23 56 #define SYNC_ERROR_ID_SERVER_REPO_DELETED 24 57 #define SYNC_ERROR_ID_SERVER_REPO_CORRUPT 25 58 #define SYNC_ERROR_ID_NOT_ENOUGH_MEMORY 26 59 #define SYNC_ERROR_ID_CONFLICT 27 60 #define SYNC_ERROR_ID_GENERAL_ERROR 28 61 #define SYNC_ERROR_ID_NO_ERROR 29 62 #define SYNC_ERROR_ID_REMOVE_UNCOMMITTED_FOLDER 30 63 #define N_SYNC_ERROR_ID 31 64 65 #endif 66