Exemplo n.º 1
0
void
start_button_pressed (void)
{
    int ret;
    debug_printf ("Start button pressed\n");

    assert(!m_bRipping);
    render_clear_all_data();
    debug_printf ("IDR_STREAMNAME:Connecting...\n");
    render_set_display_data(IDR_STREAMNAME, "Connecting...");
    start_button_disable();

    ret = rip_manager_start (&m_rmi, &g_rmo, rip_callback);
    insert_riplist (g_rmo.url, 0);

    if (ret != SR_SUCCESS) {
	MessageBox (m_hwnd, errors_get_string (ret),
		    "Failed to connect to stream", MB_ICONSTOP);
	start_button_enable();
	return;
    }
    m_bRipping = TRUE;

    render_set_prog_bar (TRUE);
    PostMessage (m_hwnd, WM_MY_TRAY_NOTIFICATION, (WPARAM)NULL, WM_LBUTTONDBLCLK);
}
Exemplo n.º 2
0
/******************************************************************************
 * Private functions
 *****************************************************************************/
static void
post_error (RIP_MANAGER_INFO* rmi, error_code err)
{
    ERROR_INFO err_info;
    err_info.error_code = err;
    strcpy(err_info.error_str, errors_get_string (err));
    debug_printf ("post_error: %d %s\n", err_info.error_code, 
		  err_info.error_str);
    rmi->status_callback (rmi, RM_ERROR, &err_info);
}