static void gupnp_control_point_resource_available (GSSDPResourceBrowser *resource_browser, const char *usn, const GList *locations) { GUPnPControlPoint *control_point; char *udn, *service_type; control_point = GUPNP_CONTROL_POINT (resource_browser); /* Verify we have a location */ if (!locations) { g_warning ("No Location header for device with USN %s", usn); return; } /* Parse USN */ if (!parse_usn (usn, &udn, &service_type)) return; load_description (control_point, locations->data, udn, service_type); g_free (udn); g_free (service_type); }
OntologyDescription * ttl_loader_load_description (const gchar *filename) { OntologyDescription *desc; TrackerTurtleReader *reader; GError *error = NULL; desc = ttl_model_description_new (); reader = tracker_turtle_reader_new (filename, NULL); while (error == NULL && tracker_turtle_reader_next (reader, &error)) { load_description (desc, tracker_turtle_reader_get_subject (reader), tracker_turtle_reader_get_predicate (reader), tracker_turtle_reader_get_object (reader)); } g_object_unref (reader); if (error) { g_message ("Turtle parse error: %s", error->message); g_error_free (error); } return desc; }
Aggregator::Aggregator(HuboDescription& description) { _initialize(); load_description(description); description.assignAggregator(this); }