Exemple #1
0
static HRESULT WINAPI XMLView_Binding_Abort(IBinding *iface)
{
    Binding *This = impl_from_IBinding(iface);
    TRACE("(%p)\n", This);

    return IBinding_Abort(This->binding);
}
Exemple #2
0
void detach_bsc(bsc_t *bsc)
{
    if(bsc->binding)
        IBinding_Abort(bsc->binding);

    bsc->obj = NULL;
    IBindStatusCallback_Release((IBindStatusCallback*)&bsc->lpVtbl);
}
Exemple #3
0
static void BindStatusCallback_Detach(BindStatusCallback *bsc)
{
    if (bsc)
    {
        if (bsc->binding) IBinding_Abort(bsc->binding);
        bsc->request = NULL;
        IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
    }
}
Exemple #4
0
void BindStatusCallback_Detach(BindStatusCallback *bsc)
{
    if (bsc)
    {
        if (bsc->binding) IBinding_Abort(bsc->binding);
        bsc->request = NULL;
        IBindStatusCallback_Release((IBindStatusCallback*)bsc);
    }
}
Exemple #5
0
HRESULT detach_bsc(bsc_t *bsc)
{
    HRESULT hres;

    if(bsc->binding)
        IBinding_Abort(bsc->binding);

    bsc->obj = NULL;
    hres = bsc->hres;
    IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);

    return hres;
}
Exemple #6
0
static HRESULT WINAPI XMLView_BindStatusCallback_OnStartBinding(
        IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib)
{
    BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
    IBinding *binding;
    HRESULT hres;

    TRACE("(%p)->(%x %p)\n", This, dwReserved, pib);

    hres = XMLView_Binding_Create(pib, &binding);
    if(FAILED(hres)) {
        IBinding_Abort(pib);
        return hres;
    }

    hres = IBindStatusCallback_OnStartBinding(This->bsc, dwReserved, binding);
    if(FAILED(hres)) {
        IBinding_Abort(binding);
        return hres;
    }

    IBinding_Release(binding);
    return hres;
}
Exemple #7
0
static HRESULT on_progress(DownloadBSC *This, ULONG progress, ULONG progress_max, ULONG status_code, LPCWSTR status_text)
{
    HRESULT hres;

    if(!This->callback)
        return S_OK;

    hres = IBindStatusCallback_OnProgress(This->callback, progress, progress_max, status_code, status_text);
    if(hres == E_ABORT) {
        if(This->binding)
            IBinding_Abort(This->binding);
        else
            FIXME("No binding, not sure what to do!\n");
    }

    return hres;
}
Exemple #8
0
static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch(msg) {
    case WM_INITDIALOG:
        ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_HIDE);
        install_dialog = hwnd;
        return TRUE;

    case WM_NOTIFY:
        switch (((NMHDR *)lParam)->code)
        {
        case NM_CLICK:
        case NM_RETURN:
            if (wParam == ID_DWL_STATUS)
                run_winebrowser(((NMLINK*)lParam)->item.szUrl);
            break;
        }
        break;

    case WM_COMMAND:
        switch(wParam) {
        case IDCANCEL:
            if(dwl_binding)
                IBinding_Abort(dwl_binding);
            EndDialog(hwnd, 0);
            return FALSE;

        case ID_DWL_INSTALL:
            ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_SHOW);
            EnableWindow(GetDlgItem(hwnd, ID_DWL_INSTALL), 0);
            if(!start_download())
                EndDialog(install_dialog, 0);
        }
    }

    return FALSE;
}