浏览代码

This file contains the definitions of the constants used in the btpd

interface.
master
Richard Nyberg 18 年前
父节点
当前提交
848de36107
共有 1 个文件被更改,包括 45 次插入0 次删除
  1. +45
    -0
      misc/ipcdefs.h

+ 45
- 0
misc/ipcdefs.h 查看文件

@@ -0,0 +1,45 @@
#ifndef ERRDEF
#define __IPCE
#define ERRDEF(name, msg)
#endif
ERRDEF(OK, "no error")
ERRDEF(COMMERR, "communication error")
ERRDEF(EBADCDIR, "bad content directory")
ERRDEF(EBADT, "bad torrent")
ERRDEF(EBADTENT, "bad torrent entry")
ERRDEF(EBADTRACKER, "bad tracker")
ERRDEF(ECREATECDIR, "couldn't create content directory")
ERRDEF(ENOKEY, "no such key")
ERRDEF(ENOTENT, "no such torrent")
ERRDEF(ESHUTDOWN, "btpd is shutting down")
ERRDEF(ETACTIVE, "torrent is active")
ERRDEF(ETENTEXIST, "torrent entry exists")
ERRDEF(ETINACTIVE, "torrent is inactive")
#ifdef __IPCE
#undef __IPCE
#undef ERRDEF
#endif
#ifndef TVDEF
#define __IPCTV
#define TVDEF(val, type, name)
#endif
TVDEF(CGOT, NUM, "content_got")
TVDEF(CSIZE, NUM, "content_size")
TVDEF(DIR, PATH, "dir")
TVDEF(NAME, STR, "name")
TVDEF(NUM, NUM, "num")
TVDEF(IHASH, BIN, "info_hash")
TVDEF(PCGOT, NUM, "pieces_got")
TVDEF(PCOUNT, NUM, "peer_count")
TVDEF(PCCOUNT, NUM, "piece_count")
TVDEF(PCSEEN, NUM, "pieces_seen")
TVDEF(RATEDWN, NUM, "rate_down")
TVDEF(RATEUP, NUM, "rate_up")
TVDEF(SESSDWN, NUM, "sess_down")
TVDEF(SESSUP, NUM, "sess_up")
TVDEF(STATE, TSTATE, "state")
TVDEF(TRERR, NUM, "tr_errors")
#ifdef __IPCTV
#undef __IPCTV
#undef TVDEF
#endif

正在加载...
取消
保存