location: Allow to get the service for a location
authorMohamed Abbas <mabbas@linux.intel.com>
Thu, 3 Feb 2011 23:46:27 +0000 (15:46 -0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 4 Feb 2011 09:57:40 +0000 (10:57 +0100)
Add new function to return the service for a location.

include/location.h
src/location.c

index 662d8cd..e4efaaf 100644 (file)
@@ -57,6 +57,9 @@ void connman_location_report_result(struct connman_location *location,
 void *connman_location_get_data(struct connman_location *location);
 void connman_location_set_data(struct connman_location *location, void *data);
 
+struct connman_service *connman_location_get_service(
+                                       struct connman_location *location);
+
 struct connman_location_driver {
        const char *name;
        enum connman_service_type type;
index e7bfdc0..820011f 100644 (file)
@@ -94,6 +94,11 @@ char *connman_location_get_interface(struct connman_location *location)
        return connman_service_get_interface(location->service);
 }
 
+struct connman_service *connman_location_get_service(
+                                       struct connman_location *location)
+{
+       return location->service;
+}
 /**
  * connman_location_get_data:
  * @location: Location structure