Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/file_p.h
Show All 15 Lines | 1 | /*** | |||
---|---|---|---|---|---|
16 | 16 | | |||
17 | You should have received a copy of the GNU Lesser General Public | 17 | You should have received a copy of the GNU Lesser General Public | ||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | ***/ | 19 | ***/ | ||
20 | 20 | | |||
21 | #ifndef FILE_P_H | 21 | #ifndef FILE_P_H | ||
22 | #define FILE_P_H | 22 | #define FILE_P_H | ||
23 | 23 | | |||
24 | #define EUSERCANCELLED 255 | ||||
dfaure: #define is for 1990, these days we have a proper C++ language where preprocessor hacks are less… | |||||
25 | | ||||
24 | enum ActionType { | 26 | enum ActionType { | ||
25 | CHMOD = 1, | 27 | CHMOD = 1, | ||
26 | CHOWN, | 28 | CHOWN, | ||
27 | DEL, | 29 | DEL, | ||
28 | MKDIR, | 30 | MKDIR, | ||
29 | OPEN, | 31 | OPEN, | ||
30 | OPENDIR, | 32 | OPENDIR, | ||
31 | RENAME, | 33 | RENAME, | ||
32 | RMDIR, | 34 | RMDIR, | ||
33 | SYMLINK, | 35 | SYMLINK, | ||
34 | UTIME, | 36 | UTIME, | ||
35 | }; | 37 | }; | ||
36 | 38 | | |||
37 | #endif | 39 | #endif |
#define is for 1990, these days we have a proper C++ language where preprocessor hacks are less and less needed.
An enum value is probably the cleanest way here (to avoid the whole issue of "in which .cpp file to implement it", if it was an actual int variable).
The naming EFOO is very libc-like, I wouldn't use this here.
In fact, why not use KIO::ERR_USER_CANCELED? (note that it has a value of 1, don't use 1 for something else ;)