📄 rpc.src
字号:
# See the file LICENSE for redistribution information.## Copyright (c) 1999-2002# Sleepycat Software. All rights reserved.## $Id: rpc.src,v 1.75 2002/07/18 02:57:19 margo Exp $## Syntax:# BEGIN function_name {CODE | RETCODE | NOFUNC}# CODE: generate XDR and client code, return status# Used for functions that just return a status and nothing else.# RETCODE:generate XDR and client code, call return function# (generate template return function)# Used for functions that returns data.# NOFUNC: generate a client "unsupported function" with right args# Used for unsupported functions.## ARG {IGNORE | STRING | INT | DBT | LIST | ID | CONST} C-type varname# IGNORE: not passed to server# STRING: string passed to server# DBT: DBT arg passed to server# LIST: list passed to server (NULL-terminated list of something)# INT: integer passed to server# ID: cl_id from arg passed to server# GID: global id passed to server# CONST: do not generate COMPQUIET (for NOFUNC only)# FUNCPROT prototype# FUNCARG functiontype# These two *MUST* go together and FUNCPROT *MUST* be first. These# are for the tricky user-supplied functions to some methods. They# are not supported in RPC, so will be ignored, but the complicated# syntax of their argument requires we have a special flag for them# that contains the verbatim text to use in the prototype and the# c-type, respectively. The FUNCARG must include the function, and# must call it 'funcN', where N is the count of functions. Almost# always it must be func0. A *very* few methods have more than one# user-supplied functions, in those cases, it must be func0, func1, etc.## All messages automatically return "status" and return that from# the call to the function. RET's are additional things the server# may return. RET is like ARG but does not need the IGNORE option.# RET {STRING | INT | DBT | LIST | ID} varname [GID | INT | ID]# STRING: string from server# DBT: DBT arg from server# LIST: list from server (NULL-terminated list)# Must have list type of GID, ID or INT specified# INT: integer from server# ID: id from server stored in cl_id# END function end.## Environment functions#BEGIN env_alloc NOFUNCARG ID DB_ENV * dbenvFUNCPROT void *(*)(size_t)FUNCARG void *(*func0) __P((size_t))FUNCPROT void *(*)(void *, size_t)FUNCARG void *(*func1) __P((void *, size_t))FUNCPROT void (*)(void *)FUNCARG void (*func2) __P((void *))ENDBEGIN set_app_dispatch NOFUNCARG ID DB_ENV * dbenvFUNCPROT int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops)FUNCARG int (*func0) __P((DB_ENV *, DBT *, DB_LSN *, db_recops))ENDBEGIN env_cachesize CODEARG ID DB_ENV * dbenvARG INT u_int32_t gbytesARG INT u_int32_t bytesARG INT int ncacheENDBEGIN env_close RETCODEARG ID DB_ENV * dbenvARG INT u_int32_t flagsENDBEGIN env_create RETCODEARG IGNORE DB_ENV * dbenvARG INT long timeoutRET ID long envENDBEGIN set_data_dir NOFUNCARG ID DB_ENV * dbenvARG STRING const char * dirENDBEGIN env_dbremove CODEARG ID DB_ENV * dbenvARG ID DB_TXN * txnpARG STRING const char * nameARG STRING const char * subdbARG INT u_int32_t flagsENDBEGIN env_dbrename CODEARG ID DB_ENV * dbenvARG ID DB_TXN * txnpARG STRING const char * nameARG STRING const char * subdbARG STRING const char * newnameARG INT u_int32_t flagsENDBEGIN env_encrypt CODEARG ID DB_ENV * dbenvARG STRING const char * passwdARG INT u_int32_t flagsENDBEGIN env_set_feedback NOFUNCARG ID DB_ENV * dbenvFUNCPROT void (*)(DB_ENV *, int, int)FUNCARG void (*func0) __P((DB_ENV *, int, int))ENDBEGIN env_flags CODEARG ID DB_ENV * dbenvARG INT u_int32_t flagsARG INT int onoffENDBEGIN set_lg_bsize NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t bsizeENDBEGIN set_lg_dir NOFUNCARG ID DB_ENV * dbenvARG STRING const char * dirENDBEGIN set_lg_max NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_lg_regionmax NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_lk_conflict NOFUNCARG ID DB_ENV * dbenvARG INT u_int8_t * conflictsARG INT int modesENDBEGIN set_lk_detect NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t detectENDBEGIN set_lk_max NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_lk_max_locks NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_lk_max_lockers NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_lk_max_objects NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_mp_mmapsize NOFUNCARG ID DB_ENV * dbenvARG INT size_t mmapsizeENDBEGIN env_open RETCODEARG ID DB_ENV * dbenvARG STRING const char * homeARG INT u_int32_t flagsARG INT int modeRET ID long envENDBEGIN env_paniccall NOFUNCARG ID DB_ENV * dbenvFUNCPROT void (*)(DB_ENV *, int)FUNCARG void (*func0) __P((DB_ENV *, int))ENDBEGIN env_remove RETCODEARG ID DB_ENV * dbenvARG STRING const char * homeARG INT u_int32_t flagsENDBEGIN set_shm_key NOFUNCARG ID DB_ENV * dbenvARG INT long shm_keyENDBEGIN set_tas_spins NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t tas_spinsENDBEGIN set_timeout NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t timeoutARG INT u_int32_t flagsENDBEGIN set_tmp_dir NOFUNCARG ID DB_ENV * dbenvARG STRING const char * dirENDBEGIN set_tx_max NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t maxENDBEGIN set_tx_timestamp NOFUNCARG ID DB_ENV * dbenvARG INT time_t * maxENDBEGIN set_verbose NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t whichARG INT int onoffEND## Transaction functions#BEGIN txn_abort RETCODEARG ID DB_TXN * txnpENDBEGIN txn_begin RETCODEARG ID DB_ENV * dbenvARG ID DB_TXN * parentARG IGNORE DB_TXN ** txnppARG INT u_int32_t flagsRET ID long txnidENDBEGIN txn_checkpoint NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t kbyteARG INT u_int32_t minARG INT u_int32_t flagsENDBEGIN txn_commit RETCODEARG ID DB_TXN * txnpARG INT u_int32_t flagsENDBEGIN txn_discard RETCODEARG ID DB_TXN * txnpARG INT u_int32_t flagsENDBEGIN txn_prepare CODEARG ID DB_TXN * txnpARG GID u_int8_t * gidENDBEGIN txn_recover RETCODEARG ID DB_ENV * dbenvARG IGNORE DB_PREPLIST * preplistARG INT long countARG IGNORE long * retpARG INT u_int32_t flagsRET LIST DB_TXN * txn IDRET LIST u_int8_t * gid GIDRET INT long retcountENDBEGIN txn_stat NOFUNCARG ID DB_ENV * dbenvARG IGNORE DB_TXN_STAT ** statpARG INT u_int32_t flagsENDBEGIN txn_timeout NOFUNCARG ID DB_TXN * txnpARG INT u_int32_t timeoutARG INT u_int32_t flagsEND## Replication functions#BEGIN rep_elect NOFUNCARG ID DB_ENV * dbenvARG INT int nsitesARG INT int priARG INT u_int32_t timeoutARG IGNORE int * idpENDBEGIN rep_flush NOFUNCARG ID DB_ENV * dbenvENDBEGIN rep_process_message NOFUNCARG ID DB_ENV * dbenvARG DBT DBT * recARG DBT DBT * controlARG IGNORE int * idpENDBEGIN rep_set_limit NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t mbytesARG INT u_int32_t bytesENDBEGIN rep_set_request NOFUNCARG ID DB_ENV * dbenvARG INT u_int32_t minARG INT u_int32_t maxENDBEGIN rep_set_rep_transport NOFUNCARG ID DB_ENV * dbenvARG INT int idFUNCPROT int (*)(DB_ENV *, const DBT *, const DBT *, int, u_int32_t)FUNCARG int (*func0) __P((DB_ENV *, const DBT *, const DBT *, int, u_int32_t))ENDBEGIN rep_start NOFUNCARG ID DB_ENV * dbenvARG DBT DBT * cdataARG INT u_int32_t flagsENDBEGIN rep_stat NOFUNCARG ID DB_ENV * dbenvARG IGNORE DB_REP_STAT ** statpARG INT u_int32_t flagsEND## Database functions#BEGIN db_alloc NOFUNCARG ID DB * dbpFUNCPROT void *(*)(size_t)FUNCARG void *(*func0) __P((size_t))FUNCPROT void *(*)(void *, size_t)FUNCARG void *(*func1) __P((void *, size_t))FUNCPROT void (*)(void *)FUNCARG void (*func2) __P((void *))ENDBEGIN db_associate CODEARG ID DB * dbpARG ID DB_TXN * txnpARG ID DB * sdbpFUNCPROT int (*)(DB *, const DBT *, const DBT *, DBT *)FUNCARG int (*func0) __P((DB *, const DBT *, const DBT *, DBT *))ARG INT u_int32_t flagsENDBEGIN db_bt_compare NOFUNCARG ID DB * dbpFUNCPROT int (*)(DB *, const DBT *, const DBT *)FUNCARG int (*func0) __P((DB *, const DBT *, const DBT *))ENDBEGIN db_bt_maxkey CODEARG ID DB * dbpARG INT u_int32_t maxkeyENDBEGIN db_bt_minkey CODEARG ID DB * dbpARG INT u_int32_t minkeyENDBEGIN db_bt_prefix NOFUNCARG ID DB * dbpFUNCPROT size_t(*)(DB *, const DBT *, const DBT *)FUNCARG size_t (*func0) __P((DB *, const DBT *, const DBT *))ENDBEGIN db_set_append_recno NOFUNCARG ID DB * dbpFUNCPROT int (*)(DB *, DBT *, db_recno_t)FUNCARG int (*func0) __P((DB *, DBT *, db_recno_t))ENDBEGIN db_cache_priority NOFUNCARG ID DB * dbpARG INT DB_CACHE_PRIORITY priorityENDBEGIN db_cachesize NOFUNCARG ID DB * dbpARG INT u_int32_t gbytesARG INT u_int32_t bytesARG INT int ncacheENDBEGIN db_close RETCODEARG ID DB * dbp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -