76092a2b7298e1b644cd6d2abe773bccc0360863
[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_INVALID_URI = 20,
34     SIMULATOR_INVALID_QUERY,
35     SIMULATOR_INVALID_IP,
36     SIMULATOR_INVALID_PORT,
37     SIMULATOR_INVALID_CALLBACK,
38     SIMULATOR_INVALID_METHOD,
39     SIMULATOR_INVALID_PARAM,
40     SIMULATOR_INVALID_OBSERVE_PARAM,
41     SIMULATOR_NO_MEMORY,
42     SIMULATOR_COMM_ERROR,
43     SIMULATOR_TIMEOUT,
44     SIMULATOR_ADAPTER_NOT_ENABLED,
45     SIMULATOR_NOTIMPL,
46     SIMULATOR_NO_RESOURCE,
47     SIMULATOR_RESOURCE_ERROR,
48     SIMULATOR_SLOW_RESOURCE,
49     SIMULATOR_DUPLICATE_REQUEST,
50     SIMULATOR_NO_OBSERVERS,
51     SIMULATOR_OBSERVER_NOT_FOUND,
52     SIMULATOR_VIRTUAL_DO_NOT_HANDLE,
53     SIMULATOR_INVALID_OPTION,
54     SIMULATOR_MALFORMED_RESPONSE,
55     SIMULATOR_PERSISTENT_BUFFER_REQUIRED,
56     SIMULATOR_INVALID_REQUEST_HANDLE,
57     SIMULATOR_INVALID_DEVICE_INFO,
58     SIMULATOR_INVALID_JSON,
59     SIMULATOR_UNAUTHORIZED_REQ,
60 #ifdef WITH_PRESENCE
61     SIMULATOR_PRESENCE_STOPPED = 128,
62     SIMULATOR_PRESENCE_TIMEOUT,
63     SIMULATOR_PRESENCE_DO_NOT_HANDLE,
64 #endif
65     /** STACK error codes - END */
66
67     /** Simulator specific error codes - START */
68     SIMULATOR_INVALID_TYPE,
69     SIMULATOR_NOT_SUPPORTED,
70     SIMULATOR_OPERATION_NOT_ALLOWED,
71     SIMULATOR_OPERATION_IN_PROGRESS,
72
73     SIMULATOR_INVALID_RESPONSE_CODE,
74     SIMULATOR_UKNOWN_PROPERTY,
75     SIMULATOR_TYPE_MISMATCH,
76     SIMULATOR_BAD_VALUE,
77     SIMULATOR_BAD_OBJECT,
78     /** Simulator specific error codes - END */
79
80     SIMULATOR_ERROR = 255
81 } SimulatorResult;
82 #endif //SIMULATOR_ERROR_CODES_H_