const Folks = imports.gi.Folks;
const MainLoop = imports.mainloop;

function individuals_cb (aggregator, added, removed, message, actor, reason) {
    print ("added: ", added.length);
    print ("removed: ", removed.length);
    print ("message: ", message);
    print ("actor: ", actor);
    print ("reason: ", reason);

    for (var i=0; i<added.length; i++) {
    	var indObj = added[i];
    	print ("Look : " + indObj.alias);
    }
}

// FIXME: we should make this work with the 
// std new Class() notation
var ia = Folks.IndividualAggregator.new ();
ia.connect ("individuals_changed", individuals_cb);
ia.prepare (null, null);

MainLoop.run('');