cx-cocos/cx-framework3.1/cx-native/cxIntf.cpp

24 lines
439 B
C++
Raw Normal View History

2021-06-07 07:13:32 +00:00
#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 "";
}