TinyMUSH 3.3
TinyMUSH Server
Loading...
Searching...
No Matches
Functions | Variables
api.c File Reference

functions called only by modules More...

#include "config.h"
#include "constants.h"
#include "typedefs.h"
#include "macros.h"
#include "externs.h"
#include "prototypes.h"
#include <string.h>
#include <dlfcn.h>
Include dependency graph for api.c:

Functions

void register_api (char *module_name, char *api_name, API_FUNCTION *ftable)
 Register a module. More...
 
void * request_api_function (char *api_name, char *fn_name)
 Return the handler of an API function. More...
 
void register_commands (CMDENT *cmdtab)
 Register module's commands with the main command handler. More...
 
void register_prefix_cmds (const char *cmdchars)
 Register prefix commands. More...
 
void register_functions (FUN *functab)
 Register module's functions with the main functions handler. More...
 
void register_hashtables (MODHASHES *htab, MODHASHES *ntab)
 Register module's hashtables with the main hashtables handler. More...
 
unsigned int register_dbtype (char *modname)
 Register a module's DB type. More...
 

Variables

CMDENTprefix_cmds [256]
 

Detailed Description

functions called only by modules

Author
TinyMUSH development team (https://github.com/TinyMUSH)
Version
3.3
Date
2020-12-24

Function Documentation

◆ register_api()

void register_api ( char *  module_name,
char *  api_name,
API_FUNCTION ftable 
)

Register a module.

Parameters
module_nameModule name
api_nameAPI name
ftableFunction table

no such module

◆ register_commands()

void register_commands ( CMDENT cmdtab)

Register module's commands with the main command handler.

Parameters
cmdtabModule's command table.

◆ register_dbtype()

unsigned int register_dbtype ( char *  modname)

Register a module's DB type.

Parameters
modnameModule name
Returns
unsigned int Module's DBType

Find out if the module already has a registered DB type

If the type is in range, return it, else return zero as an error code

◆ register_functions()

void register_functions ( FUN functab)

Register module's functions with the main functions handler.

Parameters
functab

◆ register_hashtables()

void register_hashtables ( MODHASHES htab,
MODHASHES ntab 
)

Register module's hashtables with the main hashtables handler.

Parameters
htab
ntab

◆ register_prefix_cmds()

void register_prefix_cmds ( const char *  cmdchars)

Register prefix commands.

Parameters
cmdcharschar array of prefixes

◆ request_api_function()

void * request_api_function ( char *  api_name,
char *  fn_name 
)

Return the handler of an API function.

Parameters
api_nameAPI name
fn_nameFunction name
Returns
void* Handler of that function