Fix for Jira issue: IOT-1252
[platform/upstream/iotivity.git] / service / simulator / inc / simulator_error_codes.h
1 /******************************************************************
2  *
3  * Copyright 2015 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************/
20
21 #ifndef SIMULATOR_ERROR_CODES_H_
22 #define SIMULATOR_ERROR_CODES_H_
23
24 #include <iostream>
25
26 typedef enum
27 {
28     /** STACK error codes - START */
29     SIMULATOR_OK = 0,
30     SIMULATOR_RESOURCE_CREATED,
31     SIMULATOR_RESOURCE_DELETED,
32     SIMULATOR_CONTINUE,
33     SIMULATOR_RESOURCE_CHANGED,
34     SIMULATOR_INVALID_URI = 20,
35     SIMULATOR_INVALID_QUERY,
36     SIMULATOR_INVALID_IP,
37     SIMULATOR_INVALID_PORT,
38     SIMULATOR_INVALID_CALLBACK,
39     SIMULATOR_INVALID_METHOD,
40     SIMULATOR_INVALID_PARAM,
41     SIMULATOR_INVALID_OBSERVE_PARAM,
42     SIMULATOR_NO_MEMORY,
43     SIMULATOR_COMM_ERROR,
44     SIMULATOR_TIMEOUT,
45     SIMULATOR_ADAPTER_NOT_ENABLED,
46     SIMULATOR_NOTIMPL,
47     SIMULATOR_NO_RESOURCE,
48     SIMULATOR_RESOURCE_ERROR,
49     SIMULATOR_SLOW_RESOURCE,
50     SIMULATOR_DUPLICATE_REQUEST,
51     SIMULATOR_NO_OBSERVERS,
52     SIMULATOR_OBSERVER_NOT_FOUND,
53     SIMULATOR_VIRTUAL_DO_NOT_HANDLE,
54     SIMULATOR_INVALID_OPTION,
55     SIMULATOR_MALFORMED_RESPONSE,
56     SIMULATOR_PERSISTENT_BUFFER_REQUIRED,
57     SIMULATOR_INVALID_REQUEST_HANDLE,
58     SIMULATOR_INVALID_DEVICE_INFO,
59     SIMULATOR_INVALID_JSON,
60     SIMULATOR_UNAUTHORIZED_REQ,
61     SIMULATOR_TOO_LARGE_REQ,
62     SIMULATOR_PDM_IS_NOT_INITIALIZED,
63     SIMULATOR_DUPLICATE_UUID,
64     SIMULATOR_INCONSISTENT_DB,
65     SIMULATOR_AUTHENTICATION_FAILURE,
66 #ifdef WITH_PRESENCE
67     SIMULATOR_PRESENCE_STOPPED = 128,
68     SIMULATOR_PRESENCE_TIMEOUT,
69     SIMULATOR_PRESENCE_DO_NOT_HANDLE,
70 #endif
71     /** STACK error codes - END */
72
73     /** Simulator specific error codes - START */
74     SIMULATOR_INVALID_TYPE,
75     SIMULATOR_NOT_SUPPORTED,
76     SIMULATOR_OPERATION_NOT_ALLOWED,
77     SIMULATOR_OPERATION_IN_PROGRESS,
78
79     SIMULATOR_INVALID_RESPONSE_CODE,
80     SIMULATOR_UKNOWN_PROPERTY,
81     SIMULATOR_TYPE_MISMATCH,
82     SIMULATOR_BAD_VALUE,
83     SIMULATOR_BAD_OBJECT,
84     SIMULATOR_BAD_SCHEMA,
85     /** Simulator specific error codes - END */
86
87     SIMULATOR_ERROR = 255
88 } SimulatorResult;
89 #endif //SIMULATOR_ERROR_CODES_H_