libscipaper 1.0.x
sci-backend.h
1/*
2 * types.h
3 * Copyright (C) Carl Philipp Klemm 2021 <carl@uvos.xyz>
4 *
5 * types.h is free software: you can redistribute it and/or modify it
6 * under the terms of the lesser GNU General Public License as published by the
7 * Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * types.h is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the lesser GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20#include "types.h"
37int sci_plugin_register(const BackendInfo* backend_info, RequestReturn* (*fill_meta_in)(const DocumentMeta*, size_t, size_t, void*),
38 char* (*get_document_text_in)(const DocumentMeta*, void*),
39 PdfData* (*get_document_pdf_data_in)(const DocumentMeta*, void*), void* user_data);
40
46
void sci_plugin_unregister(int id)
Unregisters a backend, must be called before the backend exits.
int sci_plugin_register(const BackendInfo *backend_info, RequestReturn *(*fill_meta_in)(const DocumentMeta *, size_t, size_t, void *), char *(*get_document_text_in)(const DocumentMeta *, void *), PdfData *(*get_document_pdf_data_in)(const DocumentMeta *, void *), void *user_data)
Registers a backend, not all functions have to be regisered for eatch backend, pass NULL for unwanted...
Backend information struct.
Definition types.h:75
This struct contains the metadata of a paper, must be created via document_meta_new() and freed via d...
Definition types.h:103
This struct contains the raw data of a PDF document.
Definition types.h:260
This struct is details the result of a metadata search.
Definition types.h:234