mirror of
https://github.com/blanking003/cx-cocos.git
synced 2024-12-26 03:39:06 +00:00
24 lines
439 B
C++
24 lines
439 B
C++
|
|
#include "cxIntf.h"
|
|
|
|
DataCallback CxIntf::m_cxCallback = NULL;
|
|
|
|
static CxIntf* s_sharedCxIntf = nullptr;
|
|
CxIntf* CxIntf::ins()
|
|
{
|
|
if (!s_sharedCxIntf)
|
|
s_sharedCxIntf = new CxIntf();
|
|
return s_sharedCxIntf;
|
|
}
|
|
|
|
std::string CxIntf::call(std::string fname, cc::ValueVector params, const DataCallback& callback)
|
|
{
|
|
if (fname == "encode" || fname == "decode" || fname == "md5")
|
|
return params.at(0).asString();
|
|
return "";
|
|
}
|
|
|
|
|
|
|
|
|