Connected Callback

## Connected Callback Connected Callback — Defining a Connected Callback |

## Connected Callback

Once the DMAPConnection object completes its interrogation of a DMAP server, it will emit the "connected" signal. The "connected" callback will receive a fully populated media database. The following is a simple "connected" callback:

    connected_cb (DMAPConnection *connection,
    	      gboolean        result,
    	      const char     *reason,
    	      DMAPDb         *db)
    {
    	g_print ("DB has %lu entries\n", dmap_db_count (db));
    	dmap_db_foreach (db, print_record, NULL);
    	g_main_loop_quit (loop);
    }