vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceLibLocation_stub


Load the required module:

int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_LOCATION
Location module.
Definition: sysmodule.h:47



Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceLocationHandle)
 
 VITASDK_BUILD_ASSERT_EQ (0x30, SceLocationLocationInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceLocationHeadingInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceLocationPermissionInfo)
 
SceInt32 sceLocationOpen (SceLocationHandle *handle, SceLocationLocationMethod locateMethod, SceLocationHeadingMethod headingMethod)
 Functions. More...
 
SceInt32 sceLocationClose (SceLocationHandle handle)
 Close library. More...
 
SceInt32 sceLocationReopen (SceLocationHandle handle, SceLocationLocationMethod locateMethod, SceLocationHeadingMethod headingMethod)
 Reopen library. More...
 
SceInt32 sceLocationGetMethod (SceLocationHandle handle, SceLocationLocationMethod *locateMethod, SceLocationHeadingMethod *headingMethod)
 Get location measurement method. More...
 
SceInt32 sceLocationGetLocation (SceLocationHandle handle, SceLocationLocationInfo *locationInfo)
 Get location information. More...
 
SceInt32 sceLocationCancelGetLocation (SceLocationHandle handle)
 Cancel location information acquisition operation. More...
 
SceInt32 sceLocationStartLocationCallback (SceLocationHandle handle, SceUInt32 distance, SceLocationLocationInfoCallback callback, void *userdata)
 Start continuous acquisition of location information. More...
 
SceInt32 sceLocationStopLocationCallback (SceLocationHandle handle)
 Stop continuous acquisition of location information. More...
 
SceInt32 sceLocationGetHeading (SceLocationHandle handle, SceLocationHeadingInfo *headingInfo)
 Get direction information. More...
 
SceInt32 sceLocationStartHeadingCallback (SceLocationHandle handle, SceUInt32 difference, SceLocationHeadingInfoCallback callback, void *userdata)
 Start continuous acquisition of direction information. More...
 
SceInt32 sceLocationStopHeadingCallback (SceLocationHandle handle)
 Stop continuous acquisition of direction information. More...
 
SceInt32 sceLocationConfirm (SceLocationHandle handle)
 Allow acquisition of location information. More...
 
SceInt32 sceLocationConfirmGetStatus (SceLocationHandle handle, SceLocationDialogStatus *status)
 Get status of location information acquisition permission dialog. More...
 
SceInt32 sceLocationConfirmGetResult (SceLocationHandle handle, SceLocationDialogResult *result)
 Get result of location information acquisition permission dialog. More...
 
SceInt32 sceLocationConfirmAbort (SceLocationHandle handle)
 Abort location information acquisition permission dialog. More...
 
SceInt32 sceLocationGetPermission (SceLocationHandle handle, SceLocationPermissionInfo *info)
 Get location information acquisition permission/refusal information. More...
 
SceInt32 sceLocationSetGpsEmulationFile (unsigned char *filename)
 Get location information acquisition permission information. More...
 

Typedefs

typedef SceUInt32 SceLocationHandle
 Location handle datatype. More...
 
typedef void(* SceLocationLocationInfoCallback) (SceInt32 result, SceLocationHandle handle, const SceLocationLocationInfo *location, void *userdata)
 Location information callback notification function. More...
 
typedef void(* SceLocationHeadingInfoCallback) (SceInt32 result, SceLocationHandle handle, const SceLocationHeadingInfo *heading, void *userdata)
 Callback notification function for direction information. More...
 

Macros

#define SCE_LOCATION_DATA_INVALID   (-9999.0)
 

Data Structure Documentation

◆ SceLocationLocationInfo

struct SceLocationLocationInfo

Structure of location information.

Data Fields
SceDouble64 latitude Latitude (deg). Valid range: -90 to + 90. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceDouble64 longitude Longitude (deg). Valid range: -180 to +180. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceDouble64 altitude Altitude (m). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceFloat32 accuracy Horizontal error (m). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceFloat32 reserve Reserve.
SceFloat32 direction Travel direction. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceFloat32 speed Travel speed (m/s). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
SceRtcTick timestamp Time of data acquisition, in μsec (UTC)

◆ SceLocationHeadingInfo

struct SceLocationHeadingInfo

Structure of heading information.

Data Fields
SceFloat32 trueHeading Clockwise angle from true north (0 to 360 degrees). If cannot be acquired, SCE_LOCATION_INVALID_DATA.
SceFloat32 headingVectorX Direction vector X coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DATA.
SceFloat32 headingVectorY Direction vector Y coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DATA.
SceFloat32 headingVectorZ Direction vector Z coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DATA.
SceFloat32 reserve Reserve.
SceFloat32 reserve2 Reserve.
SceRtcTick timestamp Time acquired in unit of 1 usec (UTC)

