Changeset c111da2 in mainline for uspace/lib/fmgt/include
- Timestamp:
- 2025-10-09T15:44:52Z (3 months ago)
- Branches:
- master
- Children:
- cfd04c4
- Parents:
- 1a96db9
- Location:
- uspace/lib/fmgt/include
- Files:
-
- 2 edited
-
fmgt.h (modified) (2 diffs)
-
types/fmgt.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fmgt/include/fmgt.h
r1a96db9 rc111da2 39 39 40 40 #include <errno.h> 41 #include <stdbool.h> 41 42 #include <stddef.h> 43 #include <stdint.h> 42 44 #include "types/fmgt.h" 43 45 … … 45 47 extern void fmgt_set_cb(fmgt_t *, fmgt_cb_t *, void *); 46 48 extern void fmgt_destroy(fmgt_t *); 49 extern void fmgt_set_init_update(fmgt_t *, bool); 47 50 extern errno_t fmgt_new_file_suggest(char **); 51 extern errno_t fmgt_new_file(fmgt_t *, const char *, uint64_t); 48 52 49 53 #endif -
uspace/lib/fmgt/include/types/fmgt.h
r1a96db9 rc111da2 38 38 #define TYPES_FMGT_H 39 39 40 #include <capa.h> 41 #include <fibril_synch.h> 42 43 /** File management progress update */ 44 typedef struct { 45 /** Current file processed bytes */ 46 char curf_procb[CAPA_BLOCKS_BUFSIZE]; 47 /** Total bytes to process for current file */ 48 char curf_totalb[CAPA_BLOCKS_BUFSIZE]; 49 /** Percent of current file processed */ 50 char curf_percent[5]; 51 } fmgt_progress_t; 52 40 53 /** File management callbacks */ 41 54 typedef struct { 55 void (*progress)(void *, fmgt_progress_t *); 42 56 } fmgt_cb_t; 43 57 44 58 typedef struct { 59 /** Lock */ 60 fibril_mutex_t lock; 61 /** Progress update timer */ 62 fibril_timer_t *timer; 45 63 /** Callback functions */ 46 64 fmgt_cb_t *cb; 47 65 /** Argument to callback functions */ 48 66 void *cb_arg; 67 /** Bytes processed from current file */ 68 uint64_t curf_procb; 69 /** Total size of current file */ 70 uint64_t curf_totalb; 71 /** Progress was displayed for current file */ 72 bool curf_progr; 73 /** Post an immediate initial progress update */ 74 bool do_init_update; 49 75 } fmgt_t; 50 76
Note:
See TracChangeset
for help on using the changeset viewer.
