void
ags_ipatch_dls2_reader_add_to_registry(AgsConnectable *connectable)
{
  AgsIpatchDLS2Reader *ipatch_dls2_reader;

  AgsRegistry *registry;
  AgsRegistryEntry *entry;

  AgsApplicationContext *application_context;

  if(ags_connectable_is_ready(connectable)){
    return;
  }

  ipatch_dls2_reader = AGS_IPATCH_DLS2_READER(connectable);

  ags_ipatch_dls2_reader_set_flags(ipatch_dls2_reader, AGS_IPATCH_DLS2_READER_ADDED_TO_REGISTRY);

  application_context = ags_application_context_get_instance();

  registry = (AgsRegistry *) ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context));

  if(registry != NULL){
    entry = ags_registry_entry_alloc(registry);
    g_value_set_object(entry->entry,
		       (gpointer) ipatch_dls2_reader);
    ags_registry_add_entry(registry,
			   entry);
  }  
}
Exemplo n.º 2
0
void
ags_recall_add_to_registry(AgsConnectable *connectable)
{
  AgsMain *ags_main;
  AgsServer *server;
  AgsRecall *recall;
  AgsRegistryEntry *entry;
  GList *list;
  
  recall = AGS_RECALL(connectable);

  ags_main = AGS_MAIN(AGS_DEVOUT(recall->devout)->ags_main);

  server = ags_main->server;

  entry = ags_registry_entry_alloc(server->registry);
  g_value_set_object(&(entry->entry),
		     (gpointer) recall);
  ags_registry_add(server->registry,
		   entry);
}