◆ SceLocationPermissionInfo

struct SceLocationPermissionInfo

Location information acquisition permission information.

Data Fields
SceLocationPermissionStatus parentalstatus Status of usage permission through parental control.
SceLocationPermissionStatus mainstatus Status of usage permission through location data item of system settings.
SceLocationPermissionApplicationStatus applicationstatus Status of usage permission through location data item for each application in system settings.
int unk_0x0C
int unk_0x10

Macro Definition Documentation

◆ SCE_LOCATION_DATA_INVALID

#define SCE_LOCATION_DATA_INVALID   (-9999.0)

Typedef Documentation

◆ SceLocationHandle

Location handle datatype.

◆ SceLocationLocationInfoCallback

typedef void(* SceLocationLocationInfoCallback) (SceInt32 result, SceLocationHandle handle, const SceLocationLocationInfo *location, void *userdata)

Location information callback notification function.

◆ SceLocationHeadingInfoCallback

typedef void(* SceLocationHeadingInfoCallback) (SceInt32 result, SceLocationHandle handle, const SceLocationHeadingInfo *heading, void *userdata)

Callback notification function for direction information.

Enumeration Type Documentation

◆ SceLocationErrorCode

Location error codes.

Enumerator
SCE_LOCATION_SUCCESS 
SCE_LOCATION_INFO_UNDETERMINED_LOCATION 
SCE_LOCATION_INFO_INSUFFICIENT_INFORMATION 
SCE_LOCATION_INFO_GET_LOCATION_CANCELED 
SCE_LOCATION_INFO_DENIED_BY_USER 
SCE_LOCATION_ERROR_INVALID_ADDRESS 
SCE_LOCATION_ERROR_INVALID_HANDLE 
SCE_LOCATION_ERROR_NO_MEMORY 
SCE_LOCATION_ERROR_TOO_MANY_HANDLES 
SCE_LOCATION_ERROR_INVALID_LOCATION_METHOD 
SCE_LOCATION_ERROR_INVALID_HEADING_METHOD 
SCE_LOCATION_ERROR_MULTIPLE_CALLBACK 
SCE_LOCATION_ERROR_NOT_RUNNING_CALLBACK 
SCE_LOCATION_ERROR_DIALOG_RESULT_NONE 
SCE_LOCATION_ERROR_DISABLE_APPLICATION 
SCE_LOCATION_ERROR_MULTIPLE_CONFIRM 
SCE_LOCATION_ERROR_UNAUTHORIZED 
SCE_LOCATION_ERROR_PROVIDER_UNAVAILABLE 
SCE_LOCATION_ERROR_FILE_IO 
SCE_LOCATION_ERROR_INVALID_FILE_FORMAT 
SCE_LOCATION_ERROR_TIME_OUT 
SCE_LOCATION_ERROR_NO_SERVER_MEMORY 
SCE_LOCATION_ERROR_INVALID_TITLE_ID 
SCE_LOCATION_ERROR_FATAL_ERROR 

◆ SceLocationDialogStatus

Usage permission dialog display status.

Enumerator
SCE_LOCATION_DIALOG_STATUS_IDLE 

Dialog initial idle status.

SCE_LOCATION_DIALOG_STATUS_RUNNING 

Dialog running.

SCE_LOCATION_DIALOG_STATUS_FINISHED 

Dialog operation finished.

__SCE_LOCATION_DIALOG_STATUS 

◆ SceLocationDialogResult

Usage permission dialog result.

Enumerator
SCE_LOCATION_DIALOG_RESULT_NONE 

Result is not stored.

SCE_LOCATION_DIALOG_RESULT_DISABLE 

Negative result is stored.

SCE_LOCATION_DIALOG_RESULT_ENABLE 

Positive result is stored.

__SCE_LOCATION_DIALOG_RESULT 

◆ SceLocationPermissionApplicationStatus

location usage permission status for individual application

Enumerator
SCE_LOCATION_PERMISSION_APPLICATION_NONE 

liblocation not used

SCE_LOCATION_PERMISSION_APPLICATION_INIT 

liblocation not accessed

SCE_LOCATION_PERMISSION_APPLICATION_DENY 

liblocation access denied status

SCE_LOCATION_PERMISSION_APPLICATION_ALLOW 

liblocation access allowed status

__SCE_LOCATION_PERMISSION_APPLICATION 

◆ SceLocationPermissionStatus

location usage permission status

Enumerator
SCE_LOCATION_PERMISSION_DENY 

liblocation access denied status

SCE_LOCATION_PERMISSION_ALLOW 

liblocation access allowed status

__SCE_LOCATION_PERMISSION 

◆ SceLocationLocationMethod

Location measurement method.

Enumerator
SCE_LOCATION_LMETHOD_NONE 

Do not perform location measurement.

SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI 

