vitasdk
Documentation of the vitasdk
location.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_LOCATION_H_
8 #define _PSP2_LOCATION_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
12 #include <psp2/rtc.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #define SCE_LOCATION_DATA_INVALID (-9999.0)
19 
21 typedef enum SceLocationErrorCode {
23 
28 
40 
50 
51 //TO DO: further comment each struct and function (i.e. parameters)
52 
56 
62  __SCE_LOCATION_DIALOG_STATUS = 0xFFFFFFFF
64 
70  __SCE_LOCATION_DIALOG_RESULT = 0xFFFFFFFF
72 
81 
86  __SCE_LOCATION_PERMISSION = 0xFFFFFFFF
88 
97  __SCE_LOCATION_LMETHOD = 0xFFFFFFFF
99 
107  __SCE_LOCATION_HMETHOD = 0xFFFFFFFF
109 
111 typedef struct SceLocationLocationInfo {
122 
123 
125 typedef struct SceLocationHeadingInfo {
135 
137 typedef void(*SceLocationLocationInfoCallback)(SceInt32 result, SceLocationHandle handle, const SceLocationLocationInfo *location, void *userdata);
138 
140 typedef void(*SceLocationHeadingInfoCallback)(SceInt32 result, SceLocationHandle handle, const SceLocationHeadingInfo *heading, void *userdata);
141 
147  int unk_0x0C;
148  int unk_0x10;
151 
155 
158 
161 
164 
167 
170 
173 
176 
179 
182 
185 
188 
191 
194 
197 
200 
202 SceInt32 sceLocationSetGpsEmulationFile(unsigned char *filename);
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 #endif /* _PSP2_LOCATION_H_ */
209 
int unk_0x10
Definition: location.h:148
SceInt32 sceLocationStartHeadingCallback(SceLocationHandle handle, SceUInt32 difference, SceLocationHeadingInfoCallback callback, void *userdata)
Start continuous acquisition of direction information.
VITASDK_BUILD_ASSERT_EQ(4, SceLocationHandle)
SceRtcTick timestamp
Time of data acquisition, in μsec (UTC)
Definition: location.h:119
SceLocationPermissionStatus
location usage permission status
Definition: location.h:83
SceInt32 sceLocationConfirmAbort(SceLocationHandle handle)
Abort location information acquisition permission dialog.
SceDouble64 altitude
Altitude (m). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:114
SceInt32 sceLocationGetLocation(SceLocationHandle handle, SceLocationLocationInfo *locationInfo)
Get location information.
SceInt32 sceLocationGetHeading(SceLocationHandle handle, SceLocationHeadingInfo *headingInfo)
Get direction information.
SceFloat32 speed
Travel speed (m/s). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:118
SceFloat32 headingVectorZ
Direction vector Z coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DAT...
Definition: location.h:129
SceLocationPermissionStatus mainstatus
Status of usage permission through location data item of system settings.
Definition: location.h:145
SceInt32 sceLocationGetMethod(SceLocationHandle handle, SceLocationLocationMethod *locateMethod, SceLocationHeadingMethod *headingMethod)
Get location measurement method.
SceInt32 sceLocationConfirm(SceLocationHandle handle)
Allow acquisition of location information.
SceLocationPermissionApplicationStatus
location usage permission status for individual application
Definition: location.h:74
SceLocationPermissionStatus parentalstatus
Status of usage permission through parental control.
Definition: location.h:144
SceFloat32 headingVectorY
Direction vector Y coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DAT...
Definition: location.h:128
int unk_0x0C
Definition: location.h:147
SceInt32 sceLocationConfirmGetStatus(SceLocationHandle handle, SceLocationDialogStatus *status)
Get status of location information acquisition permission dialog.
SceFloat32 reserve2
Reserve.
Definition: location.h:131
void(* SceLocationLocationInfoCallback)(SceInt32 result, SceLocationHandle handle, const SceLocationLocationInfo *location, void *userdata)
Location information callback notification function.
Definition: location.h:137
SceFloat32 trueHeading
Clockwise angle from true north (0 to 360 degrees). If cannot be acquired, SCE_LOCATION_INVALID_DATA.
Definition: location.h:126
SceRtcTick timestamp
Time acquired in unit of 1 usec (UTC)
Definition: location.h:132
SceInt32 sceLocationReopen(SceLocationHandle handle, SceLocationLocationMethod locateMethod, SceLocationHeadingMethod headingMethod)
Reopen library.
SceInt32 sceLocationCancelGetLocation(SceLocationHandle handle)
Cancel location information acquisition operation.
SceInt32 sceLocationClose(SceLocationHandle handle)
Close library.
SceDouble64 latitude
Latitude (deg). Valid range: -90 to + 90. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:112
SceFloat32 headingVectorX
Direction vector X coordinates element of true north. If cannot be acquired, SCE_LOCATION_INVALID_DAT...
Definition: location.h:127
SceUInt32 SceLocationHandle
Location handle datatype.
Definition: location.h:54
SceInt32 sceLocationOpen(SceLocationHandle *handle, SceLocationLocationMethod locateMethod, SceLocationHeadingMethod headingMethod)
Functions.
SceInt32 sceLocationConfirmGetResult(SceLocationHandle handle, SceLocationDialogResult *result)
Get result of location information acquisition permission dialog.
SceFloat32 accuracy
Horizontal error (m). If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:115
SceInt32 sceLocationSetGpsEmulationFile(unsigned char *filename)
Get location information acquisition permission information.
SceLocationDialogResult
Usage permission dialog result.
Definition: location.h:66
SceInt32 sceLocationStartLocationCallback(SceLocationHandle handle, SceUInt32 distance, SceLocationLocationInfoCallback callback, void *userdata)
Start continuous acquisition of location information.
SceFloat32 reserve
Reserve.
Definition: location.h:130
SceFloat32 reserve
Reserve.
Definition: location.h:116
SceLocationErrorCode
Location error codes.
Definition: location.h:21
SceInt32 sceLocationStopHeadingCallback(SceLocationHandle handle)
Stop continuous acquisition of direction information.
SceLocationDialogStatus
Usage permission dialog display status.
Definition: location.h:58
SceFloat32 direction
Travel direction. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:117
SceLocationLocationMethod
Location measurement method.
Definition: location.h:90
SceDouble64 longitude
Longitude (deg). Valid range: -180 to +180. If cannot be obtained, SCE_LOCATION_DATA_INVALID.
Definition: location.h:113
void(* SceLocationHeadingInfoCallback)(SceInt32 result, SceLocationHandle handle, const SceLocationHeadingInfo *heading, void *userdata)
Callback notification function for direction information.
Definition: location.h:140
SceLocationHeadingMethod
Direction measurement method.
Definition: location.h:101
SceLocationPermissionApplicationStatus applicationstatus
Status of usage permission through location data item for each application in system settings.
Definition: location.h:146
SceInt32 sceLocationStopLocationCallback(SceLocationHandle handle)
Stop continuous acquisition of location information.
SceInt32 sceLocationGetPermission(SceLocationHandle handle, SceLocationPermissionInfo *info)
Get location information acquisition permission/refusal information.
@ SCE_LOCATION_PERMISSION_ALLOW
liblocation access allowed status
Definition: location.h:85
@ __SCE_LOCATION_PERMISSION
Definition: location.h:86
@ SCE_LOCATION_PERMISSION_DENY
liblocation access denied status
Definition: location.h:84
@ SCE_LOCATION_PERMISSION_APPLICATION_INIT
liblocation not accessed
Definition: location.h:76
@ SCE_LOCATION_PERMISSION_APPLICATION_DENY
liblocation access denied status
Definition: location.h:77
@ SCE_LOCATION_PERMISSION_APPLICATION_NONE
liblocation not used
Definition: location.h:75
@ __SCE_LOCATION_PERMISSION_APPLICATION
Definition: location.h:79
@ SCE_LOCATION_PERMISSION_APPLICATION_ALLOW
liblocation access allowed status
Definition: location.h:78
@ SCE_LOCATION_DIALOG_RESULT_ENABLE
Positive result is stored.
Definition: location.h:69
@ SCE_LOCATION_DIALOG_RESULT_DISABLE
Negative result is stored.
Definition: location.h:68
@ SCE_LOCATION_DIALOG_RESULT_NONE
Result is not stored.
Definition: location.h:67
@ __SCE_LOCATION_DIALOG_RESULT
Definition: location.h:70
@ SCE_LOCATION_ERROR_FILE_IO
Definition: location.h:43
@ SCE_LOCATION_ERROR_INVALID_HEADING_METHOD
Definition: location.h:34
@ SCE_LOCATION_ERROR_TOO_MANY_HANDLES
Definition: location.h:32
@ SCE_LOCATION_ERROR_INVALID_LOCATION_METHOD
Definition: location.h:33
@ SCE_LOCATION_ERROR_INVALID_HANDLE
Definition: location.h:30
@ SCE_LOCATION_ERROR_DIALOG_RESULT_NONE
Definition: location.h:37
@ SCE_LOCATION_ERROR_NOT_RUNNING_CALLBACK
Definition: location.h:36
@ SCE_LOCATION_ERROR_INVALID_ADDRESS
Definition: location.h:29
@ SCE_LOCATION_ERROR_NO_MEMORY
Definition: location.h:31
@ SCE_LOCATION_ERROR_INVALID_TITLE_ID
Definition: location.h:47
@ SCE_LOCATION_ERROR_NO_SERVER_MEMORY
Definition: location.h:46
@ SCE_LOCATION_INFO_DENIED_BY_USER
Definition: location.h:27
@ SCE_LOCATION_ERROR_UNAUTHORIZED
Definition: location.h:41
@ SCE_LOCATION_ERROR_PROVIDER_UNAVAILABLE
Definition: location.h:42
@ SCE_LOCATION_ERROR_TIME_OUT
Definition: location.h:45
@ SCE_LOCATION_ERROR_FATAL_ERROR
Definition: location.h:48
@ SCE_LOCATION_SUCCESS
Definition: location.h:22
@ SCE_LOCATION_ERROR_INVALID_FILE_FORMAT
Definition: location.h:44
@ SCE_LOCATION_INFO_GET_LOCATION_CANCELED
Definition: location.h:26
@ SCE_LOCATION_ERROR_MULTIPLE_CONFIRM
Definition: location.h:39
@ SCE_LOCATION_ERROR_DISABLE_APPLICATION
Definition: location.h:38
@ SCE_LOCATION_INFO_UNDETERMINED_LOCATION
Definition: location.h:24
@ SCE_LOCATION_ERROR_MULTIPLE_CALLBACK
Definition: location.h:35
@ SCE_LOCATION_INFO_INSUFFICIENT_INFORMATION
Definition: location.h:25
@ SCE_LOCATION_DIALOG_STATUS_IDLE
Dialog initial idle status.
Definition: location.h:59
@ SCE_LOCATION_DIALOG_STATUS_RUNNING
Dialog running.
Definition: location.h:60
@ __SCE_LOCATION_DIALOG_STATUS
Definition: location.h:62
@ SCE_LOCATION_DIALOG_STATUS_FINISHED
Dialog operation finished.
Definition: location.h:61
@ SCE_LOCATION_LMETHOD_NONE
Do not perform location measurement.
Definition: location.h:91
@ SCE_LOCATION_LMETHOD_GPS
Use only GPS.
Definition: location.h:96
@ SCE_LOCATION_LMETHOD_AGPS_AND_3G_AND_WIFI
Perform measurement by switching between AGPS, Wi-Fi, and 3G.
Definition: location.h:92
@ SCE_LOCATION_LMETHOD_GPS_AND_WIFI
Perform measurement by switching between GPS and Wi-Fi.
Definition: location.h:93
@ SCE_LOCATION_LMETHOD_WIFI
Use only Wi-Fi.
Definition: location.h:94
@ __SCE_LOCATION_LMETHOD
Definition: location.h:97
@ SCE_LOCATION_LMETHOD_3G
Use only 3G.
Definition: location.h:95
@ SCE_LOCATION_HMETHOD_VERTICAL
Output value in vertical hold reference system.
Definition: location.h:104
@ SCE_LOCATION_HMETHOD_AUTO
Automatically determine hold orientation and outputs its value.
Definition: location.h:103
@ SCE_LOCATION_HMETHOD_NONE
Don't perform heading measurement.
Definition: location.h:102
@ __SCE_LOCATION_HMETHOD
Definition: location.h:107
@ SCE_LOCATION_HMETHOD_CAMERA
Output value in camera axis reference system.
Definition: location.h:106
@ SCE_LOCATION_HMETHOD_HORIZONTAL
Output value in horizontal hold reference system.
Definition: location.h:105
Structure of heading information.
Definition: location.h:125
Structure of location information.
Definition: location.h:111
Location information acquisition permission information.
Definition: location.h:143
Definition: rtc.h:48
int32_t SceInt32
Definition: types.h:44
float SceFloat32
Definition: types.h:66
double SceDouble64
Definition: types.h:69
uint32_t SceUInt32
Definition: types.h:45