void FacebookManager::shareByMode(TShareInfo info) { if (s_pRetListener == NULL) { s_pRetListener = new MyShareResult(); } ProtocolSocial* pShare = NULL; pShare = s_pFacebook; if (pShare) { pShare->share(info); } }
void MySocialManager::shareByMode(TShareInfo info, MyShareMode mode) { ProtocolSocial* pShare = NULL; switch(mode) { case eTwitter: pShare = s_pTwitter; break; default: break; } if (pShare) { pShare->share(info); } }
static int tolua_anysdk_ProtocolSocial_unlockAchievement(lua_State* tolua_S) { if (NULL == tolua_S) return 0; int argc = 0; ProtocolSocial* self = nullptr; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; if (!tolua_isusertype(tolua_S,1,"ccanysdk.ProtocolSocial",0,&tolua_err)) goto tolua_lerror; #endif self = static_cast<ProtocolSocial*>(tolua_tousertype(tolua_S,1,0)); #if COCOS2D_DEBUG >= 1 if (nullptr == self) { tolua_error(tolua_S,"invalid 'self' in function 'tolua_anysdk_ProtocolSocial_unlockAchievement'\n", NULL); return 0; } #endif argc = lua_gettop(tolua_S) - 1; if (1 == argc) { std::map<std::string, std::string> achievement; luaval_to_stdmap_string_key_string(tolua_S, 2, &achievement); self->unlockAchievement(achievement); return 0; } CCLOG("'unlockAchievement' function of ProtocolSocial has wrong number of arguments: %d, was expecting %d\n", argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'getIAPPlugin'.",&tolua_err); return 0; #endif }