D.I.T. ( Do It Tizen! )  1.0.0
Samsung Software Membership
 All Data Structures Files Functions Macros Pages
Functions
GPS.c File Reference

GPS API가 정의되어있다. More...

#include "Commnucation/GPS.h"
#include <stdbool.h>
#include <stdlib.h>
#include <locations.h>
#include <system_info.h>
#include <dlog.h>
Include dependency graph for GPS.c:

Functions

GPS NewGps (void)
 새로운 GPS 객체를 생성한다. More...
 
void DestroyGps (GPS this_gen)
 생성한 GPS 객체를 소멸 시킨다. More...
 
bool isGPSAccessible (GPS this_gen)
 현재 GPS 기능 지원 여부를 반환 한다. More...
 
bool onGPSConnect (GPS this_gen)
 GPS로 연결을 시도하며 이의 성공 여부를 반환한다. More...
 
bool onGPSDisconnect (GPS this_gen)
 GPS로의 연결을 해제하며 이의 성공 여부를 반환한다. More...
 
Location GPSRecv (GPS this_gen)
 GPS로 부터 위치 정보를 수신한다. More...
 
const char * GPSErrorChecker (int errCode)
 GPS API에서 발생하는 Error Code들을 확인 해준다. More...
 

Detailed Description

GPS API가 정의되어있다.

Note
GPS API가 정의되어있다.
See Also
GPS.h

Function Documentation

void DestroyGps ( GPS  this_gen)

생성한 GPS 객체를 소멸 시킨다.

Parameters
[in]this_gen소멸시킬 GPS 객체
[out]null
Return values
void
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

Here is the caller graph for this function:

Location GPSRecv ( GPS  this_gen)

GPS로 부터 위치 정보를 수신한다.

Parameters
[in]this_gen데이터를 수신할 GPS 객체
[out]null
Return values
bool
함수의 성공 여부를 반환한다.
실패시 false를 반환하며 상세한 원인을 Log로 출력한다.
Note
GPS로 부터 위치 정보를 수신한다.
See Also
NewGps
DestroyGps
isGPSAccessible
onGPSConnect
onGPSDisconnect
Precondition
feature

Here is the caller graph for this function:

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

Here is the caller graph for this function:

GPS NewGps ( void  )

새로운 GPS 객체를 생성한다.

Parameters
[in]void
[out]null
Return values
GPS
Note
새로운 GPS 객체를 생성한다.
GPS 객체를 사용하기 전에 반드시 호출해야 한다.
See Also
DestroyGps
isGPSAccessible
onGPSConnect
onGPSDisconnect
GPSRecv
Precondition
feature
Warning
사용이 끝났을 때 DestroyGps() 함수를 꼭 사용해야 한다.
GPS NewGps (void)
{
GPSExtends * this = (GPSExtends *)malloc (sizeof (GPSExtends));
this->gps.isAccessible = isGPSAccessible;
this->gps.onConnect = onGPSConnect;
this->gps.onDisconnect = onGPSDisconnect;
this->gps.Recv = GPSRecv;
location_manager_create (LOCATIONS_METHOD_GPS, &this->manager);
this->state = LOCATIONS_SERVICE_DISABLED;
Location location = {0,};
this->location = location;
this->access = false;
this->connect = false;
return &this->gps;
}

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function: