mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Add open() and close() skeletons that only recognize the image as a correct one.
This commit is contained in:
20
include/dicformat/context.h
Normal file
20
include/dicformat/context.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by claunia on 17/03/19.
|
||||
//
|
||||
|
||||
#ifndef LIBDICFORMAT_CONTEXT_H
|
||||
#define LIBDICFORMAT_CONTEXT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct dicformatContext
|
||||
{
|
||||
uint64_t magic;
|
||||
uint8_t libraryMajorVersion;
|
||||
uint8_t libraryMinorVersion;
|
||||
FILE *imageStream;
|
||||
DicHeader header;
|
||||
} dicformatContext;
|
||||
|
||||
#endif //LIBDICFORMAT_CONTEXT_H
|
||||
@@ -37,4 +37,9 @@ int identify(const char *filename);
|
||||
|
||||
int identifyStream(FILE *imageStream);
|
||||
|
||||
void *open(const char *filepath);
|
||||
|
||||
int close(void *context)
|
||||
|
||||
|
||||
#endif //LIBDICFORMAT_DECLS_H
|
||||
|
||||
12
include/dicformat/errors.h
Normal file
12
include/dicformat/errors.h
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Created by claunia on 17/03/19.
|
||||
//
|
||||
|
||||
#ifndef LIBDICFORMAT_ERRORS_H
|
||||
#define LIBDICFORMAT_ERRORS_H
|
||||
|
||||
#define DICF_ERROR_NOT_DICFORMAT -1
|
||||
#define DICF_ERROR_FILE_TOO_SMALL -2
|
||||
#define DICF_ERROR_INCOMPATIBLE_VERSION -2
|
||||
|
||||
#endif //LIBDICFORMAT_ERRORS_H
|
||||
Reference in New Issue
Block a user