![]() |
D.I.T. ( Do It Tizen! )
1.0.0
Samsung Software Membership
|
Device Status API가 정의되어있다. More...
#include "Device/DeviceStatus.h"#include <stdbool.h>#include <stdlib.h>#include <device/battery.h>#include <device/display.h>#include <device/led.h>#include <device/haptic.h>#include <dlog.h>
Functions | |
| const char * | DeviceStatusErrorCheck (int errCode) |
| Device Status API에서 발생하는 Error Code들을 확인 해준다. More... | |
| Vibration | NewVibration (void) |
| 새로운 Vibration 객체를 생성한다. More... | |
| void | DestroyVibration (Vibration this_gen) |
| 생성한 Vibration 객체를 소멸 시킨다. More... | |
| bool | VibrationCustom (Vibration this_gen, int period) |
| 사용자가 정의한 시간만큼 device를 진동 시킨다. More... | |
| bool | VibrationShort (Vibration this_gen) |
| 짧은 시간만큼 device를 진동 시킨다. (0.1초) More... | |
| bool | VibrationMiddle (Vibration this_gen) |
| 중간 시간만큼 device를 진동 시킨다. (0.5초) More... | |
| bool | VibrationLong (Vibration this_gen) |
| 긴 시간만큼 device를 진동 시킨다. (1.5초) More... | |
| Display | NewDisplay (void) |
| 새로운 Display 객체를 생성한다. More... | |
| void | DestroyDisplay (Display this_gen) |
| 생성한 Display 객체를 소멸 시킨다. More... | |
| bool | DisplayLock (Display this_gen) |
| Device의 화면을 강제로 끈다.(잠금) More... | |
| bool | DisplayUnlock (Display this_gen) |
| Device의 꺼진 화면을 다시 켠다. More... | |
| bool | DisplayDim (Display this_gen) |
| Device의 화면을 어둡게 한다. More... | |
| int | getDisplayBrightLevel (Display this_gen) |
| 현재 화면의 밝기 값을 반환 한다. More... | |
| bool | setDisplayBrightLevel (Display this_gen, int brightLevel) |
| 현재 화면의 밝기 값을 설정 한다. More... | |
| Battery | NewBattery (void) |
| 새로운 Battery 객체를 생성한다. More... | |
| void | DestoryBattery (Battery this_gen) |
| 생성한 Battery 객체를 소멸 시킨다. More... | |
| int | getBatteryRemainsPercent (Battery this_gen) |
| 현재 배터리의 잔량을 반환 한다. More... | |
| bool | isBatteryCharging (Battery this_gen) |
| 현재 배터리의 충전 상태 여부를 반환 한다. More... | |
| Flash | NewFlash (void) |
| 새로운 Flash 객체를 생성한다. More... | |
| void | DestoryFlash (Flash this_gen) |
| 생성한 Flash 객체를 소멸 시킨다. More... | |
| bool | onFlash (void) |
| 후면 카메라의 플래시를 켠다. More... | |
| bool | offFlash (void) |
| 후면 카메라의 플래시를 끈다. More... | |
| void DestoryBattery | ( | Battery | this_gen | ) |
생성한 Battery 객체를 소멸 시킨다.
| [in] | this_gen | 소멸시킬 Battery 객체 |
| [out] | null |
| void |
| void DestoryFlash | ( | Flash | this_gen | ) |
생성한 Flash 객체를 소멸 시킨다.
| [in] | this_gen | 소멸시킬 Flash 객체 |
| [out] | null |
| void |
| void DestroyDisplay | ( | Display | this_gen | ) |
생성한 Display 객체를 소멸 시킨다.
| [in] | this_gen | 소멸시킬 Display 객체 |
| [out] | null |
| void |
| void DestroyVibration | ( | Vibration | this_gen | ) |
생성한 Vibration 객체를 소멸 시킨다.
| [in] | this_gen | 소멸시킬 Vibration 객체 |
| [out] | null |
| void |
| const char* DeviceStatusErrorCheck | ( | int | errCode | ) |
Device Status API에서 발생하는 Error Code들을 확인 해준다.
| [in] | errCode | 확인 하고자 하는 Error Code |
| [out] | null |
| DEVICE_ERROR_NONE | : Successful |
| DEVICE_ERROR_OPERATION_FAILED | : Operation not permitted |
| DEVICE_ERROR_PERMISSION_DENIED | : Permission denied |
| DEVICE_ERROR_INVALID_PARAMETER | : Invalid parameter |
| DEVICE_ERROR_ALREADY_IN_PROGRESS | : Operation already in progress |
| DEVICE_ERROR_NOT_SUPPORTED | : Not supported in this device |
| DEVICE_ERROR_NOT_INITIALIZED | : Not initialized |
| DEVICE_ERROR_UNKNOWN | : Unknown error occurred |

