Home
last modified time | relevance | path

Searched refs:fop_fd (Results 1 – 13 of 13) sorted by relevance

/third_party/libwebsockets/lib/plat/unix/
Dunix-file.c87 lws_fop_fd_t fop_fd; in _lws_plat_file_open() local
95 fop_fd = malloc(sizeof(*fop_fd)); in _lws_plat_file_open()
96 if (!fop_fd) in _lws_plat_file_open()
99 fop_fd->fops = fops; in _lws_plat_file_open()
100 fop_fd->flags = *flags; in _lws_plat_file_open()
101 fop_fd->fd = ret; in _lws_plat_file_open()
102 fop_fd->filesystem_priv = NULL; /* we don't use it */ in _lws_plat_file_open()
103 fop_fd->len = (lws_filepos_t)stat_buf.st_size; in _lws_plat_file_open()
104 fop_fd->pos = 0; in _lws_plat_file_open()
106 return fop_fd; in _lws_plat_file_open()
[all …]
/third_party/libwebsockets/lib/plat/windows/
Dwindows-file.c41 lws_fop_fd_t fop_fd; in _lws_plat_file_open() local
56 fop_fd = malloc(sizeof(*fop_fd)); in _lws_plat_file_open()
57 if (!fop_fd) in _lws_plat_file_open()
60 fop_fd->fops = fops; in _lws_plat_file_open()
63 fop_fd->fd = (int)(intptr_t)ret; in _lws_plat_file_open()
65 fop_fd->fd = ret; in _lws_plat_file_open()
67 fop_fd->filesystem_priv = ret; in _lws_plat_file_open()
68 fop_fd->flags = *flags; in _lws_plat_file_open()
69 fop_fd->len = GetFileSize(ret, NULL); in _lws_plat_file_open()
71 fop_fd->len = llFileSize.QuadPart; in _lws_plat_file_open()
[all …]
/third_party/libwebsockets/include/libwebsockets/
Dlws-vfs.h108 int (*LWS_FOP_CLOSE)(lws_fop_fd_t *fop_fd);
110 lws_fileofs_t (*LWS_FOP_SEEK_CUR)(lws_fop_fd_t fop_fd,
113 int (*LWS_FOP_READ)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
116 int (*LWS_FOP_WRITE)(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
145 lws_vfs_tell(lws_fop_fd_t fop_fd);
152 lws_vfs_get_length(lws_fop_fd_t fop_fd);
159 lws_vfs_get_mod_time(lws_fop_fd_t fop_fd);
167 lws_vfs_file_seek_set(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
175 lws_vfs_file_seek_end(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
203 lws_vfs_file_close(lws_fop_fd_t *fop_fd) in lws_vfs_file_close() argument
[all …]
/third_party/libwebsockets/lib/core/
Dvfs.c34 lws_vfs_tell(lws_fop_fd_t fop_fd) in lws_vfs_tell() argument
36 return fop_fd->pos; in lws_vfs_tell()
40 lws_vfs_get_length(lws_fop_fd_t fop_fd) in lws_vfs_get_length() argument
42 return fop_fd->len; in lws_vfs_get_length()
46 lws_vfs_get_mod_time(lws_fop_fd_t fop_fd) in lws_vfs_get_mod_time() argument
48 return fop_fd->mod_time; in lws_vfs_get_mod_time()
52 lws_vfs_file_seek_set(lws_fop_fd_t fop_fd, lws_fileofs_t offset) in lws_vfs_file_seek_set() argument
56 ofs = fop_fd->fops->LWS_FOP_SEEK_CUR(fop_fd, in lws_vfs_file_seek_set()
57 offset - (lws_fileofs_t)fop_fd->pos); in lws_vfs_file_seek_set()
64 lws_vfs_file_seek_end(lws_fop_fd_t fop_fd, lws_fileofs_t offset) in lws_vfs_file_seek_end() argument
[all …]
/third_party/libwebsockets/lib/plat/freertos/
Dfreertos-file.c38 lws_fop_fd_t fop_fd; in _lws_plat_file_open() local
47 fop_fd = lws_malloc(sizeof(*fop_fd), "fops open"); in _lws_plat_file_open()
48 if (!fop_fd) in _lws_plat_file_open()
51 fop_fd->fops = fops; in _lws_plat_file_open()
52 fop_fd->fd = ret; in _lws_plat_file_open()
53 fop_fd->flags = *flags; in _lws_plat_file_open()
54 fop_fd->filesystem_priv = NULL; /* we don't use it */ in _lws_plat_file_open()
55 fop_fd->pos = 0; in _lws_plat_file_open()
56 fop_fd->len = stat_buf.st_size; in _lws_plat_file_open()
58 return fop_fd; in _lws_plat_file_open()
/third_party/libwebsockets/lib/roles/http/server/
Dfops-zip.c70 struct lws_fop_fd fop_fd; /* MUST BE FIRST logical fop_fd into member
336 priv->fop_fd.fops = &fops_zip; in lws_fops_zip_open()
361 priv->fop_fd.mod_time = priv->hdr.mod_time; in lws_fops_zip_open()
363 priv->fop_fd.flags = *flags; in lws_fops_zip_open()
392 priv->fop_fd.len = priv->hdr.uncomp_size; in lws_fops_zip_open()
394 return &priv->fop_fd; in lws_fops_zip_open()
413 priv->fop_fd.len = sizeof(hd) + priv->hdr.comp_size + in lws_fops_zip_open()
433 priv->fop_fd.flags = *flags; in lws_fops_zip_open()
436 return &priv->fop_fd; in lws_fops_zip_open()
445 priv->fop_fd.len = priv->hdr.uncomp_size; in lws_fops_zip_open()
[all …]
Dserver.c698 if (wsi->http.fop_fd) in lws_http_serve()
699 lws_vfs_file_close(&wsi->http.fop_fd); in lws_http_serve()
701 wsi->http.fop_fd = fops->LWS_FOP_OPEN(wsi->a.context->fops, in lws_http_serve()
703 if (!wsi->http.fop_fd) { in lws_http_serve()
717 if (fstat(wsi->http.fop_fd->fd, &st)) { in lws_http_serve()
739 wsi->http.fop_fd->mod_time = (uint32_t)st.st_mtime; in lws_http_serve()
766 (unsigned long long)lws_vfs_get_length(wsi->http.fop_fd), in lws_http_serve()
767 (unsigned long)lws_vfs_get_mod_time(wsi->http.fop_fd)); in lws_http_serve()
838 lws_vfs_file_close(&wsi->http.fop_fd); in lws_http_serve()
2418 wsi->http.fop_fd = NULL; in lws_handshake_server()
[all …]
/third_party/libwebsockets/lib/plat/optee/
Dlws-plat-optee.c168 _lws_plat_file_close(lws_fop_fd_t *fop_fd) in _lws_plat_file_close() argument
174 _lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset) in _lws_plat_file_seek_cur() argument
180 _lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount, in _lws_plat_file_read() argument
188 _lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount, in _lws_plat_file_write() argument
/third_party/libwebsockets/test-apps/
Dtest-server.c210 lws_fop_fd_t fop_fd; in test_server_fops_open() local
213 fop_fd = fops_plat.open(fops, vfs_path, vpath, flags); in test_server_fops_open()
215 if (fop_fd) in test_server_fops_open()
217 vfs_path, fop_fd, in test_server_fops_open()
218 (long)lws_vfs_get_length(fop_fd)); in test_server_fops_open()
222 return fop_fd; in test_server_fops_open()
/third_party/libwebsockets/lib/core-net/
Dclose.c474 wsi->http.fop_fd != NULL) in __lws_close_free_wsi()
475 lws_vfs_file_close(&wsi->http.fop_fd); in __lws_close_free_wsi()
569 wsi->http.fop_fd != NULL) in __lws_close_free_wsi()
570 lws_vfs_file_close(&wsi->http.fop_fd); in __lws_close_free_wsi()
/third_party/libwebsockets/lib/roles/http/
Dprivate-lib-roles-http.h238 lws_fop_fd_t fop_fd; member
/third_party/libwebsockets/READMEs/
DREADME.coding.md628 `lws_plat_file_close`(lws_fop_fd_t fop_fd)
631 `lws_plat_file_seek_cur`(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
634 `lws_plat_file_read`(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
638 `lws_plat_file_write`(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
647 lws_vfs_tell(lws_fop_fd_t fop_fd);
650 lws_vfs_get_length(lws_fop_fd_t fop_fd);
653 lws_vfs_get_mod_time(lws_fop_fd_t fop_fd);
656 lws_vfs_file_seek_set(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
659 lws_vfs_file_seek_end(lws_fop_fd_t fop_fd, lws_fileofs_t offset);
676 … the file, File Length, and a copy of Flags left after open are now generically held in the fop_fd.
[all …]
/third_party/libwebsockets/lib/roles/h2/
Dhttp2.c801 wsi->http.fop_fd = NULL; in lws_h2_do_pps_send()
1468 wsi->http.fop_fd = NULL; in lws_h2_parse_end_of_frame()