Perform measurement by switching between AGPS, Wi-Fi, and 3G.

SCE_LOCATION_LMETHOD_GPS_AND_WIFI 

Perform measurement by switching between GPS and Wi-Fi.

SCE_LOCATION_LMETHOD_WIFI 

Use only Wi-Fi.

SCE_LOCATION_LMETHOD_3G 

Use only 3G.

SCE_LOCATION_LMETHOD_GPS 

Use only GPS.

__SCE_LOCATION_LMETHOD 

◆ SceLocationHeadingMethod

Direction measurement method.

Enumerator
SCE_LOCATION_HMETHOD_NONE 

Don't perform heading measurement.

SCE_LOCATION_HMETHOD_AUTO 

Automatically determine hold orientation and outputs its value.

SCE_LOCATION_HMETHOD_VERTICAL 

Output value in vertical hold reference system.

SCE_LOCATION_HMETHOD_HORIZONTAL 

Output value in horizontal hold reference system.

SCE_LOCATION_HMETHOD_CAMERA 

Output value in camera axis reference system.

__SCE_LOCATION_HMETHOD 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/4]

VITASDK_BUILD_ASSERT_EQ ( ,
SceLocationHandle   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/4]

VITASDK_BUILD_ASSERT_EQ ( 0x30  ,
SceLocationLocationInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/4]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceLocationHeadingInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/4]

VITASDK_BUILD_ASSERT_EQ ( 0x14  ,
SceLocationPermissionInfo   
)

◆ sceLocationOpen()

SceInt32 sceLocationOpen ( SceLocationHandle handle,
SceLocationLocationMethod  locateMethod,
SceLocationHeadingMethod  headingMethod 
)

Functions.

Library start

◆ sceLocationClose()

SceInt32 sceLocationClose ( SceLocationHandle  handle)

Close library.

◆ sceLocationReopen()

SceInt32 sceLocationReopen ( SceLocationHandle  handle,
SceLocationLocationMethod  locateMethod,
SceLocationHeadingMethod  headingMethod 
)

Reopen library.

◆ sceLocationGetMethod()

SceInt32 sceLocationGetMethod ( SceLocationHandle  handle,
SceLocationLocationMethod locateMethod,
SceLocationHeadingMethod headingMethod 
)

Get location measurement method.

◆ sceLocationGetLocation()

SceInt32 sceLocationGetLocation ( SceLocationHandle  handle,
SceLocationLocationInfo locationInfo 
)

Get location information.

◆ sceLocationCancelGetLocation()

SceInt32 sceLocationCancelGetLocation ( SceLocationHandle  handle)

Cancel location information acquisition operation.

◆ sceLocationStartLocationCallback()

SceInt32 sceLocationStartLocationCallback ( SceLocationHandle  handle,
SceUInt32  distance,
SceLocationLocationInfoCallback  callback,
void *  userdata 
)

Start continuous acquisition of location information.

◆ sceLocationStopLocationCallback()

SceInt32 sceLocationStopLocationCallback ( SceLocationHandle  handle)

Stop continuous acquisition of location information.

◆ sceLocationGetHeading()

SceInt32 sceLocationGetHeading ( SceLocationHandle  handle,
SceLocationHeadingInfo headingInfo 
)

Get direction information.

◆ sceLocationStartHeadingCallback()

SceInt32 sceLocationStartHeadingCallback ( SceLocationHandle  handle,
SceUInt32  difference,
SceLocationHeadingInfoCallback  callback,
void *  userdata 
)

Start continuous acquisition of direction information.

◆ sceLocationStopHeadingCallback()

SceInt32 sceLocationStopHeadingCallback ( SceLocationHandle  handle)

Stop continuous acquisition of direction information.

◆ sceLocationConfirm()

SceInt32 sceLocationConfirm ( SceLocationHandle  handle)

Allow acquisition of location information.

◆ sceLocationConfirmGetStatus()

SceInt32 sceLocationConfirmGetStatus ( SceLocationHandle  handle,
SceLocationDialogStatus status 
)

Get status of location information acquisition permission dialog.

◆ sceLocationConfirmGetResult()

SceInt32 sceLocationConfirmGetResult ( SceLocationHandle  handle,
SceLocationDialogResult result 
)

Get result of location information acquisition permission dialog.

◆ sceLocationConfirmAbort()

SceInt32 sceLocationConfirmAbort ( SceLocationHandle  handle)

Abort location information acquisition permission dialog.

◆ sceLocationGetPermission()

SceInt32 sceLocationGetPermission ( SceLocationHandle  handle,
SceLocationPermissionInfo info 
)

Get location information acquisition permission/refusal information.

◆ sceLocationSetGpsEmulationFile()

SceInt32 sceLocationSetGpsEmulationFile ( unsigned char *  filename)

Get location information acquisition permission information.