Skip to content

DownloadListener methods not getting called at all #544

Description

@GabrielCNoble

Hello, folks. I'm implementing an embedded open street maps viewer in an application where the user can select a region of the map and export it. However, my DownloadListener methods are not getting called at all. Instead, the downloaded file gets dumped on the screen as a giant xml file. I already checked the output of the application log and the view console, there's nothing useful there.

Here's the listener declaration:

class OsmMapViewerDownloadListener : public ultralight::DownloadListener 
{
public:
    
    ultralight::DownloadId NextDownloadId(ultralight::View* caller) override;
    bool OnRequestDownload(ultralight::View* caller, ultralight::DownloadId id, const ultralight::String& url) override;
    void OnBeginDownload(ultralight::View* caller, ultralight::DownloadId id, const ultralight::String& url, const ultralight::String& filename, int64_t expected_content_length) override;
    void OnReceiveDataForDownload(ultralight::View* caller, ultralight::DownloadId id, ultralight::RefPtr<ultralight::Buffer> data) override;
    void OnFinishDownload(ultralight::View* caller, ultralight::DownloadId id);
    void OnFailDownload(ultralight::View* caller, ultralight::DownloadId id) override;

    OsmMapViewer *m_viewer;
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions