Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
plugin.c File Reference
#include "groonga_in.h"
#include "groonga/plugin.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "db.h"
#include "plugin_in.h"
#include "ctx_impl.h"
#include "util.h"
Include dependency graph for plugin.c:

Go to the source code of this file.

Data Structures

struct  _grn_plugin_mutex

Macros

#define PATHLEN(filename)   (strlen(filename) + 1)
#define grn_dl_open(filename)   LoadLibrary(filename)
#define grn_dl_open_error_label()   "LoadLibrary"
#define grn_dl_close(dl)   (FreeLibrary(dl) != 0)
#define grn_dl_close_error_label()   "FreeLibrary"
#define grn_dl_sym(dl, symbol)   ((void *)GetProcAddress(dl, symbol))
#define grn_dl_sym_error_label()   "GetProcAddress"
#define grn_dl_clear_error()
#define GRN_PLUGIN_FUNC_PREFIX   "grn_plugin_impl_"
#define GET_SYMBOL(type)

Functions

grn_id grn_plugin_reference (grn_ctx *ctx, const char *filename)
const char * grn_plugin_path (grn_ctx *ctx, grn_id id)
grn_id grn_plugin_open (grn_ctx *ctx, const char *filename)
grn_rc grn_plugin_close (grn_ctx *ctx, grn_id id)
void * grn_plugin_sym (grn_ctx *ctx, grn_id id, const char *symbol)
grn_rc grn_plugins_init (void)
grn_rc grn_plugins_fin (void)
const char * grn_plugin_get_suffix (void)
grn_rc grn_plugin_register_by_path (grn_ctx *ctx, const char *path)
const char * grn_plugin_get_system_plugins_dir (void)
char * grn_plugin_find_path (grn_ctx *ctx, const char *name)
grn_rc grn_plugin_register (grn_ctx *ctx, const char *name)
void * grn_plugin_malloc (grn_ctx *ctx, size_t size, const char *file, int line, const char *func)
void * grn_plugin_realloc (grn_ctx *ctx, void *ptr, size_t size, const char *file, int line, const char *func)
void grn_plugin_free (grn_ctx *ctx, void *ptr, const char *file, int line, const char *func)
void grn_plugin_set_error (grn_ctx *ctx, grn_log_level level, grn_rc error_code, const char *file, int line, const char *func, const char *format,...)
void grn_plugin_backtrace (grn_ctx *ctx)
void grn_plugin_logtrace (grn_ctx *ctx, grn_log_level level)
grn_plugin_mutexgrn_plugin_mutex_open (grn_ctx *ctx)
grn_plugin_mutexgrn_plugin_mutex_create (grn_ctx *ctx)
void grn_plugin_mutex_close (grn_ctx *ctx, grn_plugin_mutex *mutex)
void grn_plugin_mutex_destroy (grn_ctx *ctx, grn_plugin_mutex *mutex)
void grn_plugin_mutex_lock (grn_ctx *ctx, grn_plugin_mutex *mutex)
void grn_plugin_mutex_unlock (grn_ctx *ctx, grn_plugin_mutex *mutex)
grn_objgrn_plugin_proc_alloc (grn_ctx *ctx, grn_user_data *user_data, grn_id domain, grn_obj_flags flags)
const char * grn_plugin_win32_base_dir (void)
int grn_plugin_charlen (grn_ctx *ctx, const char *str_ptr, unsigned int str_length, grn_encoding encoding)
int grn_plugin_isspace (grn_ctx *ctx, const char *str_ptr, unsigned int str_length, grn_encoding encoding)

Macro Definition Documentation

#define GET_SYMBOL (   type)
Value:
do { \
grn_dl_clear_error(); \
plugin->type ## _func = grn_dl_sym(dl, GRN_PLUGIN_FUNC_PREFIX #type); \
if (!plugin->type ## _func) { \
const char *label; \
SERR(label); \
} \
} while (0)
#define grn_dl_clear_error ( )

Definition at line 51 of file plugin.c.

#define grn_dl_close (   dl)    (FreeLibrary(dl) != 0)

Definition at line 47 of file plugin.c.

#define grn_dl_close_error_label ( )    "FreeLibrary"

Definition at line 48 of file plugin.c.

#define grn_dl_open (   filename)    LoadLibrary(filename)

Definition at line 45 of file plugin.c.

#define grn_dl_open_error_label ( )    "LoadLibrary"

Definition at line 46 of file plugin.c.

#define grn_dl_sym (   dl,
  symbol 
)    ((void *)GetProcAddress(dl, symbol))

Definition at line 49 of file plugin.c.

