66typedef struct _VersionFixed {
75typedef struct _BackendInfo {
84typedef struct _FillReqest {
103typedef struct _DocumentMeta {
126 void (*backend_data_free_fn)(
void*);
127 void* (*backend_data_copy_fn)(
void*);
234typedef struct _RequestReturn {
259typedef struct _PdfData
void document_meta_free(DocumentMeta *meta)
Frees a document meta struct.
char * document_meta_get_biblatex(const DocumentMeta *meta, size_t *length, const char *type)
Get string containing biblatex entry of the supplied DoucmentMeta.
void pdf_data_free(PdfData *data)
Frees a PdfData struct.
loglevel_t
Severity of loglevels.
Definition types.h:37
char * document_meta_get_string(const DocumentMeta *meta)
Creates a human readable string describing a DocumentMeta.
capability_flags_t
Flags that describe what a backend can do.
Definition types.h:50
void request_return_free(RequestReturn *reqRet)
Frees a RequestReturn struct.
bool document_meta_save(const char *fileName, const DocumentMeta *meta, const char *fullText)
Saves a DocumentMeta to disk.
void document_meta_free_list(DocumentMeta **meta, size_t length)
Frees a list/array of document metas.
bool document_meta_is_equal(const DocumentMeta *a, const DocumentMeta *b)
Compares to document metas and returns if they are equal.
RequestReturn * request_return_new(size_t count, size_t maxCount)
Allocates a empty RequestReturn struct.
DocumentMeta * document_meta_copy(const DocumentMeta *meta)
Dose a deep copy of a DocumentMeta struct.
char * document_meta_load_full_text_from_json_file(const char *jsonFileName)
create a DocumentMeta from json file saved by document_meta_save()
DocumentMeta * document_meta_load_from_json_file(const char *jsonFileName)
create a DocumentMeta from json file saved by document_meta_save()
DocumentMeta * document_meta_new(void)
Mallocs a DocumentMeta struct and initializes it.
char * document_meta_get_json(const DocumentMeta *meta, const char *fullText, size_t *length)
Get string containing json data of the supplied DoucmentMeta.
DocumentMeta * document_meta_load_from_json(char *jsonFile)
create a DocumentMeta from json data saved by document_meta_get_json()
void document_meta_combine(DocumentMeta *target, const DocumentMeta *source)
Adds the fields set in source but not in target to target.
char * capability_flags_get_str(capability_flags_t capabilities)
returns the capabilities flags as a human readable string.
@ LL_INFO
Informational message.
Definition types.h:43
@ LL_DEBUG
Useful when debugging.
Definition types.h:44
@ LL_DEFAULT
Default log level.
Definition types.h:42
@ LL_NONE
No logging at all.
Definition types.h:38
@ LL_WARN
Warning.
Definition types.h:41
@ LL_ERR
Error.
Definition types.h:40
@ LL_CRIT
Critical error.
Definition types.h:39
@ SCI_CAP_GET_TEXT
Backend can get full text of documents.
Definition types.h:52
@ SCI_CAP_GET_PDF
Backend can get pdfs of documents.
Definition types.h:53
@ SCI_CAP_FILL
Backend can fill DocumentMeta structs.
Definition types.h:51
Backend information struct.
Definition types.h:75
const char *const name
Name of the plugin.
Definition types.h:76
capability_flags_t capabilities
Flags that describe what a backend can do.
Definition types.h:77
This bitfield tells libscipaper what fields you require to have filled.
Definition types.h:84
bool issn
The journal issn in which the paper was published.
Definition types.h:94
bool author
The author(s) of the paper.
Definition types.h:91
bool year
Publication year of the paper.
Definition types.h:87
bool volume
Journal volume where the paper appeared.
Definition types.h:89
bool abstract
abstract of the document
Definition types.h:97
bool keywords
Keywords given by the author of the paper for the paper.
Definition types.h:95
bool url
The URL of the paper in the journal.
Definition types.h:86
bool doi
The DOI of the paper.
Definition types.h:85
bool title
The title of the paper.
Definition types.h:92
bool journal
The journal in which the paper was published.
Definition types.h:93
bool pages
Page(s) where the paper is to be found in the volume.
Definition types.h:90
bool downloadUrl
URL where the full text of the document can be found.
Definition types.h:96
bool publisher
Publisher of the paper.
Definition types.h:88
This struct contains the raw data of a PDF document.
Definition types.h:260
unsigned char * data
Raw data.
Definition types.h:261
DocumentMeta * meta
Meta data of the document that the PDF belongs to.
Definition types.h:263
size_t length
Length of data.
Definition types.h:262
This struct is details the result of a metadata search.
Definition types.h:234
DocumentMeta ** documents
A array of document meta structs detailing the search results.
Definition types.h:235
size_t page
The page that was requested.
Definition types.h:238
size_t count
The length of the DocumentMeta array.
Definition types.h:236
size_t maxCount
The maximum number of search results to be presented, as requested by the interface user.
Definition types.h:237
size_t totalCount
The total number of search results found by the backend, 0 if this information is not supported by th...
Definition types.h:239
This struct contains the version of libscipaper in use.
Definition types.h:66