GPS API 를 사용하기 위해 포함해야 하는 헤더이다.
More...
#include <stdbool.h>
#include <stdalign.h>
#include <locations.h>
GPS API 를 사용하기 위해 포함해야 하는 헤더이다.
- Note
- GPS의 isAccessible / onConnect / onDisconnect / Recv API를 제공한다.
- See Also
- Tizen Native API
Data Fields |
double |
altitude |
|
double |
climb |
|
double |
direction |
|
double |
horizontal |
|
double |
latitude |
|
location_accuracy_level_e |
level |
|
double |
longitude |
|
double |
speed |
|
time_t |
timestamp |
|
bool |
validation |
|
double |
vertical |
|
Data Fields |
bool |
access |
|
bool |
connect |
|
struct _gps |
gps |
|
Location |
location |
|
location_manager_h |
manager |
|
location_service_state_e |
state |
|
void DestroyGps |
( |
GPS |
this_gen | ) |
|
생성한 GPS 객체를 소멸 시킨다.
- Parameters
-
[in] | this_gen | 소멸시킬 GPS 객체 |
[out] | null | |
- Return values
-
- Note
- 생성한 GPS 객체를 소멸 시킨다.
GPS 객체를 사용한 후 반드시 호출해야 한다.
- See Also
- NewGps
- Precondition
- feature
const char * GPSErrorChecker |
( |
int |
errCode | ) |
|
GPS API에서 발생하는 Error Code들을 확인 해준다.
- Parameters
-
[in] | errCode | 확인 하고자 하는 Error Code |
[out] | null | |
- Return values
-
LOCATIONS_ERROR_NONE | : Successful |
LOCATIONS_ERROR_OUT_OF_MEMORY | : Out of memory |
LOCATIONS_ERROR_INVALID_PARAMETER | : Invalid parameter |
LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED | : Permission denied |
LOCATIONS_ERROR_NOT_SUPPORTED | : Not supported |
LOCATIONS_ERROR_INCORRECT_METHOD | : Location manager contains incorrect method for a given call |
LOCATIONS_ERROR_NETWORK_FAILED | : Network unavailable |
LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE | : Location service is not available |
LOCATIONS_ERROR_GPS_SETTING_OFF | : GPS/WPS setting is not enabled |
LOCATIONS_ERROR_SECURITY_RESTRICTED | : Restricted by security system policy |
LOCATIONS_ERROR_UNKNWON | : Unknown error occurred |
- Note
- GPS API에서 발생하는 Error Code들을 확인 해준다.
Error의 내용은 Log를 통해 출력 된다.
11가지의 Error Code들을 확인 가능 하다.
- See Also
- Tizen Native API Document - GPS part
bool isGPSAccessible |
( |
GPS |
this_gen | ) |
|
현재 GPS 기능 지원 여부를 반환 한다.
- Parameters
-
[in] | this_gen | 사용 가능 여부를 반환 할 GPS 객체 |
[out] | null | |
- Return values
-
bool |
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
- Note
- 현재 GPS 기능 지원 여부를 반환 한다.
지원 가능 이라면 true
, 지원 가능이 아니라면 false를
반환한다.
- See Also
- NewGps
DestroyGps
onGPSConnect
onGPSDisconnect
GPSRecv
- Precondition
- feature
새로운 GPS 객체를 생성한다.
- Parameters
-
- Return values
-
- Note
- 새로운 GPS 객체를 생성한다.
GPS 객체를 사용하기 전에 반드시 호출해야 한다.
- See Also
- DestroyGps
isGPSAccessible
onGPSConnect
onGPSDisconnect
GPSRecv
- Precondition
- feature
- Warning
- 사용이 끝났을 때 DestroyGps() 함수를 꼭 사용해야 한다.
{
location_manager_create (LOCATIONS_METHOD_GPS, &this->manager);
this->state = LOCATIONS_SERVICE_DISABLED;
this->location = location;
this->access = false;
this->connect = false;
return &this->gps;
}
bool onGPSConnect |
( |
GPS |
this_gen | ) |
|
GPS로 연결을 시도하며 이의 성공 여부를 반환한다.
- Parameters
-
[in] | this_gen | 연결 성공 여부를 확인할 GPS 객체 |
[out] | null | |
- Return values
-
bool |
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
- Note
- GPS로 연결을 시도하며 이의 성공 여부를 반환한다.
연결에 성공하면 true
, 실패하면 false를
반환한다.
- See Also
- NewGps
DestroyGps
isGPSAccessible
onGPSDisconnect
GPSRecv
- Precondition
- feature
bool onGPSDisconnect |
( |
GPS |
this_gen | ) |
|
GPS로의 연결을 해제하며 이의 성공 여부를 반환한다.
- Parameters
-
[in] | this_gen | 연결 해제 여부를 확인할 GPS 객체 |
[out] | null | |
- Return values
-
bool |
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
- Note
- GPS로의 연결을 해제하며 이의 성공 여부를 반환한다.
연결 해제에 성공하면 @ true, 실패하면 false를
반환한다.
- See Also
- NewGps
DestroyGps
isGPSAccessible
onGPSConnect
GPSRecv
- Precondition
- feature