#define grn_dl_sym_error_label ( )    "GetProcAddress"

Definition at line 50 of file plugin.c.

#define GRN_PLUGIN_FUNC_PREFIX   "grn_plugin_impl_"

Definition at line 101 of file plugin.c.

#define PATHLEN (   filename)    (strlen(filename) + 1)

Definition at line 33 of file plugin.c.

Function Documentation

void grn_plugin_backtrace ( grn_ctx ctx)

Definition at line 566 of file plugin.c.

int grn_plugin_charlen ( grn_ctx ctx,
const char *  str_ptr,
unsigned int  str_length,
grn_encoding  encoding 
)

Definition at line 652 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_plugin_close ( grn_ctx ctx,
grn_id  id 
)

Definition at line 242 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* grn_plugin_find_path ( grn_ctx ctx,
const char *  name 
)

Definition at line 387 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_plugin_free ( grn_ctx ctx,
void *  ptr,
const char *  file,
int  line,
const char *  func 
)

Definition at line 529 of file plugin.c.

const char* grn_plugin_get_suffix ( void  )

Definition at line 327 of file plugin.c.

Here is the caller graph for this function:

const char* grn_plugin_get_system_plugins_dir ( void  )

Definition at line 380 of file plugin.c.

Here is the caller graph for this function:

int grn_plugin_isspace ( grn_ctx ctx,
const char *  str_ptr,
unsigned int  str_length,
grn_encoding  encoding 
)

Definition at line 662 of file plugin.c.

Here is the caller graph for this function:

void grn_plugin_logtrace ( grn_ctx ctx,
grn_log_level  level 
)

Definition at line 572 of file plugin.c.

void* grn_plugin_malloc ( grn_ctx ctx,
size_t  size,
const char *  file,
int  line,
const char *  func 
)

Definition at line 515 of file plugin.c.

void grn_plugin_mutex_close ( grn_ctx ctx,
grn_plugin_mutex mutex 
)

Definition at line 601 of file plugin.c.

Here is the caller graph for this function:

grn_plugin_mutex* grn_plugin_mutex_create ( grn_ctx ctx)

Definition at line 595 of file plugin.c.

Here is the call graph for this function:

void grn_plugin_mutex_destroy ( grn_ctx ctx,
grn_plugin_mutex mutex 
)

Definition at line 610 of file plugin.c.

Here is the call graph for this function:

void grn_plugin_mutex_lock ( grn_ctx ctx,
grn_plugin_mutex mutex 
)

Definition at line 616 of file plugin.c.

grn_plugin_mutex* grn_plugin_mutex_open ( grn_ctx ctx)

Definition at line 584 of file plugin.c.

Here is the caller graph for this function:

void grn_plugin_mutex_unlock ( grn_ctx ctx,
grn_plugin_mutex mutex 
)

Definition at line 624 of file plugin.c.

grn_id grn_plugin_open ( grn_ctx ctx,
const char *  filename 
)

Definition at line 184 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* grn_plugin_path ( grn_ctx ctx,
grn_id  id 
)

Definition at line 72 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_plugin_proc_alloc ( grn_ctx ctx,
grn_user_data user_data,
grn_id  domain,
grn_obj_flags  flags 
)

Definition at line 632 of file plugin.c.

Here is the call graph for this function:

void* grn_plugin_realloc ( grn_ctx ctx,
void *  ptr,
size_t  size,
const char *  file,
int  line,
const char *  func 
)

Definition at line 522 of file plugin.c.

grn_id grn_plugin_reference ( grn_ctx ctx,
const char *  filename 
)

Definition at line 55 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_plugin_register ( grn_ctx ctx,
const char *  name 
)

Definition at line 476 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_plugin_register_by_path ( grn_ctx ctx,
const char *  path 
)

Definition at line 333 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_plugin_set_error ( grn_ctx ctx,
grn_log_level  level,
grn_rc  error_code,
const char *  file,
int  line,
const char *  func,
const char *  format,
  ... 
)

Definition at line 546 of file plugin.c.

Here is the call graph for this function:

void* grn_plugin_sym ( grn_ctx ctx,
grn_id  id,
const char *  symbol 
)

Definition at line 276 of file plugin.c.

Here is the call graph for this function:

const char* grn_plugin_win32_base_dir ( void  )

Definition at line 639 of file plugin.c.

Here is the call graph for this function:

grn_rc grn_plugins_fin ( void  )

Definition at line 314 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_plugins_init ( void  )

Definition at line 304 of file plugin.c.

Here is the call graph for this function:

Here is the caller graph for this function: