/* * EXIF date tool * * (c) Alexander Vdolainen 2023 * * this is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published * by the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * this is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see ."; * */ #ifndef __EXIJPEG_H__ #define __EXIJPEG_H__ #include #include #include #include #include #include #include #include struct exijpeg_segment { unsigned char *hd; unsigned long length; struct exijpeg_segment *next; }; typedef struct __exijpeg_data_type { unsigned char *data; char *filename; size_t length; int fd; struct exijpeg_segment *segments; struct exijpeg_segment *last; } exijpeg_data_t; exijpeg_data_t *exijpeg_data_alloc(void); void exijpeg_data_free(exijpeg_data_t *); /* adds a segment to jpeg_data_t */ int exijpeg_data_add_segment(exijpeg_data_t *, unsigned char *, unsigned long); /* loads a file to jpeg structure */ int exijpeg_data_loadfile(exijpeg_data_t *, const char *); /* release any resources allocated from the system during open file proc */ int exijpeg_data_release(exijpeg_data_t *); #endif