summaryrefslogtreecommitdiffstats
path: root/smb4k/core/smb4kdefs.h
blob: b9ce07f86f98946ace644e1a7068f01816bad302 (plain)
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
147
/***************************************************************************
    smb4kdefs.h  -  Definitions for Smb4K
                             -------------------
    begin                : Mo Mär 15 2004
    copyright            : (C) 2004 by Alexander Reinholdt
    email                : dustpuppy@mail.berlios.de
 ***************************************************************************/

/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful, but   *
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 *   General Public License for more details.                              *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,   *
 *   MA  02110-1301 USA                                                    *
 ***************************************************************************/


#ifndef SMB4KDEFS_H
#define SMB4KDEFS_H


#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

//
// Run states
//

#define SCANNER_INIT                          0
#define SCANNER_OPENING_WORKGROUP             1
#define SCANNER_OPENING_HOST                  2
#define SCANNER_RETRIEVING_INFO               3
#define SCANNER_SEARCHING                     4
#define SCANNER_RETRYING_OPENING_HOST         5
#define SCANNER_STOP                          6
#define MOUNTER_MOUNTING                      7
#define MOUNTER_UNMOUNTING                    8
#define MOUNTER_STOP                          9
#define PRINT_START                          10
#define PRINT_STOP                           11
#define SYNCHRONIZER_START                   12
#define SYNCHRONIZER_STOP                    13
#define PREVIEWER_START                      14
#define PREVIEWER_STOP                       15
#define CORE_STOP                            16

//
// Error codes:
//

// (1) Network related errors.
#define ERROR_GETTING_BROWSELIST            100
#define ERROR_GETTING_MEMBERS               101
#define ERROR_GETTING_SHARES                102
#define ERROR_GETTING_PREVIEW               103
#define ERROR_NET_COMMAND                   104
#define ERROR_IP_CANNOT_BE_USED             105

// (2) Errors involving mounting, unmounting
// and importing shares.
#define ERROR_MOUNTING_SHARE                106
#define ERROR_UNMOUNTING_SHARE              107
#define ERROR_UNMOUNTING_NOT_ALLOWED        108
#define ERROR_MOUNTPOINT_EMPTY              109
#define ERROR_IMPORTING_SHARES              110

// (3) Errors that are connected to printing
#define ERROR_PRINTING                      111

// (4) Errors that are connected to
// synchronization
#define ERROR_SYNCHRONIZING                 112

// (5) Errors that occur when handling
// bookmarks
#define ERROR_BOOKMARK_PRINTER              113

// (6) Errors that occur when handling
// authentication data
#define ERROR_OPENING_WALLET_FAILED         114

// (7) Errors that occur when handling files
// and directories.
#define ERROR_FILE_NOT_FOUND                115
#define ERROR_OPENING_FILE		              116
#define ERROR_READING_FILE                  117
#define ERROR_WRITING_FILE                  118
#define ERROR_CLOSING_FILE                  119
#define ERROR_GETTING_PERMISSIONS           120
#define ERROR_DIRECTORY_NOT_FOUND           121
#define ERROR_CREATING_TEMP_DIR             122
#define ERROR_CREATING_TEMP_FILE            123
#define ERROR_FILE_IS_IRREGULAR             124
#define ERROR_MKDIR_FAILED                  125

// (8) Errors that occur when handling programs
#define ERROR_MISSING_PROGRAMS              126
#define ERROR_COMMAND_NOT_FOUND             127

// (9) Other errors
#define ERROR_UNKNOWN                       128
#define ERROR_GETTING_HOSTNAME              129
#define ERROR_LOCKED                        130
#define ERROR_FEATURE_NOT_ENABLED           131
#define ERROR_GETTING_GIDS                  132

//
// Warning codes:
//

/* None defined yet. use 200 ff. for that */

//
// Information codes:
//

#define INFO_MIMETYPE_NOT_SUPPORTED         300
#define INFO_DISABLE_SUID_FEATURE           301
#define INFO_BOOKMARK_LABEL_IN_USE          302

//
// Event types
//

#define EVENT_LOAD_SETTINGS              100000
#define EVENT_SET_FOCUS                  100001
#define EVENT_SCAN_NETWORK               100002

//
// Other definitions
//

#define TIMER_INTERVAL                       25
#define THREAD_WAITING_TIME                 100
#define TEMPPATHLEN                          18

#endif