2019-03-16 18:38:57 +00:00
|
|
|
// /***************************************************************************
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Filename : decsl.h
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// Component : libdicformat.
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Declares exportable functions.
|
|
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This library 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
|
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
// Copyright © 2011-2019 Natalia Portillo
|
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef LIBDICFORMAT_DECLS_H
|
|
|
|
|
#define LIBDICFORMAT_DECLS_H
|
|
|
|
|
|
2019-03-20 22:34:21 +00:00
|
|
|
#include <stdint.h>
|
2019-03-20 23:38:58 +00:00
|
|
|
#include <stdio.h>
|
2019-03-20 22:34:21 +00:00
|
|
|
|
2019-03-17 19:07:57 +00:00
|
|
|
int identify(const char *filename);
|
|
|
|
|
|
|
|
|
|
int identifyStream(FILE *imageStream);
|
|
|
|
|
|
2019-03-17 20:39:40 +00:00
|
|
|
void *open(const char *filepath);
|
|
|
|
|
|
2019-03-17 20:41:34 +00:00
|
|
|
int close(void *context);
|
2019-03-17 20:39:40 +00:00
|
|
|
|
2019-03-22 21:22:36 +00:00
|
|
|
int32_t read_media_tag(void *context, uint8_t *data, int32_t tag, uint32_t *length);
|
2019-03-20 00:45:47 +00:00
|
|
|
|
2019-03-20 23:41:16 +00:00
|
|
|
void *crc64_init(uint64_t polynomial, uint64_t seed);
|
|
|
|
|
|
|
|
|
|
void *crc64_init_ecma(void);
|
|
|
|
|
|
2019-03-20 23:55:32 +00:00
|
|
|
void crc64_update(void *context, const uint8_t *data, size_t len);
|
2019-03-20 23:41:16 +00:00
|
|
|
|
|
|
|
|
uint64_t crc64_final(void *context);
|
|
|
|
|
|
2019-03-20 23:55:32 +00:00
|
|
|
uint64_t crc64_data(const uint8_t *data, size_t len, uint64_t polynomial, uint64_t seed);
|
2019-03-20 23:41:16 +00:00
|
|
|
|
2019-03-20 23:55:32 +00:00
|
|
|
uint64_t crc64_data_ecma(const uint8_t *data, size_t len);
|
2019-03-17 20:39:40 +00:00
|
|
|
|
2019-03-22 21:22:36 +00:00
|
|
|
int32_t read_sector(void *context, uint64_t sectorAddress, uint8_t *data, uint32_t *length);
|
2019-03-21 01:06:21 +00:00
|
|
|
|
2019-03-16 18:38:57 +00:00
|
|
|
#endif //LIBDICFORMAT_DECLS_H
|