📄 smcic.cpp
字号:
arg.SetItemDatetime(3,enddt);
if(bnc->Call("count_mlist_bydate",NULL,&arg,&res))
{
*count=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_query_mlist_bydate(BaseNetClient *bnc,int uid,LPCSTR passwd,LPCSTR boxname,std_datetime_t startdt,std_datetime_t enddt,int start,int num,int basc,NetTable *buf)
{
NetDataTuple arg,res;
arg.AddItems(8);
arg.SetItemLong(0,uid);
arg.SetItemString(1,passwd);
arg.SetItemString(2,boxname);
arg.SetItemDatetime(3,startdt);
arg.SetItemDatetime(4,enddt);
arg.SetItemLong(5,start);
arg.SetItemLong(6,num);
arg.SetItemLong(7,basc);
if(bnc->Call("query_mlist_bydate",NULL,&arg,&res))
{
res.GetItemNetTable(0)->CopyTo(buf);
return TRUE;
}
return FALSE;
}
BOOL call_open_forward(BaseNetClient *bnc,int uid,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemLong(0,uid);
if(bnc->Call("open_forward",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_fetch_forward(BaseNetClient *bnc,int uid,int maxrows,CString * addrlist)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemLong(0,uid);
arg.SetItemLong(1,maxrows);
if(bnc->Call("fetch_forward",NULL,&arg,&res))
{
*addrlist=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_close_forward(BaseNetClient *bnc,int uid,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemLong(0,uid);
if(bnc->Call("close_forward",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_add_smtpsrv(BaseNetClient *bnc,LPCSTR name,LPCSTR server,int port,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(3);
arg.SetItemString(0,name);
arg.SetItemString(1,server);
arg.SetItemLong(2,port);
if(bnc->Call("add_smtpsrv",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_del_smtpsrv(BaseNetClient *bnc,LPCSTR name,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,name);
if(bnc->Call("del_smtpsrv",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_get_smtpsrv(BaseNetClient *bnc,CString * list)
{
NetDataTuple arg,res;
if(bnc->Call("get_smtpsrv",NULL,&arg,&res))
{
*list=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_add_smtplog(BaseNetClient *bnc,LPCSTR mailfrom,LPCSTR to,LPCSTR clntip,int size,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(4);
arg.SetItemString(0,mailfrom);
arg.SetItemString(1,to);
arg.SetItemString(2,clntip);
arg.SetItemLong(3,size);
if(bnc->Call("add_smtplog",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_pf_readstr(BaseNetClient *bnc,LPCSTR name,CString * value)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,name);
if(bnc->Call("pf_readstr",NULL,&arg,&res))
{
*value=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_pf_readnumber(BaseNetClient *bnc,LPCSTR name,double *value)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,name);
if(bnc->Call("pf_readnumber",NULL,&arg,&res))
{
*value=res.GetItemDouble(0);
return TRUE;
}
return FALSE;
}
BOOL call_pf_writestr(BaseNetClient *bnc,LPCSTR name,LPCSTR value,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemString(0,name);
arg.SetItemString(1,value);
if(bnc->Call("pf_writestr",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_setuidscope(BaseNetClient *bnc,int start,int end,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemLong(0,start);
arg.SetItemLong(1,end);
if(bnc->Call("setuidscope",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_getuidscope(BaseNetClient *bnc,int *retcode,CString * scope)
{
NetDataTuple arg,res;
if(bnc->Call("getuidscope",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
*scope=res.GetItemString(1);
return TRUE;
}
return FALSE;
}
BOOL call_setmaxid(BaseNetClient *bnc,int maxid,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemLong(0,maxid);
if(bnc->Call("setmaxid",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_clearfreeid(BaseNetClient *bnc,int *retcode)
{
NetDataTuple arg,res;
if(bnc->Call("clearfreeid",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_getname(BaseNetClient *bnc,CString * name)
{
NetDataTuple arg,res;
if(bnc->Call("getname",NULL,&arg,&res))
{
*name=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_regdcc(BaseNetClient *bnc)
{
NetDataTuple arg,res;
if(bnc->Call("regdcc",NULL,&arg,&res))
{
return TRUE;
}
return FALSE;
}
BOOL call_send_event(BaseNetClient *bnc,LPCSTR event_name,int uid,LPCSTR boxname,LPCSTR mfid,LPCSTR param,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(5);
arg.SetItemString(0,event_name);
arg.SetItemLong(1,uid);
arg.SetItemString(2,boxname);
arg.SetItemString(3,mfid);
arg.SetItemString(4,param);
if(bnc->Call("snd_event",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_fetch_event(BaseNetClient *bnc,int *retcode,CString * eventname,int *uid,CString * boxname,CString * mfid,CString * param,std_datetime_t *time)
{
NetDataTuple arg,res;
if(bnc->Call("fetch_event",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
*eventname=res.GetItemString(1);
*uid=res.GetItemLong(2);
*boxname=res.GetItemString(3);
*mfid=res.GetItemString(4);
*param=res.GetItemString(5);
*time=res.GetItemDatetime(6);
return TRUE;
}
return FALSE;
}
BOOL call_fetch_eventex(BaseNetClient *bnc,int num,NetTable *buf)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemLong(0,num);
if(bnc->Call("fetch_eventex",NULL,&arg,&res))
{
res.GetItemNetTable(0)->CopyTo(buf);
return TRUE;
}
return FALSE;
}
BOOL call_mf_getfield(BaseNetClient *bnc,int uid,LPCSTR mfid,CString &datakey,LPCSTR field,UString *value)
{
NetDataTuple arg,res;
arg.AddItems(4);
arg.SetItemLong(0,uid);
arg.SetItemString(1,mfid);
arg.SetItemBinary(2,datakey);
arg.SetItemString(3,field);
if(bnc->Call("mf_getfield",NULL,&arg,&res))
{
res.GetItemUString(0,value);
return TRUE;
}
return FALSE;
}
BOOL call_mf_getfieldex(BaseNetClient *bnc,int uid,LPCSTR boxname,LPCSTR mfid,int start,int len,LPCSTR field,UString *value)
{
NetDataTuple arg,res;
arg.AddItems(6);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxname);
arg.SetItemString(2,mfid);
arg.SetItemLong(3,start);
arg.SetItemLong(4,len);
arg.SetItemString(5,field);
if(bnc->Call("mf_getfieldex",NULL,&arg,&res))
{
res.GetItemUString(0,value);
return TRUE;
}
return FALSE;
}
BOOL call_rmv_oldmail(BaseNetClient *bnc,LPCSTR box,LPCSTR beforeday,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemString(0,box);
arg.SetItemString(1,beforeday);
if(bnc->Call("rmv_oldmail",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_logon(BaseNetClient *bnc,LPCSTR alias,LPCSTR domain,LPCSTR pwd,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(3);
arg.SetItemString(0,alias);
arg.SetItemString(1,domain);
arg.SetItemString(2,pwd);
if(bnc->Call("logon",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_istrust(BaseNetClient *bnc,int *retcode)
{
NetDataTuple arg,res;
if(bnc->Call("istrust",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_get_trustip(BaseNetClient *bnc,CString * iplist)
{
NetDataTuple arg,res;
if(bnc->Call("get_trustip",NULL,&arg,&res))
{
*iplist=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_add_trustip(BaseNetClient *bnc,LPCSTR ip,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,ip);
if(bnc->Call("addtrustip",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_del_trustip(BaseNetClient *bnc,LPCSTR ip,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,ip);
if(bnc->Call("deltrustip",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_istrustip(BaseNetClient *bnc,LPCSTR ip,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,ip);
if(bnc->Call("istrustip",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_alloc_userboxid(BaseNetClient *bnc,CString * boxid)
{
NetDataTuple arg,res;
if(bnc->Call("alloc_userboxid",NULL,&arg,&res))
{
*boxid=res.GetItemString(0);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_cr(BaseNetClient *bnc,int uid,LPCSTR boxname,LPCSTR boxparent,LPCSTR boxid,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(4);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxname);
arg.SetItemString(2,boxparent);
arg.SetItemString(3,boxid);
if(bnc->Call("ubox_cr",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_rm(BaseNetClient *bnc,int uid,LPCSTR boxid,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxid);
if(bnc->Call("ubox_rm",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_setname(BaseNetClient *bnc,int uid,LPCSTR boxid,LPCSTR boxname,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(3);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxid);
arg.SetItemString(2,boxname);
if(bnc->Call("ubox_setname",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_getname(BaseNetClient *bnc,int uid,LPCSTR boxid,int *retcode,CString * boxname)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxid);
if(bnc->Call("ubox_getname",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
*boxname=res.GetItemString(1);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_get(BaseNetClient *bnc,int uid,int *retcode,NetTable *lst)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemLong(0,uid);
if(bnc->Call("ubox_getlst",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
res.GetItemNetTable(1)->CopyTo(lst);
return TRUE;
}
return FALSE;
}
BOOL call_ubox_find(BaseNetClient *bnc,int uid,LPCSTR boxname,int *retcode,CString * boxid)
{
NetDataTuple arg,res;
arg.AddItems(2);
arg.SetItemLong(0,uid);
arg.SetItemString(1,boxname);
if(bnc->Call("ubox_find",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
*boxid=res.GetItemString(1);
return TRUE;
}
return FALSE;
}
BOOL call_get_status(BaseNetClient *bnc,int *dbms_readyc,int *dbms_busyc,int *clntc,int *file_cachec,int *user_cachec)
{
NetDataTuple arg,res;
if(bnc->Call("get_status",NULL,&arg,&res))
{
*dbms_readyc=res.GetItemLong(0);
*dbms_busyc=res.GetItemLong(1);
*clntc=res.GetItemLong(2);
*file_cachec=res.GetItemLong(3);
*user_cachec=res.GetItemLong(4);
return TRUE;
}
return FALSE;
}
BOOL call_dump_fun(BaseNetClient *bnc,LPCSTR logfile,int *retcode)
{
NetDataTuple arg,res;
arg.AddItems(1);
arg.SetItemString(0,logfile);
if(bnc->Call("dump_fun",NULL,&arg,&res))
{
*retcode=res.GetItemLong(0);
return TRUE;
}
return FALSE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -