Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

Data structures and function APIs

l4 edited this page Apr 20, 2019 · 2 revisions

Data structures

Check inc/csn.h for more details.

APIs


Initialize and finalize

csn_ctx_t *csn_init()

creates new context, returns as a pointer to it on heap.

int csn_free(csn_ctx_t *ctx)

frees the context which was created by csn_init

General APIs

csn_result_t *csn_search(csn_ctx_t *ctx, const char *str, int options, int limit)

search for anything, in which

  • ctx is a pointer to context
  • str is your search string
  • options is your options, e.g. SEARCH_SONG | SEARCH_SORT_MOST_LOVED
  • limit is how much entry you want it to return
Clone this wiki locally