#include "network.h"
#include "url.h"
-typedef struct {
+typedef struct GopherContext {
URLContext *hd;
} GopherContext;
s->hd = NULL;
err = ffurl_open(&s->hd, buf, AVIO_FLAG_READ_WRITE,
- &h->interrupt_callback, NULL);
+ &h->interrupt_callback, NULL, h->protocols, h);
if (err < 0)
goto fail;
}
-URLProtocol ff_gopher_protocol = {
- .name = "gopher",
- .url_open = gopher_open,
- .url_read = gopher_read,
- .url_write = gopher_write,
- .url_close = gopher_close,
+const URLProtocol ff_gopher_protocol = {
+ .name = "gopher",
+ .url_open = gopher_open,
+ .url_read = gopher_read,
+ .url_write = gopher_write,
+ .url_close = gopher_close,
.priv_data_size = sizeof(GopherContext),
+ .flags = URL_PROTOCOL_FLAG_NETWORK,
};