![]() |
D.I.T. ( Do It Tizen! )
1.0.0
Samsung Software Membership
|
Device Status API 를 사용하기 위해 포함해야 하는 헤더이다. More...
#include <stdbool.h>
#include <stdalign.h>
#include "dit.h"
#include <device/display.h>
#include <device/haptic.h>
Data Structures | |
struct | Vibration |
Vibration 모듈에 대한 구조체이다. Vibration 모듈은 다양한 방식으로 진동을 조절 할 수 있다. More... | |
struct | VibrationExtend |
struct | Display |
Display 모듈에 대한 구조체이다. Display 모듈은 다양한 방식으로 화면을 조절 할 수 있다. More... | |
struct | DisplayExtend |
struct | Battery |
Battery 모듈에 대한 구조체이다. Battery 모듈은 배터리의 정보를 읽어 올 수 있다. More... | |
struct | BatteryExtend |
struct | Flash |
Flash 모듈에 대한 구조체이다. Flash 모듈은 Device의 플래시를 제어 할 수 있다. More... | |
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... | |
Device Status API 를 사용하기 위해 포함해야 하는 헤더이다.
struct VibrationExtend |
Data Fields | ||
---|---|---|
haptic_device_h | handle | |
struct _Vibration | vibration |
struct DisplayExtend |
Data Fields | ||
---|---|---|
int | brightLevel | |
struct _Display | display | |
display_state_e | state |
struct BatteryExtend |
Data Fields | ||
---|---|---|
struct _Battery | battery | |
int | batteryLevel | |
bool | charging |
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 |
void offFlash | ( | void | ) |
후면 카메라의 플래시를 끈다.
[in] | void | |
[out] | null |
bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
void 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로 출력한다. |