1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
/*
# xdg_vfs_common.h
#
# Copyright 2006, Norbert Frese
#
# LICENSE:
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
#---------------------------------------------*/
#ifndef XDG_VFS_COMMON_H
#define XDG_VFS_COMMON_H
#ifdef __cplusplus
extern "C" {
#endif
#define DEFAULT_DATA_ESC_CHAR 126
#define DEFAULT_CANCEL_CHAR (int)'!'
/* error codes */
#define XDGVFS_ERRORCODE_OK 0
#define XDGVFS_ERRORCODE_CANCELED 10
#define XDGVFS_ERRORCODE_BAD_PARAMETER 11
#define XDGVFS_ERRORCODE_NOT_SUPPORTED 12
#define XDGVFS_ERRORCODE_GENERIC 13
#define XDGVFS_ERRORCODE_INIT_ERROR 14
#define XDGVFS_ERRORCODE_DATA_ERROR 15
#define XDGVFS_ERRORCODE_IO_ERROR 16
#define XDGVFS_ERRORCODE_NOT_PERMITTED 17
#define XDGVFS_ERRORCODE_MALFORMED_URL 18
#define XDGVFS_ERRORCODE_PROTOCOL_ERROR 19
#define XDGVFS_ERRORCODE_USR_OR_GRP_NOT_FOUND 20
#define XDGVFS_ERRORCODE_INTERNAL 21
#define XDGVFS_ERRORCODE_CANNOT_OPEN_FOR_WRITING 22
#define XDGVFS_ERRORCODE_CANNOT_OPEN_FOR_READING 23
#define XDGVFS_ERRORCODE_IS_DIRECTORY 24
#define XDGVFS_ERRORCODE_IS_FILE 25
#define XDGVFS_ERRORCODE_NOT_FOUND 26
#define XDGVFS_ERRORCODE_ALREADY_EXISTS 27
#define XDGVFS_ERRORCODE_HOST_NOT_FOUND 28
#define XDGVFS_ERRORCODE_ACCESS_DENIED 29
#define XDGVFS_ERRORCODE_CANNOT_ENTER_DIRECTORY 30
#define XDGVFS_ERRORCODE_PROTOCOL_IS_NOT_A_FILESYSTEM 31
#define XDGVFS_ERRORCODE_LOOP 32
#define XDGVFS_ERRORCODE_COULD_NOT_CREATE_SOCKET 33
#define XDGVFS_ERRORCODE_COULD_NOT_CONNECT 34
#define XDGVFS_ERRORCODE_ERR_CONNECTION_BROKEN 35
#define XDGVFS_ERRORCODE_COULD_NOT_MOUNT 36
#define XDGVFS_ERRORCODE_COULD_NOT_UNMOUNT 37
#define XDGVFS_ERRORCODE_SOCKET_ERROR 38
#define XDGVFS_ERRORCODE_LOGIN_FAILED 39
#define XDGVFS_ERRORCODE_OPERATION_FAILED 40
#define XDGVFS_ERRORCODE_CANNOT_RESUME 41
#define XDGVFS_ERRORCODE_OUT_OF_MEMORY 42
#define XDGVFS_ERRORCODE_UNKNOWN_PROXY_HOST 43
#define XDGVFS_ERRORCODE_ABORTED 44
#define XDGVFS_ERRORCODE_TIMEOUT 45
#define XDGVFS_ERRORCODE_SERVICE_NOT_AVAILABLE 46
#define XDGVFS_ERRORCODE_CANNOT_DELETE_ORIGINAL 47
#define XDGVFS_ERRORCODE_CANNOT_DELETE_PARTIAL 48
#define XDGVFS_ERRORCODE_CANNOT_RENAME_ORIGINAL 49
#define XDGVFS_ERRORCODE_CANNOT_RENAME_PARTIAL 50
#define XDGVFS_ERRORCODE_NEED_PASSWD 51
#define XDGVFS_ERRORCODE_NO_CONTENT 52
#define XDGVFS_ERRORCODE_NO_SPACE 53
#define XDGVFS_ERRORCODE_IDENTICAL_FILES 54
#define XDGVFS_ERRORCODE_CORRUPTED_DATA 55
#define XDGVFS_ERRORCODE_WRONG_FORMAT 56
#define XDGVFS_ERRORCODE_ERROR_BAD_FILE 66
#define XDGVFS_ERRORCODE_TOO_BIG 67
#define XDGVFS_ERRORCODE_NOT_OPEN 68
#define XDGVFS_ERRORCODE_INVALID_OPEN_MODE 69
#define XDGVFS_ERRORCODE_TOO_MANY_OPEN_FILES 70
#define XDGVFS_ERRORCODE_EOF 71
#define XDGVFS_ERRORCODE_IN_PROGRESS 72
#define XDGVFS_ERRORCODE_INTERRUPTED 73
#define XDGVFS_ERRORCODE_HOST_HAS_NO_ADDRESS 74
#define XDGVFS_ERRORCODE_DIRECTORY_NOT_EMPTY 75
#define XDGVFS_ERRORCODE_TOO_MANY_LINKS 76
#define XDGVFS_ERRORCODE_READ_ONLY_FILE_SYSTEM 77
#define XDGVFS_ERRORCODE_NOT_SAME_FILE_SYSTEM 78
#define XDGVFS_ERRORCODE_NAME_TOO_LONG 79
#define XDGVFS_ERRORCODE_SERVICE_OBSOLETE 80
#define XDGVFS_ERRORCODE_NO_DEFAULT 81
#define XDGVFS_ERRORCODE_NAMESERVER 82
#define XDGVFS_ERRORCODE_LOCKED 83
#define XDGVFS_ERRORCODE_DEPRECATED_FUNCTION 84
#define XDGVFS_ERRORCODE_DIRECTORY_BUSY 85
#define XDGVFS_ERRORCODE_NOT_A_DIRECTORY 86
/* tags (private!) */
#define XDGVFS_TAG_DATA_OUT "(>>>RAW_DATA>>>)"
#define XDGVFS_TAG_ESCAPEDDATA_OUT "(>>>ESCAPED_DATA>>>)"
#define XDGVFS_TAG_DATA_IN "(<<<RAW_DATA<<<)"
#define XDGVFS_TAG_ESCAPEDDATA_IN "(<<<ESCAPED_DATA<<<)"
#define XDGVFS_TAG_BACKEND "[BACKEND]"
#define XDGVFS_TAG_GET "[GET]"
#define XDGVFS_TAG_PUT "[PUT]"
#define XDGVFS_TAG_CP "[CP]"
#define XDGVFS_TAG_MV "[MV]"
#define XDGVFS_TAG_LS "[LS]"
#define XDGVFS_TAG_FILEINFO "[FILEINFO]"
#define XDGVFS_TAG_SETATTRS "[SETATTRS]"
#define XDGVFS_TAG_SAVEFILEDLG "[SAVEFILEDLG]"
#define XDGVFS_TAG_OPENFILEDLG "[OPENFILEDLG]"
#define XDGVFS_TAG_MKDIR "[MKDIR]"
#define XDGVFS_TAG_RMDIR "[RMDIR]"
#define XDGVFS_TAG_RM "[RM]"
#define XDGVFS_TAG_MOUNT "[MOUNT]"
#define XDGVFS_TAG_MONITOREVENT "*"
#define XDGVFS_TAG_METADATA "(METADATA)"
#define XDGVFS_TAG_DIRENTRY "(DIRENTRY)"
#define XDGVFS_TAG_PROGRESS "(PROGRESS)"
#define XDGVFS_TAG_DONE ":-)"
#define XDGVFS_TAG_FAILED ":-("
#ifdef __cplusplus
}
#endif
#endif
|