Commit 0f0d79ca authored by Jussi Kukkonen's avatar Jussi Kukkonen

consistently use glib string handling in backends

Patch from Haishan Chen through ML.
parent 8ad979f7
......@@ -109,7 +109,7 @@ geoclue_geocode_class_init (GeoclueGeocodeClass *klass)
gboolean geoclue_geocode_version (GeoclueGeocode *obj, gint* OUT_major, gint* OUT_minor, gint* OUT_micro, GError **error)
{
printf("Yahoo!!!\n");
g_print("Yahoo!!!\n");
*OUT_major = 1;
*OUT_minor = 0;
*OUT_micro = 0;
......@@ -120,8 +120,8 @@ gboolean geoclue_geocode_version (GeoclueGeocode *obj, gint* OUT_major, gint* OU
gboolean geoclue_geocode_service_provider(GeoclueGeocode *obj, char** name, GError **error)
{
*name = "Yahoo Geocodes";
printf("Yahoo!!!\n");
*name = g_strdup("Yahoo Geocodes");
g_print("Yahoo!!!\n");
return TRUE;
}
gboolean geoclue_geocode_to_lat_lon (GeoclueGeocode *obj, const char * IN_street, const char * IN_city, const char * IN_state, const char * IN_zip, gdouble* OUT_latitude, gdouble* OUT_longitude, gint* OUT_return_code, GError **error )
......@@ -172,7 +172,7 @@ gboolean geoclue_geocode_lat_lon_to_address(GeoclueGeocode *obj, gdouble IN_lati
*OUT_state = g_strdup("Unknown");
*OUT_zip = g_strdup("Unknown");
printf("Yahoo!!!\n");
g_print("Yahoo!!!\n");
return TRUE;
}
......
......@@ -82,7 +82,7 @@ static guint signals[LAST_SIGNAL];
void geoclue_map_get_map_finished(GeoclueMap* obj, gint returncode, GArray* map_buffer, gchar* buffer_mime_type)
{
printf("finished sending map\n");
g_print("finished sending map\n");
}
......@@ -175,7 +175,7 @@ geoclue_map_class_init (GeoclueMapClass *klass)
gboolean geoclue_map_version (GeoclueMap *obj, gint* OUT_major, gint* OUT_minor, gint* OUT_micro, GError **error)
{
printf("Yahoo!!!\n");
g_print("Yahoo!!!\n");
*OUT_major = 1;
*OUT_minor = 0;
*OUT_micro = 0;
......@@ -187,13 +187,13 @@ gboolean geoclue_map_version (GeoclueMap *obj, gint* OUT_major, gint* OUT_minor,
gboolean geoclue_map_service_provider(GeoclueMap *obj, char** name, GError **error)
{
*name = g_strdup ("Yahoo Maps");
printf("Yahoo!!!\n");
g_print("Yahoo!!!\n");
return TRUE;
}
gboolean geoclue_map_max_zoom(GeoclueMap *obj, int* max_zoom, GError **error)
{
printf("Yahoo!!!\n");
g_print("Yahoo!!!\n");
*max_zoom = GEOCLUE_MAP_MAX_ZOOM;
return TRUE;
}
......@@ -435,7 +435,7 @@ gboolean geoclue_map_find_zoom_level (GeoclueMap *obj, const gdouble IN_latitude
make_me_one *= 2.0;
}
printf("Long offset \n");
g_print("Long offset \n");
return TRUE;
......
......@@ -229,7 +229,7 @@ gboolean geoclue_position_service_name( GeocluePosition* server,
char** name,
GError **error)
{
*name = "gpsd";
*name = g_strdup("gpsd");
return TRUE;
}
......@@ -339,16 +339,16 @@ gboolean geoclue_position_service_status ( GeocluePosition* server,
{
if (server->gpsdata->online == 0) {
*OUT_status = GEOCLUE_POSITION_NO_SERVICE_AVAILABLE;
*OUT_string = strdup("GPSD Error no GPS device available");
*OUT_string = g_strdup("GPSD Error no GPS device available");
return TRUE;
}
if (server->gpsdata->status == STATUS_NO_FIX) {
*OUT_status = GEOCLUE_POSITION_ACQUIRING_LONGITUDE | GEOCLUE_POSITION_ACQUIRING_LATITUDE;
*OUT_string = strdup("GPSD has not got a fix");
*OUT_string = g_strdup("GPSD has not got a fix");
return TRUE;
}
*OUT_status = GEOCLUE_POSITION_LONGITUDE_AVAILABLE | GEOCLUE_POSITION_LATITUDE_AVAILABLE;
*OUT_string = strdup("GPSD has a locked on signal");
*OUT_string = g_strdup("GPSD has a locked on signal");
return TRUE;
......
......@@ -426,7 +426,7 @@ gboolean geoclue_position_service_name( GeocluePosition* server,
char** name,
GError **error)
{
*name = "www.hostip.info";
*name = g_strdup("www.hostip.info");
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment