diff options
Diffstat (limited to 'include/netsurf/fetch.h')
-rw-r--r-- | include/netsurf/fetch.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/include/netsurf/fetch.h b/include/netsurf/fetch.h index 6e6d653ee..156f4d1ef 100644 --- a/include/netsurf/fetch.h +++ b/include/netsurf/fetch.h @@ -49,15 +49,15 @@ struct gui_fetch_table { /** * Translate resource to full url. * - * @note Only used in resource fetcher + * @note Only used in resource protocol fetcher * - * Transforms a resource: path into a full URL. The returned URL + * Transforms a resource protocol path into a full URL. The returned URL * is used as the target for a redirect. The caller takes ownership of * the returned nsurl including unrefing it when finished with it. * * \param path The path of the resource to locate. - * \return A string containing the full URL of the target object or - * NULL if no suitable resource can be found. + * \return A netsurf url object containing the full URL of the resource + * path or NULL if a suitable resource URL can not be generated. */ struct nsurl* (*get_resource_url)(const char *path); @@ -99,6 +99,23 @@ struct gui_fetch_table { */ char *(*mimetype)(const char *ro_path); + /** + * Open a socket + * + * \param domain Communication domain + * \param type Socket type + * \param protocol Protocol + * \return Socket descriptor on success, -1 on error and errno set + */ + int (*socket_open)(int domain, int type, int protocol); + + /** + * Close a socket + * + * \param socket Socket descriptor + * \return 0 on success, -1 on error and errno set + */ + int (*socket_close)(int socket); }; #endif |