void MoonInstallerService::downloader_stopped (EventObject *sender, EventArgs *args, gpointer user_data) { HttpRequestStoppedEventArgs *ea = (HttpRequestStoppedEventArgs *) args; if (ea->IsSuccess ()) { ((MoonInstallerService *) user_data)->UpdaterCompleted (); } else { ((MoonInstallerService *) user_data)->UpdaterFailed (ea->GetErrorMessage ()); } }
static void application_downloader_stopped (EventObject *sender, EventArgs *calldata, gpointer closure) { HttpRequestStoppedEventArgs *args = (HttpRequestStoppedEventArgs *) calldata; NotifyCtx *ctx = (NotifyCtx *) closure; if (ctx->notify_cb) ctx->notify_cb (args->IsSuccess () ? NotifyCompleted : NotifyFailed, GPOINTER_TO_INT (NULL), ctx->user_data); ctx->request->RemoveAllHandlers (ctx); ctx->request->unref (); g_free (ctx); }