lua_cocos2dx_pluginx_auto.cpp 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589
  1. #include "lua_cocos2dx_pluginx_auto.hpp"
  2. #include "PluginManager.h"
  3. #include "ProtocolAnalytics.h"
  4. #include "ProtocolIAP.h"
  5. #include "ProtocolAds.h"
  6. #include "ProtocolShare.h"
  7. #include "ProtocolSocial.h"
  8. #include "ProtocolUser.h"
  9. #include "AgentManager.h"
  10. #include "FacebookAgent.h"
  11. #include "tolua_fix.h"
  12. #include "LuaBasicConversions.h"
  13. #include "lua_pluginx_basic_conversions.h"
  14. int lua_pluginx_protocols_PluginProtocol_getPluginName(lua_State* tolua_S)
  15. {
  16. int argc = 0;
  17. cocos2d::plugin::PluginProtocol* cobj = nullptr;
  18. bool ok = true;
  19. #if COCOS2D_DEBUG >= 1
  20. tolua_Error tolua_err;
  21. #endif
  22. #if COCOS2D_DEBUG >= 1
  23. if (!tolua_isusertype(tolua_S,1,"plugin.PluginProtocol",0,&tolua_err)) goto tolua_lerror;
  24. #endif
  25. cobj = (cocos2d::plugin::PluginProtocol*)tolua_tousertype(tolua_S,1,0);
  26. #if COCOS2D_DEBUG >= 1
  27. if (!cobj)
  28. {
  29. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginProtocol_getPluginName'", nullptr);
  30. return 0;
  31. }
  32. #endif
  33. argc = lua_gettop(tolua_S)-1;
  34. if (argc == 0)
  35. {
  36. if(!ok)
  37. {
  38. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginProtocol_getPluginName'", nullptr);
  39. return 0;
  40. }
  41. const char* ret = cobj->getPluginName();
  42. tolua_pushstring(tolua_S,(const char*)ret);
  43. return 1;
  44. }
  45. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginProtocol:getPluginName",argc, 0);
  46. return 0;
  47. #if COCOS2D_DEBUG >= 1
  48. tolua_lerror:
  49. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginProtocol_getPluginName'.",&tolua_err);
  50. #endif
  51. return 0;
  52. }
  53. int lua_pluginx_protocols_PluginProtocol_getPluginVersion(lua_State* tolua_S)
  54. {
  55. int argc = 0;
  56. cocos2d::plugin::PluginProtocol* cobj = nullptr;
  57. bool ok = true;
  58. #if COCOS2D_DEBUG >= 1
  59. tolua_Error tolua_err;
  60. #endif
  61. #if COCOS2D_DEBUG >= 1
  62. if (!tolua_isusertype(tolua_S,1,"plugin.PluginProtocol",0,&tolua_err)) goto tolua_lerror;
  63. #endif
  64. cobj = (cocos2d::plugin::PluginProtocol*)tolua_tousertype(tolua_S,1,0);
  65. #if COCOS2D_DEBUG >= 1
  66. if (!cobj)
  67. {
  68. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginProtocol_getPluginVersion'", nullptr);
  69. return 0;
  70. }
  71. #endif
  72. argc = lua_gettop(tolua_S)-1;
  73. if (argc == 0)
  74. {
  75. if(!ok)
  76. {
  77. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginProtocol_getPluginVersion'", nullptr);
  78. return 0;
  79. }
  80. std::string ret = cobj->getPluginVersion();
  81. tolua_pushcppstring(tolua_S,ret);
  82. return 1;
  83. }
  84. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginProtocol:getPluginVersion",argc, 0);
  85. return 0;
  86. #if COCOS2D_DEBUG >= 1
  87. tolua_lerror:
  88. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginProtocol_getPluginVersion'.",&tolua_err);
  89. #endif
  90. return 0;
  91. }
  92. int lua_pluginx_protocols_PluginProtocol_getSDKVersion(lua_State* tolua_S)
  93. {
  94. int argc = 0;
  95. cocos2d::plugin::PluginProtocol* cobj = nullptr;
  96. bool ok = true;
  97. #if COCOS2D_DEBUG >= 1
  98. tolua_Error tolua_err;
  99. #endif
  100. #if COCOS2D_DEBUG >= 1
  101. if (!tolua_isusertype(tolua_S,1,"plugin.PluginProtocol",0,&tolua_err)) goto tolua_lerror;
  102. #endif
  103. cobj = (cocos2d::plugin::PluginProtocol*)tolua_tousertype(tolua_S,1,0);
  104. #if COCOS2D_DEBUG >= 1
  105. if (!cobj)
  106. {
  107. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginProtocol_getSDKVersion'", nullptr);
  108. return 0;
  109. }
  110. #endif
  111. argc = lua_gettop(tolua_S)-1;
  112. if (argc == 0)
  113. {
  114. if(!ok)
  115. {
  116. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginProtocol_getSDKVersion'", nullptr);
  117. return 0;
  118. }
  119. std::string ret = cobj->getSDKVersion();
  120. tolua_pushcppstring(tolua_S,ret);
  121. return 1;
  122. }
  123. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginProtocol:getSDKVersion",argc, 0);
  124. return 0;
  125. #if COCOS2D_DEBUG >= 1
  126. tolua_lerror:
  127. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginProtocol_getSDKVersion'.",&tolua_err);
  128. #endif
  129. return 0;
  130. }
  131. int lua_pluginx_protocols_PluginProtocol_setDebugMode(lua_State* tolua_S)
  132. {
  133. int argc = 0;
  134. cocos2d::plugin::PluginProtocol* cobj = nullptr;
  135. bool ok = true;
  136. #if COCOS2D_DEBUG >= 1
  137. tolua_Error tolua_err;
  138. #endif
  139. #if COCOS2D_DEBUG >= 1
  140. if (!tolua_isusertype(tolua_S,1,"plugin.PluginProtocol",0,&tolua_err)) goto tolua_lerror;
  141. #endif
  142. cobj = (cocos2d::plugin::PluginProtocol*)tolua_tousertype(tolua_S,1,0);
  143. #if COCOS2D_DEBUG >= 1
  144. if (!cobj)
  145. {
  146. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginProtocol_setDebugMode'", nullptr);
  147. return 0;
  148. }
  149. #endif
  150. argc = lua_gettop(tolua_S)-1;
  151. if (argc == 1)
  152. {
  153. bool arg0;
  154. ok &= luaval_to_boolean(tolua_S, 2,&arg0, "plugin.PluginProtocol:setDebugMode");
  155. if(!ok)
  156. {
  157. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginProtocol_setDebugMode'", nullptr);
  158. return 0;
  159. }
  160. cobj->setDebugMode(arg0);
  161. return 0;
  162. }
  163. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginProtocol:setDebugMode",argc, 1);
  164. return 0;
  165. #if COCOS2D_DEBUG >= 1
  166. tolua_lerror:
  167. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginProtocol_setDebugMode'.",&tolua_err);
  168. #endif
  169. return 0;
  170. }
  171. static int lua_pluginx_protocols_PluginProtocol_finalize(lua_State* tolua_S)
  172. {
  173. printf("luabindings: finalizing LUA object (PluginProtocol)");
  174. return 0;
  175. }
  176. int lua_register_pluginx_protocols_PluginProtocol(lua_State* tolua_S)
  177. {
  178. tolua_usertype(tolua_S,"plugin.PluginProtocol");
  179. tolua_cclass(tolua_S,"PluginProtocol","plugin.PluginProtocol","",nullptr);
  180. tolua_beginmodule(tolua_S,"PluginProtocol");
  181. tolua_function(tolua_S,"getPluginName",lua_pluginx_protocols_PluginProtocol_getPluginName);
  182. tolua_function(tolua_S,"getPluginVersion",lua_pluginx_protocols_PluginProtocol_getPluginVersion);
  183. tolua_function(tolua_S,"getSDKVersion",lua_pluginx_protocols_PluginProtocol_getSDKVersion);
  184. tolua_function(tolua_S,"setDebugMode",lua_pluginx_protocols_PluginProtocol_setDebugMode);
  185. tolua_endmodule(tolua_S);
  186. std::string typeName = typeid(cocos2d::plugin::PluginProtocol).name();
  187. g_luaType[typeName] = "plugin.PluginProtocol";
  188. g_typeCast["PluginProtocol"] = "plugin.PluginProtocol";
  189. return 1;
  190. }
  191. int lua_pluginx_protocols_PluginManager_unloadPlugin(lua_State* tolua_S)
  192. {
  193. int argc = 0;
  194. cocos2d::plugin::PluginManager* cobj = nullptr;
  195. bool ok = true;
  196. #if COCOS2D_DEBUG >= 1
  197. tolua_Error tolua_err;
  198. #endif
  199. #if COCOS2D_DEBUG >= 1
  200. if (!tolua_isusertype(tolua_S,1,"plugin.PluginManager",0,&tolua_err)) goto tolua_lerror;
  201. #endif
  202. cobj = (cocos2d::plugin::PluginManager*)tolua_tousertype(tolua_S,1,0);
  203. #if COCOS2D_DEBUG >= 1
  204. if (!cobj)
  205. {
  206. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginManager_unloadPlugin'", nullptr);
  207. return 0;
  208. }
  209. #endif
  210. argc = lua_gettop(tolua_S)-1;
  211. if (argc == 1)
  212. {
  213. const char* arg0;
  214. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.PluginManager:unloadPlugin"); arg0 = arg0_tmp.c_str();
  215. if(!ok)
  216. {
  217. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginManager_unloadPlugin'", nullptr);
  218. return 0;
  219. }
  220. cobj->unloadPlugin(arg0);
  221. return 0;
  222. }
  223. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginManager:unloadPlugin",argc, 1);
  224. return 0;
  225. #if COCOS2D_DEBUG >= 1
  226. tolua_lerror:
  227. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginManager_unloadPlugin'.",&tolua_err);
  228. #endif
  229. return 0;
  230. }
  231. int lua_pluginx_protocols_PluginManager_loadPlugin(lua_State* tolua_S)
  232. {
  233. int argc = 0;
  234. cocos2d::plugin::PluginManager* cobj = nullptr;
  235. bool ok = true;
  236. #if COCOS2D_DEBUG >= 1
  237. tolua_Error tolua_err;
  238. #endif
  239. #if COCOS2D_DEBUG >= 1
  240. if (!tolua_isusertype(tolua_S,1,"plugin.PluginManager",0,&tolua_err)) goto tolua_lerror;
  241. #endif
  242. cobj = (cocos2d::plugin::PluginManager*)tolua_tousertype(tolua_S,1,0);
  243. #if COCOS2D_DEBUG >= 1
  244. if (!cobj)
  245. {
  246. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_PluginManager_loadPlugin'", nullptr);
  247. return 0;
  248. }
  249. #endif
  250. argc = lua_gettop(tolua_S)-1;
  251. if (argc == 1)
  252. {
  253. const char* arg0;
  254. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.PluginManager:loadPlugin"); arg0 = arg0_tmp.c_str();
  255. if(!ok)
  256. {
  257. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginManager_loadPlugin'", nullptr);
  258. return 0;
  259. }
  260. cocos2d::plugin::PluginProtocol* ret = cobj->loadPlugin(arg0);
  261. object_to_luaval<cocos2d::plugin::PluginProtocol>(tolua_S, "plugin.PluginProtocol",(cocos2d::plugin::PluginProtocol*)ret);
  262. return 1;
  263. }
  264. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.PluginManager:loadPlugin",argc, 1);
  265. return 0;
  266. #if COCOS2D_DEBUG >= 1
  267. tolua_lerror:
  268. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginManager_loadPlugin'.",&tolua_err);
  269. #endif
  270. return 0;
  271. }
  272. int lua_pluginx_protocols_PluginManager_end(lua_State* tolua_S)
  273. {
  274. int argc = 0;
  275. bool ok = true;
  276. #if COCOS2D_DEBUG >= 1
  277. tolua_Error tolua_err;
  278. #endif
  279. #if COCOS2D_DEBUG >= 1
  280. if (!tolua_isusertable(tolua_S,1,"plugin.PluginManager",0,&tolua_err)) goto tolua_lerror;
  281. #endif
  282. argc = lua_gettop(tolua_S) - 1;
  283. if (argc == 0)
  284. {
  285. if(!ok)
  286. {
  287. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginManager_end'", nullptr);
  288. return 0;
  289. }
  290. cocos2d::plugin::PluginManager::end();
  291. return 0;
  292. }
  293. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "plugin.PluginManager:end",argc, 0);
  294. return 0;
  295. #if COCOS2D_DEBUG >= 1
  296. tolua_lerror:
  297. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginManager_end'.",&tolua_err);
  298. #endif
  299. return 0;
  300. }
  301. int lua_pluginx_protocols_PluginManager_getInstance(lua_State* tolua_S)
  302. {
  303. int argc = 0;
  304. bool ok = true;
  305. #if COCOS2D_DEBUG >= 1
  306. tolua_Error tolua_err;
  307. #endif
  308. #if COCOS2D_DEBUG >= 1
  309. if (!tolua_isusertable(tolua_S,1,"plugin.PluginManager",0,&tolua_err)) goto tolua_lerror;
  310. #endif
  311. argc = lua_gettop(tolua_S) - 1;
  312. if (argc == 0)
  313. {
  314. if(!ok)
  315. {
  316. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_PluginManager_getInstance'", nullptr);
  317. return 0;
  318. }
  319. cocos2d::plugin::PluginManager* ret = cocos2d::plugin::PluginManager::getInstance();
  320. object_to_luaval<cocos2d::plugin::PluginManager>(tolua_S, "plugin.PluginManager",(cocos2d::plugin::PluginManager*)ret);
  321. return 1;
  322. }
  323. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "plugin.PluginManager:getInstance",argc, 0);
  324. return 0;
  325. #if COCOS2D_DEBUG >= 1
  326. tolua_lerror:
  327. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_PluginManager_getInstance'.",&tolua_err);
  328. #endif
  329. return 0;
  330. }
  331. static int lua_pluginx_protocols_PluginManager_finalize(lua_State* tolua_S)
  332. {
  333. printf("luabindings: finalizing LUA object (PluginManager)");
  334. return 0;
  335. }
  336. int lua_register_pluginx_protocols_PluginManager(lua_State* tolua_S)
  337. {
  338. tolua_usertype(tolua_S,"plugin.PluginManager");
  339. tolua_cclass(tolua_S,"PluginManager","plugin.PluginManager","",nullptr);
  340. tolua_beginmodule(tolua_S,"PluginManager");
  341. tolua_function(tolua_S,"unloadPlugin",lua_pluginx_protocols_PluginManager_unloadPlugin);
  342. tolua_function(tolua_S,"loadPlugin",lua_pluginx_protocols_PluginManager_loadPlugin);
  343. tolua_function(tolua_S,"end", lua_pluginx_protocols_PluginManager_end);
  344. tolua_function(tolua_S,"getInstance", lua_pluginx_protocols_PluginManager_getInstance);
  345. tolua_endmodule(tolua_S);
  346. std::string typeName = typeid(cocos2d::plugin::PluginManager).name();
  347. g_luaType[typeName] = "plugin.PluginManager";
  348. g_typeCast["PluginManager"] = "plugin.PluginManager";
  349. return 1;
  350. }
  351. int lua_pluginx_protocols_ProtocolAnalytics_logTimedEventBegin(lua_State* tolua_S)
  352. {
  353. int argc = 0;
  354. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  355. bool ok = true;
  356. #if COCOS2D_DEBUG >= 1
  357. tolua_Error tolua_err;
  358. #endif
  359. #if COCOS2D_DEBUG >= 1
  360. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  361. #endif
  362. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  363. #if COCOS2D_DEBUG >= 1
  364. if (!cobj)
  365. {
  366. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventBegin'", nullptr);
  367. return 0;
  368. }
  369. #endif
  370. argc = lua_gettop(tolua_S)-1;
  371. if (argc == 1)
  372. {
  373. const char* arg0;
  374. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:logTimedEventBegin"); arg0 = arg0_tmp.c_str();
  375. if(!ok)
  376. {
  377. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventBegin'", nullptr);
  378. return 0;
  379. }
  380. cobj->logTimedEventBegin(arg0);
  381. return 0;
  382. }
  383. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:logTimedEventBegin",argc, 1);
  384. return 0;
  385. #if COCOS2D_DEBUG >= 1
  386. tolua_lerror:
  387. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventBegin'.",&tolua_err);
  388. #endif
  389. return 0;
  390. }
  391. int lua_pluginx_protocols_ProtocolAnalytics_logError(lua_State* tolua_S)
  392. {
  393. int argc = 0;
  394. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  395. bool ok = true;
  396. #if COCOS2D_DEBUG >= 1
  397. tolua_Error tolua_err;
  398. #endif
  399. #if COCOS2D_DEBUG >= 1
  400. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  401. #endif
  402. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  403. #if COCOS2D_DEBUG >= 1
  404. if (!cobj)
  405. {
  406. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_logError'", nullptr);
  407. return 0;
  408. }
  409. #endif
  410. argc = lua_gettop(tolua_S)-1;
  411. if (argc == 2)
  412. {
  413. const char* arg0;
  414. const char* arg1;
  415. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:logError"); arg0 = arg0_tmp.c_str();
  416. std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "plugin.ProtocolAnalytics:logError"); arg1 = arg1_tmp.c_str();
  417. if(!ok)
  418. {
  419. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_logError'", nullptr);
  420. return 0;
  421. }
  422. cobj->logError(arg0, arg1);
  423. return 0;
  424. }
  425. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:logError",argc, 2);
  426. return 0;
  427. #if COCOS2D_DEBUG >= 1
  428. tolua_lerror:
  429. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_logError'.",&tolua_err);
  430. #endif
  431. return 0;
  432. }
  433. int lua_pluginx_protocols_ProtocolAnalytics_setCaptureUncaughtException(lua_State* tolua_S)
  434. {
  435. int argc = 0;
  436. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  437. bool ok = true;
  438. #if COCOS2D_DEBUG >= 1
  439. tolua_Error tolua_err;
  440. #endif
  441. #if COCOS2D_DEBUG >= 1
  442. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  443. #endif
  444. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  445. #if COCOS2D_DEBUG >= 1
  446. if (!cobj)
  447. {
  448. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_setCaptureUncaughtException'", nullptr);
  449. return 0;
  450. }
  451. #endif
  452. argc = lua_gettop(tolua_S)-1;
  453. if (argc == 1)
  454. {
  455. bool arg0;
  456. ok &= luaval_to_boolean(tolua_S, 2,&arg0, "plugin.ProtocolAnalytics:setCaptureUncaughtException");
  457. if(!ok)
  458. {
  459. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_setCaptureUncaughtException'", nullptr);
  460. return 0;
  461. }
  462. cobj->setCaptureUncaughtException(arg0);
  463. return 0;
  464. }
  465. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:setCaptureUncaughtException",argc, 1);
  466. return 0;
  467. #if COCOS2D_DEBUG >= 1
  468. tolua_lerror:
  469. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_setCaptureUncaughtException'.",&tolua_err);
  470. #endif
  471. return 0;
  472. }
  473. int lua_pluginx_protocols_ProtocolAnalytics_setSessionContinueMillis(lua_State* tolua_S)
  474. {
  475. int argc = 0;
  476. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  477. bool ok = true;
  478. #if COCOS2D_DEBUG >= 1
  479. tolua_Error tolua_err;
  480. #endif
  481. #if COCOS2D_DEBUG >= 1
  482. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  483. #endif
  484. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  485. #if COCOS2D_DEBUG >= 1
  486. if (!cobj)
  487. {
  488. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_setSessionContinueMillis'", nullptr);
  489. return 0;
  490. }
  491. #endif
  492. argc = lua_gettop(tolua_S)-1;
  493. if (argc == 1)
  494. {
  495. long arg0;
  496. ok &= luaval_to_long(tolua_S, 2, &arg0, "plugin.ProtocolAnalytics:setSessionContinueMillis");
  497. if(!ok)
  498. {
  499. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_setSessionContinueMillis'", nullptr);
  500. return 0;
  501. }
  502. cobj->setSessionContinueMillis(arg0);
  503. return 0;
  504. }
  505. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:setSessionContinueMillis",argc, 1);
  506. return 0;
  507. #if COCOS2D_DEBUG >= 1
  508. tolua_lerror:
  509. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_setSessionContinueMillis'.",&tolua_err);
  510. #endif
  511. return 0;
  512. }
  513. int lua_pluginx_protocols_ProtocolAnalytics_logEvent(lua_State* tolua_S)
  514. {
  515. int argc = 0;
  516. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  517. bool ok = true;
  518. #if COCOS2D_DEBUG >= 1
  519. tolua_Error tolua_err;
  520. #endif
  521. #if COCOS2D_DEBUG >= 1
  522. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  523. #endif
  524. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  525. #if COCOS2D_DEBUG >= 1
  526. if (!cobj)
  527. {
  528. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_logEvent'", nullptr);
  529. return 0;
  530. }
  531. #endif
  532. argc = lua_gettop(tolua_S)-1;
  533. if (argc == 1)
  534. {
  535. const char* arg0;
  536. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:logEvent"); arg0 = arg0_tmp.c_str();
  537. if(!ok)
  538. {
  539. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_logEvent'", nullptr);
  540. return 0;
  541. }
  542. cobj->logEvent(arg0);
  543. return 0;
  544. }
  545. if (argc == 2)
  546. {
  547. const char* arg0;
  548. std::map<std::basic_string<char>, std::basic_string<char>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > > >* arg1;
  549. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:logEvent"); arg0 = arg0_tmp.c_str();
  550. ok &= luaval_to_object<std::map<std::basic_string<char>, std::basic_string<char>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > > >>(tolua_S, 3, "std::map<std::basic_string<char>, std::basic_string<char>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > > >*",&arg1);
  551. if(!ok)
  552. {
  553. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_logEvent'", nullptr);
  554. return 0;
  555. }
  556. cobj->logEvent(arg0, arg1);
  557. return 0;
  558. }
  559. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:logEvent",argc, 1);
  560. return 0;
  561. #if COCOS2D_DEBUG >= 1
  562. tolua_lerror:
  563. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_logEvent'.",&tolua_err);
  564. #endif
  565. return 0;
  566. }
  567. int lua_pluginx_protocols_ProtocolAnalytics_startSession(lua_State* tolua_S)
  568. {
  569. int argc = 0;
  570. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  571. bool ok = true;
  572. #if COCOS2D_DEBUG >= 1
  573. tolua_Error tolua_err;
  574. #endif
  575. #if COCOS2D_DEBUG >= 1
  576. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  577. #endif
  578. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  579. #if COCOS2D_DEBUG >= 1
  580. if (!cobj)
  581. {
  582. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_startSession'", nullptr);
  583. return 0;
  584. }
  585. #endif
  586. argc = lua_gettop(tolua_S)-1;
  587. if (argc == 1)
  588. {
  589. const char* arg0;
  590. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:startSession"); arg0 = arg0_tmp.c_str();
  591. if(!ok)
  592. {
  593. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_startSession'", nullptr);
  594. return 0;
  595. }
  596. cobj->startSession(arg0);
  597. return 0;
  598. }
  599. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:startSession",argc, 1);
  600. return 0;
  601. #if COCOS2D_DEBUG >= 1
  602. tolua_lerror:
  603. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_startSession'.",&tolua_err);
  604. #endif
  605. return 0;
  606. }
  607. int lua_pluginx_protocols_ProtocolAnalytics_stopSession(lua_State* tolua_S)
  608. {
  609. int argc = 0;
  610. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  611. bool ok = true;
  612. #if COCOS2D_DEBUG >= 1
  613. tolua_Error tolua_err;
  614. #endif
  615. #if COCOS2D_DEBUG >= 1
  616. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  617. #endif
  618. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  619. #if COCOS2D_DEBUG >= 1
  620. if (!cobj)
  621. {
  622. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_stopSession'", nullptr);
  623. return 0;
  624. }
  625. #endif
  626. argc = lua_gettop(tolua_S)-1;
  627. if (argc == 0)
  628. {
  629. if(!ok)
  630. {
  631. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_stopSession'", nullptr);
  632. return 0;
  633. }
  634. cobj->stopSession();
  635. return 0;
  636. }
  637. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:stopSession",argc, 0);
  638. return 0;
  639. #if COCOS2D_DEBUG >= 1
  640. tolua_lerror:
  641. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_stopSession'.",&tolua_err);
  642. #endif
  643. return 0;
  644. }
  645. int lua_pluginx_protocols_ProtocolAnalytics_logTimedEventEnd(lua_State* tolua_S)
  646. {
  647. int argc = 0;
  648. cocos2d::plugin::ProtocolAnalytics* cobj = nullptr;
  649. bool ok = true;
  650. #if COCOS2D_DEBUG >= 1
  651. tolua_Error tolua_err;
  652. #endif
  653. #if COCOS2D_DEBUG >= 1
  654. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAnalytics",0,&tolua_err)) goto tolua_lerror;
  655. #endif
  656. cobj = (cocos2d::plugin::ProtocolAnalytics*)tolua_tousertype(tolua_S,1,0);
  657. #if COCOS2D_DEBUG >= 1
  658. if (!cobj)
  659. {
  660. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventEnd'", nullptr);
  661. return 0;
  662. }
  663. #endif
  664. argc = lua_gettop(tolua_S)-1;
  665. if (argc == 1)
  666. {
  667. const char* arg0;
  668. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolAnalytics:logTimedEventEnd"); arg0 = arg0_tmp.c_str();
  669. if(!ok)
  670. {
  671. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventEnd'", nullptr);
  672. return 0;
  673. }
  674. cobj->logTimedEventEnd(arg0);
  675. return 0;
  676. }
  677. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAnalytics:logTimedEventEnd",argc, 1);
  678. return 0;
  679. #if COCOS2D_DEBUG >= 1
  680. tolua_lerror:
  681. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAnalytics_logTimedEventEnd'.",&tolua_err);
  682. #endif
  683. return 0;
  684. }
  685. static int lua_pluginx_protocols_ProtocolAnalytics_finalize(lua_State* tolua_S)
  686. {
  687. printf("luabindings: finalizing LUA object (ProtocolAnalytics)");
  688. return 0;
  689. }
  690. int lua_register_pluginx_protocols_ProtocolAnalytics(lua_State* tolua_S)
  691. {
  692. tolua_usertype(tolua_S,"plugin.ProtocolAnalytics");
  693. tolua_cclass(tolua_S,"ProtocolAnalytics","plugin.ProtocolAnalytics","plugin.PluginProtocol",nullptr);
  694. tolua_beginmodule(tolua_S,"ProtocolAnalytics");
  695. tolua_function(tolua_S,"logTimedEventBegin",lua_pluginx_protocols_ProtocolAnalytics_logTimedEventBegin);
  696. tolua_function(tolua_S,"logError",lua_pluginx_protocols_ProtocolAnalytics_logError);
  697. tolua_function(tolua_S,"setCaptureUncaughtException",lua_pluginx_protocols_ProtocolAnalytics_setCaptureUncaughtException);
  698. tolua_function(tolua_S,"setSessionContinueMillis",lua_pluginx_protocols_ProtocolAnalytics_setSessionContinueMillis);
  699. tolua_function(tolua_S,"logEvent",lua_pluginx_protocols_ProtocolAnalytics_logEvent);
  700. tolua_function(tolua_S,"startSession",lua_pluginx_protocols_ProtocolAnalytics_startSession);
  701. tolua_function(tolua_S,"stopSession",lua_pluginx_protocols_ProtocolAnalytics_stopSession);
  702. tolua_function(tolua_S,"logTimedEventEnd",lua_pluginx_protocols_ProtocolAnalytics_logTimedEventEnd);
  703. tolua_endmodule(tolua_S);
  704. std::string typeName = typeid(cocos2d::plugin::ProtocolAnalytics).name();
  705. g_luaType[typeName] = "plugin.ProtocolAnalytics";
  706. g_typeCast["ProtocolAnalytics"] = "plugin.ProtocolAnalytics";
  707. return 1;
  708. }
  709. int lua_pluginx_protocols_ProtocolIAP_onPayResult(lua_State* tolua_S)
  710. {
  711. int argc = 0;
  712. cocos2d::plugin::ProtocolIAP* cobj = nullptr;
  713. bool ok = true;
  714. #if COCOS2D_DEBUG >= 1
  715. tolua_Error tolua_err;
  716. #endif
  717. #if COCOS2D_DEBUG >= 1
  718. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolIAP",0,&tolua_err)) goto tolua_lerror;
  719. #endif
  720. cobj = (cocos2d::plugin::ProtocolIAP*)tolua_tousertype(tolua_S,1,0);
  721. #if COCOS2D_DEBUG >= 1
  722. if (!cobj)
  723. {
  724. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolIAP_onPayResult'", nullptr);
  725. return 0;
  726. }
  727. #endif
  728. argc = lua_gettop(tolua_S)-1;
  729. if (argc == 2)
  730. {
  731. cocos2d::plugin::PayResultCode arg0;
  732. const char* arg1;
  733. ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "plugin.ProtocolIAP:onPayResult");
  734. std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "plugin.ProtocolIAP:onPayResult"); arg1 = arg1_tmp.c_str();
  735. if(!ok)
  736. {
  737. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolIAP_onPayResult'", nullptr);
  738. return 0;
  739. }
  740. cobj->onPayResult(arg0, arg1);
  741. return 0;
  742. }
  743. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolIAP:onPayResult",argc, 2);
  744. return 0;
  745. #if COCOS2D_DEBUG >= 1
  746. tolua_lerror:
  747. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolIAP_onPayResult'.",&tolua_err);
  748. #endif
  749. return 0;
  750. }
  751. int lua_pluginx_protocols_ProtocolIAP_configDeveloperInfo(lua_State* tolua_S)
  752. {
  753. int argc = 0;
  754. cocos2d::plugin::ProtocolIAP* cobj = nullptr;
  755. bool ok = true;
  756. #if COCOS2D_DEBUG >= 1
  757. tolua_Error tolua_err;
  758. #endif
  759. #if COCOS2D_DEBUG >= 1
  760. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolIAP",0,&tolua_err)) goto tolua_lerror;
  761. #endif
  762. cobj = (cocos2d::plugin::ProtocolIAP*)tolua_tousertype(tolua_S,1,0);
  763. #if COCOS2D_DEBUG >= 1
  764. if (!cobj)
  765. {
  766. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolIAP_configDeveloperInfo'", nullptr);
  767. return 0;
  768. }
  769. #endif
  770. argc = lua_gettop(tolua_S)-1;
  771. if (argc == 1)
  772. {
  773. cocos2d::plugin::TIAPDeveloperInfo arg0;
  774. ok &= pluginx::luaval_to_TIAPDeveloperInfo(tolua_S, 2, &arg0);
  775. if(!ok)
  776. {
  777. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolIAP_configDeveloperInfo'", nullptr);
  778. return 0;
  779. }
  780. cobj->configDeveloperInfo(arg0);
  781. return 0;
  782. }
  783. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolIAP:configDeveloperInfo",argc, 1);
  784. return 0;
  785. #if COCOS2D_DEBUG >= 1
  786. tolua_lerror:
  787. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolIAP_configDeveloperInfo'.",&tolua_err);
  788. #endif
  789. return 0;
  790. }
  791. static int lua_pluginx_protocols_ProtocolIAP_finalize(lua_State* tolua_S)
  792. {
  793. printf("luabindings: finalizing LUA object (ProtocolIAP)");
  794. return 0;
  795. }
  796. int lua_register_pluginx_protocols_ProtocolIAP(lua_State* tolua_S)
  797. {
  798. tolua_usertype(tolua_S,"plugin.ProtocolIAP");
  799. tolua_cclass(tolua_S,"ProtocolIAP","plugin.ProtocolIAP","plugin.PluginProtocol",nullptr);
  800. tolua_beginmodule(tolua_S,"ProtocolIAP");
  801. tolua_function(tolua_S,"onPayResult",lua_pluginx_protocols_ProtocolIAP_onPayResult);
  802. tolua_function(tolua_S,"configDeveloperInfo",lua_pluginx_protocols_ProtocolIAP_configDeveloperInfo);
  803. tolua_endmodule(tolua_S);
  804. std::string typeName = typeid(cocos2d::plugin::ProtocolIAP).name();
  805. g_luaType[typeName] = "plugin.ProtocolIAP";
  806. g_typeCast["ProtocolIAP"] = "plugin.ProtocolIAP";
  807. return 1;
  808. }
  809. int lua_pluginx_protocols_ProtocolAds_showAds(lua_State* tolua_S)
  810. {
  811. int argc = 0;
  812. cocos2d::plugin::ProtocolAds* cobj = nullptr;
  813. bool ok = true;
  814. #if COCOS2D_DEBUG >= 1
  815. tolua_Error tolua_err;
  816. #endif
  817. #if COCOS2D_DEBUG >= 1
  818. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAds",0,&tolua_err)) goto tolua_lerror;
  819. #endif
  820. cobj = (cocos2d::plugin::ProtocolAds*)tolua_tousertype(tolua_S,1,0);
  821. #if COCOS2D_DEBUG >= 1
  822. if (!cobj)
  823. {
  824. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAds_showAds'", nullptr);
  825. return 0;
  826. }
  827. #endif
  828. argc = lua_gettop(tolua_S)-1;
  829. if (argc == 1)
  830. {
  831. cocos2d::plugin::TAdsInfo arg0;
  832. ok &= pluginx::luaval_to_TAdsInfo(tolua_S, 2, &arg0);
  833. if(!ok)
  834. {
  835. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_showAds'", nullptr);
  836. return 0;
  837. }
  838. cobj->showAds(arg0);
  839. return 0;
  840. }
  841. if (argc == 2)
  842. {
  843. cocos2d::plugin::TAdsInfo arg0;
  844. cocos2d::plugin::ProtocolAds::AdsPos arg1;
  845. ok &= pluginx::luaval_to_TAdsInfo(tolua_S, 2, &arg0);
  846. ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "plugin.ProtocolAds:showAds");
  847. if(!ok)
  848. {
  849. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_showAds'", nullptr);
  850. return 0;
  851. }
  852. cobj->showAds(arg0, arg1);
  853. return 0;
  854. }
  855. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAds:showAds",argc, 1);
  856. return 0;
  857. #if COCOS2D_DEBUG >= 1
  858. tolua_lerror:
  859. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAds_showAds'.",&tolua_err);
  860. #endif
  861. return 0;
  862. }
  863. int lua_pluginx_protocols_ProtocolAds_hideAds(lua_State* tolua_S)
  864. {
  865. int argc = 0;
  866. cocos2d::plugin::ProtocolAds* cobj = nullptr;
  867. bool ok = true;
  868. #if COCOS2D_DEBUG >= 1
  869. tolua_Error tolua_err;
  870. #endif
  871. #if COCOS2D_DEBUG >= 1
  872. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAds",0,&tolua_err)) goto tolua_lerror;
  873. #endif
  874. cobj = (cocos2d::plugin::ProtocolAds*)tolua_tousertype(tolua_S,1,0);
  875. #if COCOS2D_DEBUG >= 1
  876. if (!cobj)
  877. {
  878. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAds_hideAds'", nullptr);
  879. return 0;
  880. }
  881. #endif
  882. argc = lua_gettop(tolua_S)-1;
  883. if (argc == 1)
  884. {
  885. cocos2d::plugin::TAdsInfo arg0;
  886. ok &= pluginx::luaval_to_TAdsInfo(tolua_S, 2, &arg0);
  887. if(!ok)
  888. {
  889. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_hideAds'", nullptr);
  890. return 0;
  891. }
  892. cobj->hideAds(arg0);
  893. return 0;
  894. }
  895. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAds:hideAds",argc, 1);
  896. return 0;
  897. #if COCOS2D_DEBUG >= 1
  898. tolua_lerror:
  899. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAds_hideAds'.",&tolua_err);
  900. #endif
  901. return 0;
  902. }
  903. int lua_pluginx_protocols_ProtocolAds_queryPoints(lua_State* tolua_S)
  904. {
  905. int argc = 0;
  906. cocos2d::plugin::ProtocolAds* cobj = nullptr;
  907. bool ok = true;
  908. #if COCOS2D_DEBUG >= 1
  909. tolua_Error tolua_err;
  910. #endif
  911. #if COCOS2D_DEBUG >= 1
  912. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAds",0,&tolua_err)) goto tolua_lerror;
  913. #endif
  914. cobj = (cocos2d::plugin::ProtocolAds*)tolua_tousertype(tolua_S,1,0);
  915. #if COCOS2D_DEBUG >= 1
  916. if (!cobj)
  917. {
  918. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAds_queryPoints'", nullptr);
  919. return 0;
  920. }
  921. #endif
  922. argc = lua_gettop(tolua_S)-1;
  923. if (argc == 0)
  924. {
  925. if(!ok)
  926. {
  927. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_queryPoints'", nullptr);
  928. return 0;
  929. }
  930. cobj->queryPoints();
  931. return 0;
  932. }
  933. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAds:queryPoints",argc, 0);
  934. return 0;
  935. #if COCOS2D_DEBUG >= 1
  936. tolua_lerror:
  937. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAds_queryPoints'.",&tolua_err);
  938. #endif
  939. return 0;
  940. }
  941. int lua_pluginx_protocols_ProtocolAds_spendPoints(lua_State* tolua_S)
  942. {
  943. int argc = 0;
  944. cocos2d::plugin::ProtocolAds* cobj = nullptr;
  945. bool ok = true;
  946. #if COCOS2D_DEBUG >= 1
  947. tolua_Error tolua_err;
  948. #endif
  949. #if COCOS2D_DEBUG >= 1
  950. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAds",0,&tolua_err)) goto tolua_lerror;
  951. #endif
  952. cobj = (cocos2d::plugin::ProtocolAds*)tolua_tousertype(tolua_S,1,0);
  953. #if COCOS2D_DEBUG >= 1
  954. if (!cobj)
  955. {
  956. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAds_spendPoints'", nullptr);
  957. return 0;
  958. }
  959. #endif
  960. argc = lua_gettop(tolua_S)-1;
  961. if (argc == 1)
  962. {
  963. int arg0;
  964. ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "plugin.ProtocolAds:spendPoints");
  965. if(!ok)
  966. {
  967. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_spendPoints'", nullptr);
  968. return 0;
  969. }
  970. cobj->spendPoints(arg0);
  971. return 0;
  972. }
  973. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAds:spendPoints",argc, 1);
  974. return 0;
  975. #if COCOS2D_DEBUG >= 1
  976. tolua_lerror:
  977. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAds_spendPoints'.",&tolua_err);
  978. #endif
  979. return 0;
  980. }
  981. int lua_pluginx_protocols_ProtocolAds_configDeveloperInfo(lua_State* tolua_S)
  982. {
  983. int argc = 0;
  984. cocos2d::plugin::ProtocolAds* cobj = nullptr;
  985. bool ok = true;
  986. #if COCOS2D_DEBUG >= 1
  987. tolua_Error tolua_err;
  988. #endif
  989. #if COCOS2D_DEBUG >= 1
  990. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolAds",0,&tolua_err)) goto tolua_lerror;
  991. #endif
  992. cobj = (cocos2d::plugin::ProtocolAds*)tolua_tousertype(tolua_S,1,0);
  993. #if COCOS2D_DEBUG >= 1
  994. if (!cobj)
  995. {
  996. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolAds_configDeveloperInfo'", nullptr);
  997. return 0;
  998. }
  999. #endif
  1000. argc = lua_gettop(tolua_S)-1;
  1001. if (argc == 1)
  1002. {
  1003. cocos2d::plugin::TAdsDeveloperInfo arg0;
  1004. ok &= pluginx::luaval_to_TAdsDeveloperInfo(tolua_S, 2, &arg0);
  1005. if(!ok)
  1006. {
  1007. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolAds_configDeveloperInfo'", nullptr);
  1008. return 0;
  1009. }
  1010. cobj->configDeveloperInfo(arg0);
  1011. return 0;
  1012. }
  1013. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolAds:configDeveloperInfo",argc, 1);
  1014. return 0;
  1015. #if COCOS2D_DEBUG >= 1
  1016. tolua_lerror:
  1017. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolAds_configDeveloperInfo'.",&tolua_err);
  1018. #endif
  1019. return 0;
  1020. }
  1021. static int lua_pluginx_protocols_ProtocolAds_finalize(lua_State* tolua_S)
  1022. {
  1023. printf("luabindings: finalizing LUA object (ProtocolAds)");
  1024. return 0;
  1025. }
  1026. int lua_register_pluginx_protocols_ProtocolAds(lua_State* tolua_S)
  1027. {
  1028. tolua_usertype(tolua_S,"plugin.ProtocolAds");
  1029. tolua_cclass(tolua_S,"ProtocolAds","plugin.ProtocolAds","plugin.PluginProtocol",nullptr);
  1030. tolua_beginmodule(tolua_S,"ProtocolAds");
  1031. tolua_function(tolua_S,"showAds",lua_pluginx_protocols_ProtocolAds_showAds);
  1032. tolua_function(tolua_S,"hideAds",lua_pluginx_protocols_ProtocolAds_hideAds);
  1033. tolua_function(tolua_S,"queryPoints",lua_pluginx_protocols_ProtocolAds_queryPoints);
  1034. tolua_function(tolua_S,"spendPoints",lua_pluginx_protocols_ProtocolAds_spendPoints);
  1035. tolua_function(tolua_S,"configDeveloperInfo",lua_pluginx_protocols_ProtocolAds_configDeveloperInfo);
  1036. tolua_endmodule(tolua_S);
  1037. std::string typeName = typeid(cocos2d::plugin::ProtocolAds).name();
  1038. g_luaType[typeName] = "plugin.ProtocolAds";
  1039. g_typeCast["ProtocolAds"] = "plugin.ProtocolAds";
  1040. return 1;
  1041. }
  1042. int lua_pluginx_protocols_ProtocolShare_onShareResult(lua_State* tolua_S)
  1043. {
  1044. int argc = 0;
  1045. cocos2d::plugin::ProtocolShare* cobj = nullptr;
  1046. bool ok = true;
  1047. #if COCOS2D_DEBUG >= 1
  1048. tolua_Error tolua_err;
  1049. #endif
  1050. #if COCOS2D_DEBUG >= 1
  1051. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolShare",0,&tolua_err)) goto tolua_lerror;
  1052. #endif
  1053. cobj = (cocos2d::plugin::ProtocolShare*)tolua_tousertype(tolua_S,1,0);
  1054. #if COCOS2D_DEBUG >= 1
  1055. if (!cobj)
  1056. {
  1057. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolShare_onShareResult'", nullptr);
  1058. return 0;
  1059. }
  1060. #endif
  1061. argc = lua_gettop(tolua_S)-1;
  1062. if (argc == 2)
  1063. {
  1064. cocos2d::plugin::ShareResultCode arg0;
  1065. const char* arg1;
  1066. ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "plugin.ProtocolShare:onShareResult");
  1067. std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "plugin.ProtocolShare:onShareResult"); arg1 = arg1_tmp.c_str();
  1068. if(!ok)
  1069. {
  1070. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolShare_onShareResult'", nullptr);
  1071. return 0;
  1072. }
  1073. cobj->onShareResult(arg0, arg1);
  1074. return 0;
  1075. }
  1076. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolShare:onShareResult",argc, 2);
  1077. return 0;
  1078. #if COCOS2D_DEBUG >= 1
  1079. tolua_lerror:
  1080. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolShare_onShareResult'.",&tolua_err);
  1081. #endif
  1082. return 0;
  1083. }
  1084. int lua_pluginx_protocols_ProtocolShare_configDeveloperInfo(lua_State* tolua_S)
  1085. {
  1086. int argc = 0;
  1087. cocos2d::plugin::ProtocolShare* cobj = nullptr;
  1088. bool ok = true;
  1089. #if COCOS2D_DEBUG >= 1
  1090. tolua_Error tolua_err;
  1091. #endif
  1092. #if COCOS2D_DEBUG >= 1
  1093. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolShare",0,&tolua_err)) goto tolua_lerror;
  1094. #endif
  1095. cobj = (cocos2d::plugin::ProtocolShare*)tolua_tousertype(tolua_S,1,0);
  1096. #if COCOS2D_DEBUG >= 1
  1097. if (!cobj)
  1098. {
  1099. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolShare_configDeveloperInfo'", nullptr);
  1100. return 0;
  1101. }
  1102. #endif
  1103. argc = lua_gettop(tolua_S)-1;
  1104. if (argc == 1)
  1105. {
  1106. cocos2d::plugin::TShareDeveloperInfo arg0;
  1107. ok &= pluginx::luaval_to_TShareDeveloperInfo(tolua_S, 2, &arg0);
  1108. if(!ok)
  1109. {
  1110. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolShare_configDeveloperInfo'", nullptr);
  1111. return 0;
  1112. }
  1113. cobj->configDeveloperInfo(arg0);
  1114. return 0;
  1115. }
  1116. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolShare:configDeveloperInfo",argc, 1);
  1117. return 0;
  1118. #if COCOS2D_DEBUG >= 1
  1119. tolua_lerror:
  1120. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolShare_configDeveloperInfo'.",&tolua_err);
  1121. #endif
  1122. return 0;
  1123. }
  1124. static int lua_pluginx_protocols_ProtocolShare_finalize(lua_State* tolua_S)
  1125. {
  1126. printf("luabindings: finalizing LUA object (ProtocolShare)");
  1127. return 0;
  1128. }
  1129. int lua_register_pluginx_protocols_ProtocolShare(lua_State* tolua_S)
  1130. {
  1131. tolua_usertype(tolua_S,"plugin.ProtocolShare");
  1132. tolua_cclass(tolua_S,"ProtocolShare","plugin.ProtocolShare","plugin.PluginProtocol",nullptr);
  1133. tolua_beginmodule(tolua_S,"ProtocolShare");
  1134. tolua_function(tolua_S,"onShareResult",lua_pluginx_protocols_ProtocolShare_onShareResult);
  1135. tolua_function(tolua_S,"configDeveloperInfo",lua_pluginx_protocols_ProtocolShare_configDeveloperInfo);
  1136. tolua_endmodule(tolua_S);
  1137. std::string typeName = typeid(cocos2d::plugin::ProtocolShare).name();
  1138. g_luaType[typeName] = "plugin.ProtocolShare";
  1139. g_typeCast["ProtocolShare"] = "plugin.ProtocolShare";
  1140. return 1;
  1141. }
  1142. int lua_pluginx_protocols_ProtocolSocial_showLeaderboard(lua_State* tolua_S)
  1143. {
  1144. int argc = 0;
  1145. cocos2d::plugin::ProtocolSocial* cobj = nullptr;
  1146. bool ok = true;
  1147. #if COCOS2D_DEBUG >= 1
  1148. tolua_Error tolua_err;
  1149. #endif
  1150. #if COCOS2D_DEBUG >= 1
  1151. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolSocial",0,&tolua_err)) goto tolua_lerror;
  1152. #endif
  1153. cobj = (cocos2d::plugin::ProtocolSocial*)tolua_tousertype(tolua_S,1,0);
  1154. #if COCOS2D_DEBUG >= 1
  1155. if (!cobj)
  1156. {
  1157. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolSocial_showLeaderboard'", nullptr);
  1158. return 0;
  1159. }
  1160. #endif
  1161. argc = lua_gettop(tolua_S)-1;
  1162. if (argc == 1)
  1163. {
  1164. const char* arg0;
  1165. std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "plugin.ProtocolSocial:showLeaderboard"); arg0 = arg0_tmp.c_str();
  1166. if(!ok)
  1167. {
  1168. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolSocial_showLeaderboard'", nullptr);
  1169. return 0;
  1170. }
  1171. cobj->showLeaderboard(arg0);
  1172. return 0;
  1173. }
  1174. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolSocial:showLeaderboard",argc, 1);
  1175. return 0;
  1176. #if COCOS2D_DEBUG >= 1
  1177. tolua_lerror:
  1178. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolSocial_showLeaderboard'.",&tolua_err);
  1179. #endif
  1180. return 0;
  1181. }
  1182. int lua_pluginx_protocols_ProtocolSocial_showAchievements(lua_State* tolua_S)
  1183. {
  1184. int argc = 0;
  1185. cocos2d::plugin::ProtocolSocial* cobj = nullptr;
  1186. bool ok = true;
  1187. #if COCOS2D_DEBUG >= 1
  1188. tolua_Error tolua_err;
  1189. #endif
  1190. #if COCOS2D_DEBUG >= 1
  1191. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolSocial",0,&tolua_err)) goto tolua_lerror;
  1192. #endif
  1193. cobj = (cocos2d::plugin::ProtocolSocial*)tolua_tousertype(tolua_S,1,0);
  1194. #if COCOS2D_DEBUG >= 1
  1195. if (!cobj)
  1196. {
  1197. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolSocial_showAchievements'", nullptr);
  1198. return 0;
  1199. }
  1200. #endif
  1201. argc = lua_gettop(tolua_S)-1;
  1202. if (argc == 0)
  1203. {
  1204. if(!ok)
  1205. {
  1206. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolSocial_showAchievements'", nullptr);
  1207. return 0;
  1208. }
  1209. cobj->showAchievements();
  1210. return 0;
  1211. }
  1212. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolSocial:showAchievements",argc, 0);
  1213. return 0;
  1214. #if COCOS2D_DEBUG >= 1
  1215. tolua_lerror:
  1216. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolSocial_showAchievements'.",&tolua_err);
  1217. #endif
  1218. return 0;
  1219. }
  1220. int lua_pluginx_protocols_ProtocolSocial_configDeveloperInfo(lua_State* tolua_S)
  1221. {
  1222. int argc = 0;
  1223. cocos2d::plugin::ProtocolSocial* cobj = nullptr;
  1224. bool ok = true;
  1225. #if COCOS2D_DEBUG >= 1
  1226. tolua_Error tolua_err;
  1227. #endif
  1228. #if COCOS2D_DEBUG >= 1
  1229. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolSocial",0,&tolua_err)) goto tolua_lerror;
  1230. #endif
  1231. cobj = (cocos2d::plugin::ProtocolSocial*)tolua_tousertype(tolua_S,1,0);
  1232. #if COCOS2D_DEBUG >= 1
  1233. if (!cobj)
  1234. {
  1235. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolSocial_configDeveloperInfo'", nullptr);
  1236. return 0;
  1237. }
  1238. #endif
  1239. argc = lua_gettop(tolua_S)-1;
  1240. if (argc == 1)
  1241. {
  1242. cocos2d::plugin::TSocialDeveloperInfo arg0;
  1243. ok &= pluginx::luaval_to_TSocialDeveloperInfo(tolua_S, 2, &arg0);
  1244. if(!ok)
  1245. {
  1246. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolSocial_configDeveloperInfo'", nullptr);
  1247. return 0;
  1248. }
  1249. cobj->configDeveloperInfo(arg0);
  1250. return 0;
  1251. }
  1252. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolSocial:configDeveloperInfo",argc, 1);
  1253. return 0;
  1254. #if COCOS2D_DEBUG >= 1
  1255. tolua_lerror:
  1256. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolSocial_configDeveloperInfo'.",&tolua_err);
  1257. #endif
  1258. return 0;
  1259. }
  1260. static int lua_pluginx_protocols_ProtocolSocial_finalize(lua_State* tolua_S)
  1261. {
  1262. printf("luabindings: finalizing LUA object (ProtocolSocial)");
  1263. return 0;
  1264. }
  1265. int lua_register_pluginx_protocols_ProtocolSocial(lua_State* tolua_S)
  1266. {
  1267. tolua_usertype(tolua_S,"plugin.ProtocolSocial");
  1268. tolua_cclass(tolua_S,"ProtocolSocial","plugin.ProtocolSocial","plugin.PluginProtocol",nullptr);
  1269. tolua_beginmodule(tolua_S,"ProtocolSocial");
  1270. tolua_function(tolua_S,"showLeaderboard",lua_pluginx_protocols_ProtocolSocial_showLeaderboard);
  1271. tolua_function(tolua_S,"showAchievements",lua_pluginx_protocols_ProtocolSocial_showAchievements);
  1272. tolua_function(tolua_S,"configDeveloperInfo",lua_pluginx_protocols_ProtocolSocial_configDeveloperInfo);
  1273. tolua_endmodule(tolua_S);
  1274. std::string typeName = typeid(cocos2d::plugin::ProtocolSocial).name();
  1275. g_luaType[typeName] = "plugin.ProtocolSocial";
  1276. g_typeCast["ProtocolSocial"] = "plugin.ProtocolSocial";
  1277. return 1;
  1278. }
  1279. int lua_pluginx_protocols_ProtocolUser_configDeveloperInfo(lua_State* tolua_S)
  1280. {
  1281. int argc = 0;
  1282. cocos2d::plugin::ProtocolUser* cobj = nullptr;
  1283. bool ok = true;
  1284. #if COCOS2D_DEBUG >= 1
  1285. tolua_Error tolua_err;
  1286. #endif
  1287. #if COCOS2D_DEBUG >= 1
  1288. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolUser",0,&tolua_err)) goto tolua_lerror;
  1289. #endif
  1290. cobj = (cocos2d::plugin::ProtocolUser*)tolua_tousertype(tolua_S,1,0);
  1291. #if COCOS2D_DEBUG >= 1
  1292. if (!cobj)
  1293. {
  1294. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolUser_configDeveloperInfo'", nullptr);
  1295. return 0;
  1296. }
  1297. #endif
  1298. argc = lua_gettop(tolua_S)-1;
  1299. if (argc == 1)
  1300. {
  1301. cocos2d::plugin::TUserDeveloperInfo arg0;
  1302. ok &= pluginx::luaval_to_TUserDeveloperInfo(tolua_S, 2, &arg0);
  1303. if(!ok)
  1304. {
  1305. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolUser_configDeveloperInfo'", nullptr);
  1306. return 0;
  1307. }
  1308. cobj->configDeveloperInfo(arg0);
  1309. return 0;
  1310. }
  1311. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolUser:configDeveloperInfo",argc, 1);
  1312. return 0;
  1313. #if COCOS2D_DEBUG >= 1
  1314. tolua_lerror:
  1315. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolUser_configDeveloperInfo'.",&tolua_err);
  1316. #endif
  1317. return 0;
  1318. }
  1319. int lua_pluginx_protocols_ProtocolUser_isLoggedIn(lua_State* tolua_S)
  1320. {
  1321. int argc = 0;
  1322. cocos2d::plugin::ProtocolUser* cobj = nullptr;
  1323. bool ok = true;
  1324. #if COCOS2D_DEBUG >= 1
  1325. tolua_Error tolua_err;
  1326. #endif
  1327. #if COCOS2D_DEBUG >= 1
  1328. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolUser",0,&tolua_err)) goto tolua_lerror;
  1329. #endif
  1330. cobj = (cocos2d::plugin::ProtocolUser*)tolua_tousertype(tolua_S,1,0);
  1331. #if COCOS2D_DEBUG >= 1
  1332. if (!cobj)
  1333. {
  1334. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolUser_isLoggedIn'", nullptr);
  1335. return 0;
  1336. }
  1337. #endif
  1338. argc = lua_gettop(tolua_S)-1;
  1339. if (argc == 0)
  1340. {
  1341. if(!ok)
  1342. {
  1343. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolUser_isLoggedIn'", nullptr);
  1344. return 0;
  1345. }
  1346. bool ret = cobj->isLoggedIn();
  1347. tolua_pushboolean(tolua_S,(bool)ret);
  1348. return 1;
  1349. }
  1350. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolUser:isLoggedIn",argc, 0);
  1351. return 0;
  1352. #if COCOS2D_DEBUG >= 1
  1353. tolua_lerror:
  1354. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolUser_isLoggedIn'.",&tolua_err);
  1355. #endif
  1356. return 0;
  1357. }
  1358. int lua_pluginx_protocols_ProtocolUser_getSessionID(lua_State* tolua_S)
  1359. {
  1360. int argc = 0;
  1361. cocos2d::plugin::ProtocolUser* cobj = nullptr;
  1362. bool ok = true;
  1363. #if COCOS2D_DEBUG >= 1
  1364. tolua_Error tolua_err;
  1365. #endif
  1366. #if COCOS2D_DEBUG >= 1
  1367. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolUser",0,&tolua_err)) goto tolua_lerror;
  1368. #endif
  1369. cobj = (cocos2d::plugin::ProtocolUser*)tolua_tousertype(tolua_S,1,0);
  1370. #if COCOS2D_DEBUG >= 1
  1371. if (!cobj)
  1372. {
  1373. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolUser_getSessionID'", nullptr);
  1374. return 0;
  1375. }
  1376. #endif
  1377. argc = lua_gettop(tolua_S)-1;
  1378. if (argc == 0)
  1379. {
  1380. if(!ok)
  1381. {
  1382. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolUser_getSessionID'", nullptr);
  1383. return 0;
  1384. }
  1385. std::string ret = cobj->getSessionID();
  1386. tolua_pushcppstring(tolua_S,ret);
  1387. return 1;
  1388. }
  1389. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolUser:getSessionID",argc, 0);
  1390. return 0;
  1391. #if COCOS2D_DEBUG >= 1
  1392. tolua_lerror:
  1393. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolUser_getSessionID'.",&tolua_err);
  1394. #endif
  1395. return 0;
  1396. }
  1397. int lua_pluginx_protocols_ProtocolUser_getAccessToken(lua_State* tolua_S)
  1398. {
  1399. int argc = 0;
  1400. cocos2d::plugin::ProtocolUser* cobj = nullptr;
  1401. bool ok = true;
  1402. #if COCOS2D_DEBUG >= 1
  1403. tolua_Error tolua_err;
  1404. #endif
  1405. #if COCOS2D_DEBUG >= 1
  1406. if (!tolua_isusertype(tolua_S,1,"plugin.ProtocolUser",0,&tolua_err)) goto tolua_lerror;
  1407. #endif
  1408. cobj = (cocos2d::plugin::ProtocolUser*)tolua_tousertype(tolua_S,1,0);
  1409. #if COCOS2D_DEBUG >= 1
  1410. if (!cobj)
  1411. {
  1412. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_ProtocolUser_getAccessToken'", nullptr);
  1413. return 0;
  1414. }
  1415. #endif
  1416. argc = lua_gettop(tolua_S)-1;
  1417. if (argc == 0)
  1418. {
  1419. if(!ok)
  1420. {
  1421. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_ProtocolUser_getAccessToken'", nullptr);
  1422. return 0;
  1423. }
  1424. std::string ret = cobj->getAccessToken();
  1425. tolua_pushcppstring(tolua_S,ret);
  1426. return 1;
  1427. }
  1428. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.ProtocolUser:getAccessToken",argc, 0);
  1429. return 0;
  1430. #if COCOS2D_DEBUG >= 1
  1431. tolua_lerror:
  1432. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_ProtocolUser_getAccessToken'.",&tolua_err);
  1433. #endif
  1434. return 0;
  1435. }
  1436. static int lua_pluginx_protocols_ProtocolUser_finalize(lua_State* tolua_S)
  1437. {
  1438. printf("luabindings: finalizing LUA object (ProtocolUser)");
  1439. return 0;
  1440. }
  1441. int lua_register_pluginx_protocols_ProtocolUser(lua_State* tolua_S)
  1442. {
  1443. tolua_usertype(tolua_S,"plugin.ProtocolUser");
  1444. tolua_cclass(tolua_S,"ProtocolUser","plugin.ProtocolUser","plugin.PluginProtocol",nullptr);
  1445. tolua_beginmodule(tolua_S,"ProtocolUser");
  1446. tolua_function(tolua_S,"configDeveloperInfo",lua_pluginx_protocols_ProtocolUser_configDeveloperInfo);
  1447. tolua_function(tolua_S,"isLoggedIn",lua_pluginx_protocols_ProtocolUser_isLoggedIn);
  1448. tolua_function(tolua_S,"getSessionID",lua_pluginx_protocols_ProtocolUser_getSessionID);
  1449. tolua_function(tolua_S,"getAccessToken",lua_pluginx_protocols_ProtocolUser_getAccessToken);
  1450. tolua_endmodule(tolua_S);
  1451. std::string typeName = typeid(cocos2d::plugin::ProtocolUser).name();
  1452. g_luaType[typeName] = "plugin.ProtocolUser";
  1453. g_typeCast["ProtocolUser"] = "plugin.ProtocolUser";
  1454. return 1;
  1455. }
  1456. int lua_pluginx_protocols_AgentManager_getSocialPlugin(lua_State* tolua_S)
  1457. {
  1458. int argc = 0;
  1459. cocos2d::plugin::AgentManager* cobj = nullptr;
  1460. bool ok = true;
  1461. #if COCOS2D_DEBUG >= 1
  1462. tolua_Error tolua_err;
  1463. #endif
  1464. #if COCOS2D_DEBUG >= 1
  1465. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1466. #endif
  1467. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1468. #if COCOS2D_DEBUG >= 1
  1469. if (!cobj)
  1470. {
  1471. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getSocialPlugin'", nullptr);
  1472. return 0;
  1473. }
  1474. #endif
  1475. argc = lua_gettop(tolua_S)-1;
  1476. if (argc == 0)
  1477. {
  1478. if(!ok)
  1479. {
  1480. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getSocialPlugin'", nullptr);
  1481. return 0;
  1482. }
  1483. cocos2d::plugin::ProtocolSocial* ret = cobj->getSocialPlugin();
  1484. object_to_luaval<cocos2d::plugin::ProtocolSocial>(tolua_S, "plugin.ProtocolSocial",(cocos2d::plugin::ProtocolSocial*)ret);
  1485. return 1;
  1486. }
  1487. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getSocialPlugin",argc, 0);
  1488. return 0;
  1489. #if COCOS2D_DEBUG >= 1
  1490. tolua_lerror:
  1491. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getSocialPlugin'.",&tolua_err);
  1492. #endif
  1493. return 0;
  1494. }
  1495. int lua_pluginx_protocols_AgentManager_getAdsPlugin(lua_State* tolua_S)
  1496. {
  1497. int argc = 0;
  1498. cocos2d::plugin::AgentManager* cobj = nullptr;
  1499. bool ok = true;
  1500. #if COCOS2D_DEBUG >= 1
  1501. tolua_Error tolua_err;
  1502. #endif
  1503. #if COCOS2D_DEBUG >= 1
  1504. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1505. #endif
  1506. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1507. #if COCOS2D_DEBUG >= 1
  1508. if (!cobj)
  1509. {
  1510. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getAdsPlugin'", nullptr);
  1511. return 0;
  1512. }
  1513. #endif
  1514. argc = lua_gettop(tolua_S)-1;
  1515. if (argc == 0)
  1516. {
  1517. if(!ok)
  1518. {
  1519. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getAdsPlugin'", nullptr);
  1520. return 0;
  1521. }
  1522. cocos2d::plugin::ProtocolAds* ret = cobj->getAdsPlugin();
  1523. object_to_luaval<cocos2d::plugin::ProtocolAds>(tolua_S, "plugin.ProtocolAds",(cocos2d::plugin::ProtocolAds*)ret);
  1524. return 1;
  1525. }
  1526. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getAdsPlugin",argc, 0);
  1527. return 0;
  1528. #if COCOS2D_DEBUG >= 1
  1529. tolua_lerror:
  1530. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getAdsPlugin'.",&tolua_err);
  1531. #endif
  1532. return 0;
  1533. }
  1534. int lua_pluginx_protocols_AgentManager_purge(lua_State* tolua_S)
  1535. {
  1536. int argc = 0;
  1537. cocos2d::plugin::AgentManager* cobj = nullptr;
  1538. bool ok = true;
  1539. #if COCOS2D_DEBUG >= 1
  1540. tolua_Error tolua_err;
  1541. #endif
  1542. #if COCOS2D_DEBUG >= 1
  1543. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1544. #endif
  1545. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1546. #if COCOS2D_DEBUG >= 1
  1547. if (!cobj)
  1548. {
  1549. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_purge'", nullptr);
  1550. return 0;
  1551. }
  1552. #endif
  1553. argc = lua_gettop(tolua_S)-1;
  1554. if (argc == 0)
  1555. {
  1556. if(!ok)
  1557. {
  1558. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_purge'", nullptr);
  1559. return 0;
  1560. }
  1561. cobj->purge();
  1562. return 0;
  1563. }
  1564. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:purge",argc, 0);
  1565. return 0;
  1566. #if COCOS2D_DEBUG >= 1
  1567. tolua_lerror:
  1568. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_purge'.",&tolua_err);
  1569. #endif
  1570. return 0;
  1571. }
  1572. int lua_pluginx_protocols_AgentManager_getUserPlugin(lua_State* tolua_S)
  1573. {
  1574. int argc = 0;
  1575. cocos2d::plugin::AgentManager* cobj = nullptr;
  1576. bool ok = true;
  1577. #if COCOS2D_DEBUG >= 1
  1578. tolua_Error tolua_err;
  1579. #endif
  1580. #if COCOS2D_DEBUG >= 1
  1581. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1582. #endif
  1583. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1584. #if COCOS2D_DEBUG >= 1
  1585. if (!cobj)
  1586. {
  1587. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getUserPlugin'", nullptr);
  1588. return 0;
  1589. }
  1590. #endif
  1591. argc = lua_gettop(tolua_S)-1;
  1592. if (argc == 0)
  1593. {
  1594. if(!ok)
  1595. {
  1596. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getUserPlugin'", nullptr);
  1597. return 0;
  1598. }
  1599. cocos2d::plugin::ProtocolUser* ret = cobj->getUserPlugin();
  1600. object_to_luaval<cocos2d::plugin::ProtocolUser>(tolua_S, "plugin.ProtocolUser",(cocos2d::plugin::ProtocolUser*)ret);
  1601. return 1;
  1602. }
  1603. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getUserPlugin",argc, 0);
  1604. return 0;
  1605. #if COCOS2D_DEBUG >= 1
  1606. tolua_lerror:
  1607. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getUserPlugin'.",&tolua_err);
  1608. #endif
  1609. return 0;
  1610. }
  1611. int lua_pluginx_protocols_AgentManager_getIAPPlugin(lua_State* tolua_S)
  1612. {
  1613. int argc = 0;
  1614. cocos2d::plugin::AgentManager* cobj = nullptr;
  1615. bool ok = true;
  1616. #if COCOS2D_DEBUG >= 1
  1617. tolua_Error tolua_err;
  1618. #endif
  1619. #if COCOS2D_DEBUG >= 1
  1620. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1621. #endif
  1622. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1623. #if COCOS2D_DEBUG >= 1
  1624. if (!cobj)
  1625. {
  1626. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getIAPPlugin'", nullptr);
  1627. return 0;
  1628. }
  1629. #endif
  1630. argc = lua_gettop(tolua_S)-1;
  1631. if (argc == 0)
  1632. {
  1633. if(!ok)
  1634. {
  1635. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getIAPPlugin'", nullptr);
  1636. return 0;
  1637. }
  1638. cocos2d::plugin::ProtocolIAP* ret = cobj->getIAPPlugin();
  1639. object_to_luaval<cocos2d::plugin::ProtocolIAP>(tolua_S, "plugin.ProtocolIAP",(cocos2d::plugin::ProtocolIAP*)ret);
  1640. return 1;
  1641. }
  1642. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getIAPPlugin",argc, 0);
  1643. return 0;
  1644. #if COCOS2D_DEBUG >= 1
  1645. tolua_lerror:
  1646. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getIAPPlugin'.",&tolua_err);
  1647. #endif
  1648. return 0;
  1649. }
  1650. int lua_pluginx_protocols_AgentManager_getSharePlugin(lua_State* tolua_S)
  1651. {
  1652. int argc = 0;
  1653. cocos2d::plugin::AgentManager* cobj = nullptr;
  1654. bool ok = true;
  1655. #if COCOS2D_DEBUG >= 1
  1656. tolua_Error tolua_err;
  1657. #endif
  1658. #if COCOS2D_DEBUG >= 1
  1659. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1660. #endif
  1661. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1662. #if COCOS2D_DEBUG >= 1
  1663. if (!cobj)
  1664. {
  1665. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getSharePlugin'", nullptr);
  1666. return 0;
  1667. }
  1668. #endif
  1669. argc = lua_gettop(tolua_S)-1;
  1670. if (argc == 0)
  1671. {
  1672. if(!ok)
  1673. {
  1674. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getSharePlugin'", nullptr);
  1675. return 0;
  1676. }
  1677. cocos2d::plugin::ProtocolShare* ret = cobj->getSharePlugin();
  1678. object_to_luaval<cocos2d::plugin::ProtocolShare>(tolua_S, "plugin.ProtocolShare",(cocos2d::plugin::ProtocolShare*)ret);
  1679. return 1;
  1680. }
  1681. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getSharePlugin",argc, 0);
  1682. return 0;
  1683. #if COCOS2D_DEBUG >= 1
  1684. tolua_lerror:
  1685. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getSharePlugin'.",&tolua_err);
  1686. #endif
  1687. return 0;
  1688. }
  1689. int lua_pluginx_protocols_AgentManager_getAnalyticsPlugin(lua_State* tolua_S)
  1690. {
  1691. int argc = 0;
  1692. cocos2d::plugin::AgentManager* cobj = nullptr;
  1693. bool ok = true;
  1694. #if COCOS2D_DEBUG >= 1
  1695. tolua_Error tolua_err;
  1696. #endif
  1697. #if COCOS2D_DEBUG >= 1
  1698. if (!tolua_isusertype(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1699. #endif
  1700. cobj = (cocos2d::plugin::AgentManager*)tolua_tousertype(tolua_S,1,0);
  1701. #if COCOS2D_DEBUG >= 1
  1702. if (!cobj)
  1703. {
  1704. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_AgentManager_getAnalyticsPlugin'", nullptr);
  1705. return 0;
  1706. }
  1707. #endif
  1708. argc = lua_gettop(tolua_S)-1;
  1709. if (argc == 0)
  1710. {
  1711. if(!ok)
  1712. {
  1713. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getAnalyticsPlugin'", nullptr);
  1714. return 0;
  1715. }
  1716. cocos2d::plugin::ProtocolAnalytics* ret = cobj->getAnalyticsPlugin();
  1717. object_to_luaval<cocos2d::plugin::ProtocolAnalytics>(tolua_S, "plugin.ProtocolAnalytics",(cocos2d::plugin::ProtocolAnalytics*)ret);
  1718. return 1;
  1719. }
  1720. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.AgentManager:getAnalyticsPlugin",argc, 0);
  1721. return 0;
  1722. #if COCOS2D_DEBUG >= 1
  1723. tolua_lerror:
  1724. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getAnalyticsPlugin'.",&tolua_err);
  1725. #endif
  1726. return 0;
  1727. }
  1728. int lua_pluginx_protocols_AgentManager_destroyInstance(lua_State* tolua_S)
  1729. {
  1730. int argc = 0;
  1731. bool ok = true;
  1732. #if COCOS2D_DEBUG >= 1
  1733. tolua_Error tolua_err;
  1734. #endif
  1735. #if COCOS2D_DEBUG >= 1
  1736. if (!tolua_isusertable(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1737. #endif
  1738. argc = lua_gettop(tolua_S) - 1;
  1739. if (argc == 0)
  1740. {
  1741. if(!ok)
  1742. {
  1743. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_destroyInstance'", nullptr);
  1744. return 0;
  1745. }
  1746. cocos2d::plugin::AgentManager::destroyInstance();
  1747. return 0;
  1748. }
  1749. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "plugin.AgentManager:destroyInstance",argc, 0);
  1750. return 0;
  1751. #if COCOS2D_DEBUG >= 1
  1752. tolua_lerror:
  1753. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_destroyInstance'.",&tolua_err);
  1754. #endif
  1755. return 0;
  1756. }
  1757. int lua_pluginx_protocols_AgentManager_getInstance(lua_State* tolua_S)
  1758. {
  1759. int argc = 0;
  1760. bool ok = true;
  1761. #if COCOS2D_DEBUG >= 1
  1762. tolua_Error tolua_err;
  1763. #endif
  1764. #if COCOS2D_DEBUG >= 1
  1765. if (!tolua_isusertable(tolua_S,1,"plugin.AgentManager",0,&tolua_err)) goto tolua_lerror;
  1766. #endif
  1767. argc = lua_gettop(tolua_S) - 1;
  1768. if (argc == 0)
  1769. {
  1770. if(!ok)
  1771. {
  1772. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_AgentManager_getInstance'", nullptr);
  1773. return 0;
  1774. }
  1775. cocos2d::plugin::AgentManager* ret = cocos2d::plugin::AgentManager::getInstance();
  1776. object_to_luaval<cocos2d::plugin::AgentManager>(tolua_S, "plugin.AgentManager",(cocos2d::plugin::AgentManager*)ret);
  1777. return 1;
  1778. }
  1779. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "plugin.AgentManager:getInstance",argc, 0);
  1780. return 0;
  1781. #if COCOS2D_DEBUG >= 1
  1782. tolua_lerror:
  1783. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_AgentManager_getInstance'.",&tolua_err);
  1784. #endif
  1785. return 0;
  1786. }
  1787. static int lua_pluginx_protocols_AgentManager_finalize(lua_State* tolua_S)
  1788. {
  1789. printf("luabindings: finalizing LUA object (AgentManager)");
  1790. return 0;
  1791. }
  1792. int lua_register_pluginx_protocols_AgentManager(lua_State* tolua_S)
  1793. {
  1794. tolua_usertype(tolua_S,"plugin.AgentManager");
  1795. tolua_cclass(tolua_S,"AgentManager","plugin.AgentManager","",nullptr);
  1796. tolua_beginmodule(tolua_S,"AgentManager");
  1797. tolua_function(tolua_S,"getSocialPlugin",lua_pluginx_protocols_AgentManager_getSocialPlugin);
  1798. tolua_function(tolua_S,"getAdsPlugin",lua_pluginx_protocols_AgentManager_getAdsPlugin);
  1799. tolua_function(tolua_S,"purge",lua_pluginx_protocols_AgentManager_purge);
  1800. tolua_function(tolua_S,"getUserPlugin",lua_pluginx_protocols_AgentManager_getUserPlugin);
  1801. tolua_function(tolua_S,"getIAPPlugin",lua_pluginx_protocols_AgentManager_getIAPPlugin);
  1802. tolua_function(tolua_S,"getSharePlugin",lua_pluginx_protocols_AgentManager_getSharePlugin);
  1803. tolua_function(tolua_S,"getAnalyticsPlugin",lua_pluginx_protocols_AgentManager_getAnalyticsPlugin);
  1804. tolua_function(tolua_S,"destroyInstance", lua_pluginx_protocols_AgentManager_destroyInstance);
  1805. tolua_function(tolua_S,"getInstance", lua_pluginx_protocols_AgentManager_getInstance);
  1806. tolua_endmodule(tolua_S);
  1807. std::string typeName = typeid(cocos2d::plugin::AgentManager).name();
  1808. g_luaType[typeName] = "plugin.AgentManager";
  1809. g_typeCast["AgentManager"] = "plugin.AgentManager";
  1810. return 1;
  1811. }
  1812. int lua_pluginx_protocols_FacebookAgent_activateApp(lua_State* tolua_S)
  1813. {
  1814. int argc = 0;
  1815. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  1816. bool ok = true;
  1817. #if COCOS2D_DEBUG >= 1
  1818. tolua_Error tolua_err;
  1819. #endif
  1820. #if COCOS2D_DEBUG >= 1
  1821. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  1822. #endif
  1823. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  1824. #if COCOS2D_DEBUG >= 1
  1825. if (!cobj)
  1826. {
  1827. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_activateApp'", nullptr);
  1828. return 0;
  1829. }
  1830. #endif
  1831. argc = lua_gettop(tolua_S)-1;
  1832. if (argc == 0)
  1833. {
  1834. if(!ok)
  1835. {
  1836. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_activateApp'", nullptr);
  1837. return 0;
  1838. }
  1839. cobj->activateApp();
  1840. return 0;
  1841. }
  1842. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:activateApp",argc, 0);
  1843. return 0;
  1844. #if COCOS2D_DEBUG >= 1
  1845. tolua_lerror:
  1846. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_activateApp'.",&tolua_err);
  1847. #endif
  1848. return 0;
  1849. }
  1850. int lua_pluginx_protocols_FacebookAgent_getPermissionList(lua_State* tolua_S)
  1851. {
  1852. int argc = 0;
  1853. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  1854. bool ok = true;
  1855. #if COCOS2D_DEBUG >= 1
  1856. tolua_Error tolua_err;
  1857. #endif
  1858. #if COCOS2D_DEBUG >= 1
  1859. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  1860. #endif
  1861. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  1862. #if COCOS2D_DEBUG >= 1
  1863. if (!cobj)
  1864. {
  1865. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_getPermissionList'", nullptr);
  1866. return 0;
  1867. }
  1868. #endif
  1869. argc = lua_gettop(tolua_S)-1;
  1870. if (argc == 0)
  1871. {
  1872. if(!ok)
  1873. {
  1874. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_getPermissionList'", nullptr);
  1875. return 0;
  1876. }
  1877. std::string ret = cobj->getPermissionList();
  1878. tolua_pushcppstring(tolua_S,ret);
  1879. return 1;
  1880. }
  1881. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:getPermissionList",argc, 0);
  1882. return 0;
  1883. #if COCOS2D_DEBUG >= 1
  1884. tolua_lerror:
  1885. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_getPermissionList'.",&tolua_err);
  1886. #endif
  1887. return 0;
  1888. }
  1889. int lua_pluginx_protocols_FacebookAgent_getUserID(lua_State* tolua_S)
  1890. {
  1891. int argc = 0;
  1892. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  1893. bool ok = true;
  1894. #if COCOS2D_DEBUG >= 1
  1895. tolua_Error tolua_err;
  1896. #endif
  1897. #if COCOS2D_DEBUG >= 1
  1898. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  1899. #endif
  1900. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  1901. #if COCOS2D_DEBUG >= 1
  1902. if (!cobj)
  1903. {
  1904. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_getUserID'", nullptr);
  1905. return 0;
  1906. }
  1907. #endif
  1908. argc = lua_gettop(tolua_S)-1;
  1909. if (argc == 0)
  1910. {
  1911. if(!ok)
  1912. {
  1913. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_getUserID'", nullptr);
  1914. return 0;
  1915. }
  1916. std::string ret = cobj->getUserID();
  1917. tolua_pushcppstring(tolua_S,ret);
  1918. return 1;
  1919. }
  1920. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:getUserID",argc, 0);
  1921. return 0;
  1922. #if COCOS2D_DEBUG >= 1
  1923. tolua_lerror:
  1924. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_getUserID'.",&tolua_err);
  1925. #endif
  1926. return 0;
  1927. }
  1928. int lua_pluginx_protocols_FacebookAgent_logout(lua_State* tolua_S)
  1929. {
  1930. int argc = 0;
  1931. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  1932. bool ok = true;
  1933. #if COCOS2D_DEBUG >= 1
  1934. tolua_Error tolua_err;
  1935. #endif
  1936. #if COCOS2D_DEBUG >= 1
  1937. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  1938. #endif
  1939. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  1940. #if COCOS2D_DEBUG >= 1
  1941. if (!cobj)
  1942. {
  1943. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_logout'", nullptr);
  1944. return 0;
  1945. }
  1946. #endif
  1947. argc = lua_gettop(tolua_S)-1;
  1948. if (argc == 0)
  1949. {
  1950. if(!ok)
  1951. {
  1952. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_logout'", nullptr);
  1953. return 0;
  1954. }
  1955. cobj->logout();
  1956. return 0;
  1957. }
  1958. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:logout",argc, 0);
  1959. return 0;
  1960. #if COCOS2D_DEBUG >= 1
  1961. tolua_lerror:
  1962. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_logout'.",&tolua_err);
  1963. #endif
  1964. return 0;
  1965. }
  1966. int lua_pluginx_protocols_FacebookAgent_getSDKVersion(lua_State* tolua_S)
  1967. {
  1968. int argc = 0;
  1969. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  1970. bool ok = true;
  1971. #if COCOS2D_DEBUG >= 1
  1972. tolua_Error tolua_err;
  1973. #endif
  1974. #if COCOS2D_DEBUG >= 1
  1975. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  1976. #endif
  1977. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  1978. #if COCOS2D_DEBUG >= 1
  1979. if (!cobj)
  1980. {
  1981. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_getSDKVersion'", nullptr);
  1982. return 0;
  1983. }
  1984. #endif
  1985. argc = lua_gettop(tolua_S)-1;
  1986. if (argc == 0)
  1987. {
  1988. if(!ok)
  1989. {
  1990. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_getSDKVersion'", nullptr);
  1991. return 0;
  1992. }
  1993. std::string ret = cobj->getSDKVersion();
  1994. tolua_pushcppstring(tolua_S,ret);
  1995. return 1;
  1996. }
  1997. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:getSDKVersion",argc, 0);
  1998. return 0;
  1999. #if COCOS2D_DEBUG >= 1
  2000. tolua_lerror:
  2001. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_getSDKVersion'.",&tolua_err);
  2002. #endif
  2003. return 0;
  2004. }
  2005. int lua_pluginx_protocols_FacebookAgent_isLoggedIn(lua_State* tolua_S)
  2006. {
  2007. int argc = 0;
  2008. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  2009. bool ok = true;
  2010. #if COCOS2D_DEBUG >= 1
  2011. tolua_Error tolua_err;
  2012. #endif
  2013. #if COCOS2D_DEBUG >= 1
  2014. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  2015. #endif
  2016. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  2017. #if COCOS2D_DEBUG >= 1
  2018. if (!cobj)
  2019. {
  2020. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_isLoggedIn'", nullptr);
  2021. return 0;
  2022. }
  2023. #endif
  2024. argc = lua_gettop(tolua_S)-1;
  2025. if (argc == 0)
  2026. {
  2027. if(!ok)
  2028. {
  2029. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_isLoggedIn'", nullptr);
  2030. return 0;
  2031. }
  2032. bool ret = cobj->isLoggedIn();
  2033. tolua_pushboolean(tolua_S,(bool)ret);
  2034. return 1;
  2035. }
  2036. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:isLoggedIn",argc, 0);
  2037. return 0;
  2038. #if COCOS2D_DEBUG >= 1
  2039. tolua_lerror:
  2040. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_isLoggedIn'.",&tolua_err);
  2041. #endif
  2042. return 0;
  2043. }
  2044. int lua_pluginx_protocols_FacebookAgent_getAccessToken(lua_State* tolua_S)
  2045. {
  2046. int argc = 0;
  2047. cocos2d::plugin::FacebookAgent* cobj = nullptr;
  2048. bool ok = true;
  2049. #if COCOS2D_DEBUG >= 1
  2050. tolua_Error tolua_err;
  2051. #endif
  2052. #if COCOS2D_DEBUG >= 1
  2053. if (!tolua_isusertype(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  2054. #endif
  2055. cobj = (cocos2d::plugin::FacebookAgent*)tolua_tousertype(tolua_S,1,0);
  2056. #if COCOS2D_DEBUG >= 1
  2057. if (!cobj)
  2058. {
  2059. tolua_error(tolua_S,"invalid 'cobj' in function 'lua_pluginx_protocols_FacebookAgent_getAccessToken'", nullptr);
  2060. return 0;
  2061. }
  2062. #endif
  2063. argc = lua_gettop(tolua_S)-1;
  2064. if (argc == 0)
  2065. {
  2066. if(!ok)
  2067. {
  2068. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_getAccessToken'", nullptr);
  2069. return 0;
  2070. }
  2071. std::string ret = cobj->getAccessToken();
  2072. tolua_pushcppstring(tolua_S,ret);
  2073. return 1;
  2074. }
  2075. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "plugin.FacebookAgent:getAccessToken",argc, 0);
  2076. return 0;
  2077. #if COCOS2D_DEBUG >= 1
  2078. tolua_lerror:
  2079. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_getAccessToken'.",&tolua_err);
  2080. #endif
  2081. return 0;
  2082. }
  2083. int lua_pluginx_protocols_FacebookAgent_destroyInstance(lua_State* tolua_S)
  2084. {
  2085. int argc = 0;
  2086. bool ok = true;
  2087. #if COCOS2D_DEBUG >= 1
  2088. tolua_Error tolua_err;
  2089. #endif
  2090. #if COCOS2D_DEBUG >= 1
  2091. if (!tolua_isusertable(tolua_S,1,"plugin.FacebookAgent",0,&tolua_err)) goto tolua_lerror;
  2092. #endif
  2093. argc = lua_gettop(tolua_S) - 1;
  2094. if (argc == 0)
  2095. {
  2096. if(!ok)
  2097. {
  2098. tolua_error(tolua_S,"invalid arguments in function 'lua_pluginx_protocols_FacebookAgent_destroyInstance'", nullptr);
  2099. return 0;
  2100. }
  2101. cocos2d::plugin::FacebookAgent::destroyInstance();
  2102. return 0;
  2103. }
  2104. luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "plugin.FacebookAgent:destroyInstance",argc, 0);
  2105. return 0;
  2106. #if COCOS2D_DEBUG >= 1
  2107. tolua_lerror:
  2108. tolua_error(tolua_S,"#ferror in function 'lua_pluginx_protocols_FacebookAgent_destroyInstance'.",&tolua_err);
  2109. #endif
  2110. return 0;
  2111. }
  2112. static int lua_pluginx_protocols_FacebookAgent_finalize(lua_State* tolua_S)
  2113. {
  2114. printf("luabindings: finalizing LUA object (FacebookAgent)");
  2115. return 0;
  2116. }
  2117. int lua_register_pluginx_protocols_FacebookAgent(lua_State* tolua_S)
  2118. {
  2119. tolua_usertype(tolua_S,"plugin.FacebookAgent");
  2120. tolua_cclass(tolua_S,"FacebookAgent","plugin.FacebookAgent","",nullptr);
  2121. tolua_beginmodule(tolua_S,"FacebookAgent");
  2122. tolua_function(tolua_S,"activateApp",lua_pluginx_protocols_FacebookAgent_activateApp);
  2123. tolua_function(tolua_S,"getPermissionList",lua_pluginx_protocols_FacebookAgent_getPermissionList);
  2124. tolua_function(tolua_S,"getUserID",lua_pluginx_protocols_FacebookAgent_getUserID);
  2125. tolua_function(tolua_S,"logout",lua_pluginx_protocols_FacebookAgent_logout);
  2126. tolua_function(tolua_S,"getSDKVersion",lua_pluginx_protocols_FacebookAgent_getSDKVersion);
  2127. tolua_function(tolua_S,"isLoggedIn",lua_pluginx_protocols_FacebookAgent_isLoggedIn);
  2128. tolua_function(tolua_S,"getAccessToken",lua_pluginx_protocols_FacebookAgent_getAccessToken);
  2129. tolua_function(tolua_S,"destroyInstance", lua_pluginx_protocols_FacebookAgent_destroyInstance);
  2130. tolua_endmodule(tolua_S);
  2131. std::string typeName = typeid(cocos2d::plugin::FacebookAgent).name();
  2132. g_luaType[typeName] = "plugin.FacebookAgent";
  2133. g_typeCast["FacebookAgent"] = "plugin.FacebookAgent";
  2134. return 1;
  2135. }
  2136. TOLUA_API int register_all_pluginx_protocols(lua_State* tolua_S)
  2137. {
  2138. tolua_open(tolua_S);
  2139. tolua_module(tolua_S,"plugin",0);
  2140. tolua_beginmodule(tolua_S,"plugin");
  2141. lua_register_pluginx_protocols_FacebookAgent(tolua_S);
  2142. lua_register_pluginx_protocols_PluginProtocol(tolua_S);
  2143. lua_register_pluginx_protocols_ProtocolUser(tolua_S);
  2144. lua_register_pluginx_protocols_ProtocolShare(tolua_S);
  2145. lua_register_pluginx_protocols_ProtocolIAP(tolua_S);
  2146. lua_register_pluginx_protocols_AgentManager(tolua_S);
  2147. lua_register_pluginx_protocols_ProtocolSocial(tolua_S);
  2148. lua_register_pluginx_protocols_ProtocolAnalytics(tolua_S);
  2149. lua_register_pluginx_protocols_ProtocolAds(tolua_S);
  2150. lua_register_pluginx_protocols_PluginManager(tolua_S);
  2151. tolua_endmodule(tolua_S);
  2152. return 1;
  2153. }