%%
headers
#define NO_IMPORT_PYGOBJECT
#include "pygobject.h"
#include <profiles/gnome-media-profiles.h>

#include "config.h"

%%
modulename mediaprofiles
%%
import gobject.GObject as PyGObject_Type
import gtk.Widget as PyGtkWidget_Type
import gconf.Client as PyGConfClient_Type
%%
ignore-glob 
    gnome_media_profiles_init
    gm_audio_profile_get_type
%%
override gm_audio_profile_get_active_list
static PyObject *
_wrap_gm_audio_profile_get_active_list(PyGObject *self)
{
    GList    *list, *l;
    PyObject *rv;
    int       len, i;

    list = gm_audio_profile_get_active_list();
    len = g_list_length(list);
    
    rv = PyList_New(len);
    if (!rv) {
        return NULL;
    }
    
    for (i = 0, l = list; i < len; ++i, l = l->next) {
        PyList_SET_ITEM(rv, i, pygobject_new((GObject *)l->data));
    }
    
    g_list_free(list);
    return rv;
}
