Exemplo n.º 1
0
void
ags_connectable_test_disconnect()
{
  GObject *current;
  
  GType current_type;

  guint i;
  gboolean success;

  success = TRUE;
  
  for(i = 0; connectable_test_types[i] != G_TYPE_NONE; i++){
    current = g_object_new(connectable_test_types[i],
			   NULL);

    if(AGS_CONNECTABLE_GET_INTERFACE(AGS_CONNECTABLE(current))->disconnect == NULL){
      g_message("AgsConnectable::disconnect missing: %s", G_OBJECT_TYPE_NAME(current));
      
      success = FALSE;
    }
    
    ags_connectable_connect(current);
    ags_connectable_disconnect(current);
  }

  CU_ASSERT(success);
}
Exemplo n.º 2
0
void
ags_connectable_remove_from_registry(AgsConnectable *connectable)
{
  AgsConnectableInterface *connectable_interface;

  g_return_if_fail(AGS_IS_CONNECTABLE(connectable));
  connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable);
  g_return_if_fail(connectable_interface->remove_from_registry);
  connectable_interface->remove_from_registry(connectable);
}
Exemplo n.º 3
0
void
ags_connectable_disconnect(AgsConnectable *connectable)
{
  AgsConnectableInterface *connectable_interface;

  g_return_if_fail(AGS_IS_CONNECTABLE(connectable));
  connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable);
  g_return_if_fail(connectable_interface->disconnect);
  connectable_interface->connect(connectable);
}
Exemplo n.º 4
0
gboolean
ags_connectable_is_connected(AgsConnectable *connectable)
{
  AgsConnectableInterface *connectable_interface;

  g_return_val_if_fail(AGS_IS_CONNECTABLE(connectable), FALSE);
  connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable);
  g_return_val_if_fail(connectable_interface->is_connected, FALSE);

  return(connectable_interface->is_connected(connectable));
}
Exemplo n.º 5
0
gboolean
ags_connectable_is_ready(AgsConnectable *connectable)
{
  AgsConnectableInterface *connectable_interface;

  g_return_val_if_fail(AGS_IS_CONNECTABLE(connectable), FALSE);
  connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable);

  if(connectable_interface->is_ready == NULL)
    return(TRUE);

  return(connectable_interface->is_ready(connectable));
}
Exemplo n.º 6
0
void
ags_connectable_connect(AgsConnectable *connectable)
{
  AgsConnectableInterface *connectable_interface;

  g_return_if_fail(AGS_IS_CONNECTABLE(connectable));
  connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable);
  g_return_if_fail(connectable_interface->connect);

  //  if(!ags_connectable_is_ready(connectable)){
  //    return;
  //  }

  connectable_interface->connect(connectable);
}
Exemplo n.º 7
0
void
ags_connectable_test_disconnect_connection()
{
  GObject *current;
  
  GType current_type;

  guint i;
  gboolean success;

  success = TRUE;
  
  for(i = 0; connectable_test_types[i] != G_TYPE_NONE; i++){
    current = g_object_new(connectable_test_types[i],
			   NULL);
    
    if(AGS_CONNECTABLE_GET_INTERFACE(AGS_CONNECTABLE(current))->disconnect_connection != NULL){
      ags_connectable_disconnect_connection(current,
					    NULL);
    }
  }
}