HCE project C++ developers source code library
1.1.1
HCE project developer library
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
SphinxMessageConst.hpp
Go to the documentation of this file.
1
14
#ifndef SPHINX_MESSAGE_CONST_HPP
15
#define SPHINX_MESSAGE_CONST_HPP
16
17
namespace
HCE
18
{
19
namespace
sphinx
20
{
21
namespace
message_const
22
{
23
//-----------------------------------------------------------------------------
24
enum
25
{
26
LOAD_CONFIG_SUCCESS
=0,
27
HOST
,
28
PORT
,
29
INDEX
,
30
FILE_NOT_FOUND
,
31
FILE_NOT_OPEN
,
32
SEARCHD_MAX_MATCHES
,
33
SCHEMA_NAMES_SIZE
,
34
ATTRIBUTES_COUNT
,
35
EMPTY_LIST_OF_INDEX_FILES
,
36
LOAD_CONFIG_FAIL
,
37
EMPTY_RESULT_DATA
,
38
INCORRECT_JSON_TYPE
,
39
ERROR
,
40
ERROR_MSG
,
41
ERROR_CODE
,
42
SERIALIZE_OUTPUT_JSON_MESSAGE
,
43
GENERATE_DEFAULT_JSON
,
44
TRY_MAKE_INDEX_COMMAND
,
45
DOCUMENT_CONTENT_IS_EMPTY
,
46
INDEX_NAME
,
47
MAKE_INDEX_COMMAND_SUCCESS
,
48
TRY_MAKE_ADMIN_COMMAND
,
49
RECEIVED_EMPTY_COMMAND_STRING
,
50
UNKNOWN_COMMAND
,
51
MAKE_ADMIN_COMMAND_SUCCESS
,
52
FAILED_TO_CREATE_CLIENT
,
53
START_SEARCHD_READ_CONFIG
,
54
WAIT_START_SEARCHD
,
55
START_SEARCHD_FAIL
,
56
TRY_EASY_START
,
57
WAIT_STOP_SEARCHD
,
58
STOP_SEARCHD
,
59
INVALID_CLIENT_HANDLE
,
60
INVALID_FILTER
,
61
ADD_FILTER
,
62
INVALID_RANGE_OF_FILTER
,
63
UNKNOWN_FILTER_TYPE
,
64
SERVER_HOST_IS_EMPTY
,
65
SERVER_PORT_IS_NULL
,
66
SET_SERVER_SUCCESS
,
67
OPEN_CONNECTION_ERROR
,
68
EASY_START_SUCCESS
,
69
EASY_START_FALLEN
,
70
FIELD_ALREADY_EXIST
,
71
FIELD_NOT_FOUND
,
72
INDEX_ALREADY_EXIST
,
73
INDEX_NOT_FOUND
,
74
NOT_FOUND_IN_CONFIG
,
75
LIST_OF_INDEXES_IS_EMPTY
,
76
SEARCHD_ERROR
,
77
SEARCHD_WARNING
,
78
SEARCHD_STOPPED_PID_FILE_EXIST
,
79
SEARCHD_STOPPED_BUT_PID_FILE_EXIST
,
80
SEARCHD_NOT_ACTIVITY
,
81
FIELD_NOT_FOUND_IN_CURRENT_SCHEMA
,
82
GETTING_PARAMETERS_FAIL
,
83
ERROR_CLEAN_DIR
,
84
FOUND_INDEX_FILE
,
85
REMOVE_INDEX_FILE
,
86
REMOVE_FILE_FAIL
,
87
OPEN_DIR_FAIL
,
88
ERROR_GET_FILE_LIST
,
89
ERROR_GET_INDEX_LIST
,
90
EMPTY_DATA_DIR
,
91
TRY_OPEN_FILE_FAIL
,
92
TRY_USE_AS_DIRECTORY_WAS_CANCELED
,
93
CLOSE_DIR_FAIL
,
94
FOUND_FREE_ALLOWED_PORT
,
95
ERROR_GET_FREE_ALLOWED_PORT
,
96
ERROR_MAKE_CONFIG
,
97
MAKE_DIR_FAIL
,
98
DONT_CREATED_DIR
,
99
// DONT_CREATED_FILE,
100
FOLDER_NOT_EXIST
,
101
FILE_NOT_EXIST
,
102
INVALID_DATA_CONTENT
,
103
INVALID_SCHEMA_CONTENT
,
104
COMMAND_LINE
,
105
INDEXATION_FAIL
,
106
BAD_BRANCH_NAME
,
107
MAKE_SOURCE_FAIL
,
108
MAKE_SOURCE
,
109
MAKE_INDEX
,
110
RECEIVED_EMPTY_LIST_BRANCHES
111
// TODO
112
};
113
114
const
char
delimiter
=
':'
;
115
const
char
space
=
' '
;
116
const
char
point
=
'.'
;
117
118
const
std::string
loadConfigSuccess
=
"LOAD CONFIG SUCCESS"
;
119
const
std::string
host
=
"HOST"
;
120
const
std::string
port
=
"PORT"
;
121
const
std::string
index
=
"INDEX"
;
122
const
std::string
fileNotFound
=
"File not found"
;
123
const
std::string
fileNotOpen
=
"File not open"
;
124
const
std::string
searchdMaxMatches
=
"SEARCHD MAX MATCHES"
;
125
const
std::string
schemaNamesSize
=
"SCHEMA NAMES SIZE"
;
126
const
std::string
attributesCount
=
"ATTRIBUTES COUNT"
;
127
const
std::string
emptyListOfindexFiles
=
"Empty list of index files"
;
128
const
std::string
loadConfigFail
=
"LOAD CONFIG FAIL"
;
129
const
std::string
emptyResultData
=
"Empty result data"
;
130
const
std::string
incorrectJSONType
=
"Incorrect JSON type"
;
131
const
std::string
error
=
"Error"
;
132
const
std::string
errorMsg
=
"ErrorMsg"
;
133
const
std::string
errorCode
=
"ErrorCode"
;
134
const
std::string
serializeOutputJsonMessage
=
"Serialize OutputJsonMessage"
;
135
const
std::string
generateDefaultJSON
=
"Generate default JSON"
;
136
const
std::string
tryMakeIndexCommand
=
"TRY MAKE INDEX COMMAND"
;
137
const
std::string
documentContentIsEmpty
=
"Document content is empty"
;
138
const
std::string
indexName
=
"INDEX NAME"
;
139
const
std::string
makeIndexCommandSuccess
=
"!!! MAKE INDEX COMMAND SUCCESS !!!"
;
140
const
std::string
tryMakeAdminCommand
=
"TRY MAKE ADMIN COMMAND"
;
141
const
std::string
receivedEmptyCommandString
=
"Received empty command string"
;
142
const
std::string
unknownCommand
=
"Unknown command"
;
143
const
std::string
makeAdminCommandSuccess
=
"!!! MAKE ADMIN COMMAND SUCCESS !!!"
;
144
const
std::string
failedToCreateClient
=
"Failed to create client"
;
145
const
std::string
startSearchdReadConfig
=
"startSearchd read config"
;
146
const
std::string
waitStartSearchd
=
"!!! WAIT START SEARCHD !!!"
;
147
const
std::string
startSearchdFail
=
"Start searchd fail"
;
148
const
std::string
tryEasyStart
=
"TRY EASY START"
;
149
const
std::string
waitStopSearchd
=
"!!! WAIT STOP SEARCHD !!!"
;
150
const
std::string
stopSearchd
=
"STOP SEARCHD"
;
151
const
std::string
invalidClientHandle
=
"Invalid client handle"
;
152
const
std::string
invalidFilter
=
"Invalid filter"
;
153
const
std::string
addFilter
=
"Add filter"
;
154
const
std::string
invalidRangeOfFilter
=
"Invalid range of filter"
;
155
const
std::string
unknownFilterType
=
"Unknown filter type"
;
156
const
std::string
serverHostIsEmpty
=
"Server host is empty"
;
157
const
std::string
serverPortIsNull
=
"Server port is null"
;
158
const
std::string
setServerSuccess
=
"!!! SET SERVER SUCCESS !!!"
;
159
const
std::string
openConnectionError
=
"Open connection error"
;
160
const
std::string
easyStartSuccess
=
"!!! EASY START SUCCESS !!!"
;
161
const
std::string
easyStartFallen
=
"!!! EASY START FALLEN !!!"
;
162
const
std::string
fieldAlreadyExist
=
"Field already exist"
;
163
const
std::string
fieldNotFound
=
"Field not found"
;
164
const
std::string
indexAlreadyExist
=
"Index already exist"
;
165
const
std::string
indexNotFound
=
"Index not found"
;
166
const
std::string
notFoundInConfig
=
"NOT FOUND IN CONFIG"
;
167
const
std::string
listOfIndexesIsEmpty
=
"List of indexes is empty, check initialization"
;
168
const
std::string
searchdError
=
"SEARCHD ERROR"
;
169
const
std::string
searchdWarning
=
"SEARCHD WARNING"
;
170
const
std::string
searchdStoppedPidFileExist
=
"Searchd stopped. Pid file exist = "
;
171
const
std::string
searchdStoppedButPidFileExist
=
"Searchd stoped but pid file exist"
;
172
const
std::string
searchdNotActivity
=
"Searchd not activity"
;
173
const
std::string
fieldNotFoundInCurrentSchema
=
"Field not found in current schema"
;
174
const
std::string
gettingParametersFail
=
"Getting parameters fail"
;
175
const
std::string
errorCleanDir
=
"ERROR CLEAN DIR"
;
176
const
std::string
foundIndexFile
=
"FOUND INDEX FILE"
;
177
const
std::string
removeIndexFile
=
"REMOVE INDEX FILE"
;
178
const
std::string
removeFileFail
=
"Remove file fail"
;
179
const
std::string
openDirFail
=
"Open dir fail"
;
180
const
std::string
errorGetFileList
=
"ERROR GET FILE LIST"
;
181
const
std::string
errorGetIndexList
=
"ERROR GET INDEX LIST"
;
182
const
std::string
emptyDataDir
=
"Empty data dir"
;
183
const
std::string
tryOpenFileFail
=
"Try open file fail"
;
184
const
std::string
tryUseAsDirectoryWasCanceled
=
"Try use as directory was canceled..."
;
185
const
std::string
closeDirFail
=
"Close dir fail"
;
186
const
std::string
foundFreeAllowedPort
=
"FOUND FREE ALLOWED PORT"
;
187
const
std::string
errorGetFreeAllowedPort
=
"ERROR GET FREE ALLOWED PORT"
;
188
const
std::string
errorMakeConfig
=
"ERROR MAKE CONFIG"
;
189
const
std::string
makeDirFail
=
"Make dir fail"
;
190
const
std::string
dontCreatedDir
=
"Don't created directory"
;
191
// const std::string dontCreatedFile = "Don't created file";
192
const
std::string
folderNotExist
=
"Forder not exist"
;
193
const
std::string
fileNotExist
=
"File not exist"
;
194
const
std::string
invalidDataContent
=
"Invalid data content"
;
195
const
std::string
invalidSchemaContent
=
"Invalid schema content"
;
196
const
std::string
commandLine
=
"COMMAND LINE"
;
197
const
std::string
indexationFail
=
"Indexation fail"
;
198
const
std::string
badBranchName
=
"Bad branch name"
;
199
const
std::string
makeSourceFail
=
"Make source fail"
;
200
const
std::string
makeSource
=
"MAKE SOURCE"
;
201
const
std::string
makeIndex
=
"MAKE INDEX"
;
202
const
std::string
receivedEmptyListOfBranches
=
"Received empty list of branches"
;
203
// TODO
204
const
std::vector<std::pair<unsigned int, std::string> >
messages
=
205
{
206
{
LOAD_CONFIG_SUCCESS
,
loadConfigSuccess
},
207
{
HOST
,
host
},
208
{
PORT
,
port
},
209
{
INDEX
,
index
},
210
{
FILE_NOT_FOUND
,
fileNotFound
},
211
{
FILE_NOT_OPEN
,
fileNotOpen
},
212
{
SEARCHD_MAX_MATCHES
,
searchdMaxMatches
},
213
{
SCHEMA_NAMES_SIZE
,
schemaNamesSize
},
214
{
ATTRIBUTES_COUNT
,
attributesCount
},
215
{
EMPTY_LIST_OF_INDEX_FILES
,
emptyListOfindexFiles
},
216
{
LOAD_CONFIG_FAIL
,
loadConfigFail
},
217
{
EMPTY_RESULT_DATA
,
emptyResultData
},
218
{
INCORRECT_JSON_TYPE
,
incorrectJSONType
},
219
{
ERROR
,
error
},
220
{
ERROR_MSG
,
errorMsg
},
221
{
ERROR_CODE
,
errorCode
},
222
{
SERIALIZE_OUTPUT_JSON_MESSAGE
,
serializeOutputJsonMessage
},
223
{
GENERATE_DEFAULT_JSON
,
generateDefaultJSON
},
224
{
TRY_MAKE_INDEX_COMMAND
,
tryMakeIndexCommand
},
225
{
DOCUMENT_CONTENT_IS_EMPTY
,
documentContentIsEmpty
},
226
{
INDEX_NAME
,
indexName
},
227
{
MAKE_INDEX_COMMAND_SUCCESS
,
makeIndexCommandSuccess
},
228
{
TRY_MAKE_ADMIN_COMMAND
,
tryMakeAdminCommand
},
229
{
RECEIVED_EMPTY_COMMAND_STRING
,
receivedEmptyCommandString
},
230
{
UNKNOWN_COMMAND
,
unknownCommand
},
231
{
MAKE_ADMIN_COMMAND_SUCCESS
,
makeAdminCommandSuccess
},
232
{
FAILED_TO_CREATE_CLIENT
,
failedToCreateClient
},
233
{
START_SEARCHD_READ_CONFIG
,
startSearchdReadConfig
},
234
{
WAIT_START_SEARCHD
,
waitStartSearchd
},
235
{
START_SEARCHD_FAIL
,
startSearchdFail
},
236
{
TRY_EASY_START
,
tryEasyStart
},
237
{
WAIT_STOP_SEARCHD
,
waitStopSearchd
},
238
{
STOP_SEARCHD
,
stopSearchd
},
239
{
INVALID_CLIENT_HANDLE
,
invalidClientHandle
},
240
{
INVALID_FILTER
,
invalidFilter
},
241
{
ADD_FILTER
,
addFilter
},
242
{
INVALID_RANGE_OF_FILTER
,
invalidRangeOfFilter
},
243
{
UNKNOWN_FILTER_TYPE
,
unknownFilterType
},
244
{
SERVER_HOST_IS_EMPTY
,
serverHostIsEmpty
},
245
{
SERVER_PORT_IS_NULL
,
serverPortIsNull
},
246
{
SET_SERVER_SUCCESS
,
setServerSuccess
},
247
{
OPEN_CONNECTION_ERROR
,
openConnectionError
},
248
{
EASY_START_SUCCESS
,
easyStartSuccess
},
249
{
EASY_START_FALLEN
,
easyStartFallen
},
250
{
FIELD_ALREADY_EXIST
,
fieldAlreadyExist
},
251
{
FIELD_NOT_FOUND
,
fieldNotFound
},
252
{
INDEX_ALREADY_EXIST
,
indexAlreadyExist
},
253
{
INDEX_NOT_FOUND
,
indexNotFound
},
254
{
NOT_FOUND_IN_CONFIG
,
notFoundInConfig
},
255
{
LIST_OF_INDEXES_IS_EMPTY
,
listOfIndexesIsEmpty
},
256
{
SEARCHD_ERROR
,
searchdError
},
257
{
SEARCHD_WARNING
,
searchdWarning
},
258
{
SEARCHD_STOPPED_PID_FILE_EXIST
,
searchdStoppedPidFileExist
},
259
{
SEARCHD_STOPPED_BUT_PID_FILE_EXIST
,
searchdStoppedButPidFileExist
},
260
{
SEARCHD_NOT_ACTIVITY
,
searchdNotActivity
},
261
{
FIELD_NOT_FOUND_IN_CURRENT_SCHEMA
,
fieldNotFoundInCurrentSchema
},
262
{
GETTING_PARAMETERS_FAIL
,
gettingParametersFail
},
263
{
ERROR_CLEAN_DIR
,
errorCleanDir
},
264
{
FOUND_INDEX_FILE
,
foundIndexFile
},
265
{
REMOVE_INDEX_FILE
,
removeIndexFile
},
266
{
REMOVE_FILE_FAIL
,
removeFileFail
},
267
{
OPEN_DIR_FAIL
,
openDirFail
},
268
{
ERROR_GET_FILE_LIST
,
errorGetFileList
},
269
{
ERROR_GET_INDEX_LIST
,
errorGetIndexList
},
270
{
EMPTY_DATA_DIR
,
emptyDataDir
},
271
{
TRY_OPEN_FILE_FAIL
,
tryOpenFileFail
},
272
{
TRY_USE_AS_DIRECTORY_WAS_CANCELED
,
tryUseAsDirectoryWasCanceled
},
273
{
CLOSE_DIR_FAIL
,
closeDirFail
},
274
{
FOUND_FREE_ALLOWED_PORT
,
foundFreeAllowedPort
},
275
{
ERROR_GET_FREE_ALLOWED_PORT
,
errorGetFreeAllowedPort
},
276
{
ERROR_MAKE_CONFIG
,
errorMakeConfig
},
277
{
MAKE_DIR_FAIL
,
makeDirFail
},
278
{
DONT_CREATED_DIR
,
dontCreatedDir
},
279
// { DONT_CREATED_FILE, dontCreatedFile },
280
{
FOLDER_NOT_EXIST
,
folderNotExist
},
281
{
FILE_NOT_EXIST
,
fileNotExist
},
282
{
INVALID_DATA_CONTENT
,
invalidDataContent
},
283
{
INVALID_SCHEMA_CONTENT
,
invalidSchemaContent
},
284
{
COMMAND_LINE
,
commandLine
},
285
{
INDEXATION_FAIL
,
indexationFail
},
286
{
BAD_BRANCH_NAME
,
badBranchName
},
287
{
MAKE_SOURCE_FAIL
,
makeSourceFail
},
288
{
MAKE_SOURCE
,
makeSource
},
289
{
MAKE_INDEX
,
makeIndex
},
290
{
RECEIVED_EMPTY_LIST_BRANCHES
,
receivedEmptyListOfBranches
}
291
292
// TODO
293
};
294
//-----------------------------------------------------------------------------
295
//-----------------------------------------------------------------------------
296
}
// namespace message_const
297
}
// namespace sphinx
298
}
// namespace HCE
299
#endif // SPHINX_MESSAGE_CONST_HPP
sources
sphinx
src
SphinxMessageConst.hpp
Generated on Mon Jan 13 2014 13:08:39 for HCE project C++ developers source code library by
1.8.1.2