| bool DisplayDim | ( | Display | this_gen | ) |
Device의 화면을 어둡게 한다.
| [in] | this_gen | 어둡게 할 Display 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool DisplayLock | ( | Display | this_gen | ) |
Device의 화면을 강제로 끈다.(잠금)
| [in] | this_gen | 강제로 끌 Display 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool DisplayUnlock | ( | Display | this_gen | ) |
Device의 꺼진 화면을 다시 켠다.
| [in] | this_gen | 다시 켤 Display 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| int getBatteryRemainsPercent | ( | Battery | this_gen | ) |
현재 배터리의 잔량을 반환 한다.
| [in] | this_gen | 배터리 잔량을 반환 할 Battery 객체 |
| [out] | null |
| int | 배터리 잔량은 % 단위로 0 ~ 100의 값을 가진다. |


| int getDisplayBrightLevel | ( | Display | this_gen | ) |
현재 화면의 밝기 값을 반환 한다.
| [in] | this_gen | 밝기 값을 반환 할 Display 객체 |
| [out] | null |
| int | 현재 화면 밝기(%) |


| bool isBatteryCharging | ( | Battery | this_gen | ) |
현재 배터리의 충전 상태 여부를 반환 한다.
| [in] | this_gen | 충전 상태 여부를 반환 할 Battery 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
true, 충전 중이 아니라면 false를 반환한다. 

| Battery NewBattery | ( | void | ) |
새로운 Battery 객체를 생성한다.
| [in] | void | |
| [out] | null |
| Battery |

| Display NewDisplay | ( | void | ) |
새로운 Display 객체를 생성한다.
| [in] | void | |
| [out] | null |
| Display |

| Flash NewFlash | ( | void | ) |
새로운 Flash 객체를 생성한다.
| [in] | void | |
| [out] | null |
| Flash |

| Vibration NewVibration | ( | void | ) |
새로운 Vibration 객체를 생성한다.
| [in] | void | |
| [out] | null |
| Vibration |

| bool offFlash | ( | void | ) |
후면 카메라의 플래시를 끈다.
| [in] | void | |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool onFlash | ( | void | ) |
후면 카메라의 플래시를 켠다.
| [in] | void | |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool setDisplayBrightLevel | ( | Display | this_gen, |
| int | brightLevel | ||
| ) |
현재 화면의 밝기 값을 설정 한다.
| [in] | this_gen | 밝기 값을 설정 할 Display 객체 |
| [in] | brightLevel | 밝기 값 (0 ~ 100) |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool VibrationCustom | ( | Vibration | this_gen, |
| int | period | ||
| ) |
사용자가 정의한 시간만큼 device를 진동 시킨다.
| [in] | this_gen | 진동 시킬 Vibration 객체 |
| [in] | period | 진동 시킬 시간 (Millisecond) |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
period 만큼 device를 진동시킨다. 

| bool VibrationLong | ( | Vibration | this_gen | ) |
긴 시간만큼 device를 진동 시킨다. (1.5초)
| [in] | this_gen | 진동 시킬 Vibration 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool VibrationMiddle | ( | Vibration | this_gen | ) |
중간 시간만큼 device를 진동 시킨다. (0.5초)
| [in] | this_gen | 진동 시킬 Vibration 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool VibrationShort | ( | Vibration | this_gen | ) |
짧은 시간만큼 device를 진동 시킨다. (0.1초)
| [in] | this_gen | 진동 시킬 Vibration 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


1.8.6