Bug 752649 - Fill empty GPS callbacks. r=dougt

This commit is contained in:
Kan-Ru Chen 2012-06-04 11:17:43 +08:00
Родитель a851876e3b
Коммит 580b28f3c0
1 изменённых файлов: 37 добавлений и 6 удалений

Просмотреть файл

@ -37,6 +37,30 @@ LocationCallback(GpsLocation* location)
callback->Update(somewhere);
}
static void
StatusCallback(GpsStatus* status)
{}
static void
SvStatusCallback(GpsSvStatus* sv_info)
{}
static void
NmeaCallback(GpsUtcTime timestamp, const char* nmea, int length)
{}
static void
SetCapabilitiesCallback(uint32_t capabilities)
{}
static void
AcquireWakelockCallback()
{}
static void
ReleaseWakelockCallback()
{}
typedef void *(*pthread_func)(void *);
/** Callback for creating a thread that can call into the JS codes.
@ -57,16 +81,23 @@ CreateThreadCallback(const char* name, void (*start)(void *), void* arg)
return thread;
}
static void
RequestUtcTimeCallback()
{}
static GpsCallbacks gCallbacks = {
sizeof(GpsCallbacks),
LocationCallback,
NULL, /* StatusCallback */
NULL, /* SvStatusCallback */
NULL, /* NmeaCallback */
NULL, /* SetCapabilitiesCallback */
NULL, /* AcquireWakelockCallback */
NULL, /* ReleaseWakelockCallback */
StatusCallback,
SvStatusCallback,
NmeaCallback,
SetCapabilitiesCallback,
AcquireWakelockCallback,
ReleaseWakelockCallback,
CreateThreadCallback,
#ifdef GPS_CAPABILITY_ON_DEMAND_TIME
RequestUtcTimeCallback,
#endif
};
GonkGPSGeolocationProvider::GonkGPSGeolocationProvider()