9b7036776863e9afc87bc98630b7fd6654c52cb1
[platform/core/api/device.git] / include / device-error.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef __TIZEN_SYSTEM_DEVICE_ERROR_H__
19 #define __TIZEN_SYSTEM_DEVICE_ERROR_H__
20
21
22 #include <tizen.h>
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29
30 /**
31  * @addtogroup CAPI_SYSTEM_DEVICE_MODULE
32  * @{
33  */
34
35
36 /**
37  * @brief Enumeration for device's error code.
38  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
39  */
40 typedef enum {
41         DEVICE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
42         DEVICE_ERROR_OPERATION_FAILED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */
43         DEVICE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
44         DEVICE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
45         DEVICE_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Operation already in progress */
46         DEVICE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported in this device */
47         DEVICE_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */
48         DEVICE_ERROR_NOT_INITIALIZED = TIZEN_ERROR_DEVICE | 0x13, /**< Not initialized */
49 } device_error_e;
50
51
52 /**
53  * @}
54  */
55
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61
62 #endif  // __TIZEN_SYSTEM_DEVICE_ERROR_H__