diff --git a/android/Android.mk b/android/Android.mk index a0610112..ce9b774c 100644 --- a/android/Android.mk +++ b/android/Android.mk @@ -128,16 +128,5 @@ LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libuv.a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/$(TARGET_ARCH_ABI)/include/uv include $(PREBUILT_STATIC_LIBRARY) -#====================================== -include $(CLEAR_VARS) - -LOCAL_MODULE := PluginProtocolStatic -LOCAL_MODULE_FILENAME := libPluginProtocolStatic -LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libPluginProtocolStatic.a -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/$(TARGET_ARCH_ABI)/include/anysdk -LOCAL_EXPORT_LDLIBS += -llog -LOCAL_EXPORT_LDLIBS += -lz - -include $(PREBUILT_STATIC_LIBRARY) #====================================== #$(call import-module,android/cpufeatures) diff --git a/android/arm64-v8a/include/anysdk/AgentManager.h b/android/arm64-v8a/include/anysdk/AgentManager.h deleted file mode 100644 index 092a9eaf..00000000 --- a/android/arm64-v8a/include/anysdk/AgentManager.h +++ /dev/null @@ -1,245 +0,0 @@ -/** @file AgentManager.h - */ - - -#ifndef __CCX_AGENTMANAGER_H__ -#define __CCX_AGENTMANAGER_H__ - -#include "PluginManager.h" -#include "ProtocolIAP.h" -#include "ProtocolAnalytics.h" -#include "ProtocolShare.h" -#include "ProtocolAds.h" -#include "ProtocolSocial.h" -#include "ProtocolUser.h" -#include "ProtocolPush.h" -#include "ProtocolCrash.h" -#include "ProtocolREC.h" -#include "ProtocolCustom.h" -#include "ProtocolAdTracking.h" -#include -#include -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum { - kPluginAds = 16,/**< enum value is the type of Ads. */ - kPluginAnalytics = 1,/**< enum value is the type of Analytics. */ - kPluginIAP = 8,/**< enum value is the type of IAP. */ - kPluginShare = 2,/**< enum value is the type of Share. */ - kPluginUser = 32,/**< enum value is the type of User. */ - kPluginSocial = 4,/**< enum value is the type of Social. */ - kPluginPush = 64,/**< enum value is the type of Push. */ - kPluginCrash = 128,/**< enum value is the type of Crash. */ - kPluginCustom = 256,/**< enum value is the type of Custom. */ - kPluginREC = 512,/**< enum value is the type of REC. */ - kPluginAdTracking = 1024,/**< enum value is the type of AdTracking. */ -}Plugin_type; -/**    - *  @class  AgentManager   - */ -class AgentManager -{ -public: - virtual ~AgentManager(); - /** - @brief Get singleton of AgentManager - */ - - static AgentManager* getInstance(); - /** - @brief Destory the instance of AgentManager - */ - static void end(); - - /** - @breif the init of AgentManager - @param the appKey of anysdk - @param the appSecret of anysdk - @param the privateKey of anysdk - @param the url of oauthLoginServer - @warning Must invoke this interface before loadAllPlugins - */ - void init(std::string appKey,std::string appSecret,std::string privateKey,std::string oauthLoginServer); - - /** - @brief load the plugins - */ - CC_DEPRECATED_ATTRIBUTE void loadALLPlugin(); - /** - @brief unload the plugins - */ - CC_DEPRECATED_ATTRIBUTE void unloadALLPlugin(); - - /** - @brief load the plugins - */ - void loadAllPlugins(); - - /** - @brief unload the plugins - */ - void unloadAllPlugins(); - - /** - @brief Get Analytics plugin - @return if Analytics plugin exist ,return value is Analytics plugin. - else return value is null pointer. - */ - ProtocolAnalytics* getAnalyticsPlugin(){return _pAnalytics;}; - - /** - @brief Get User plugin - @return if User plugin exist ,return value is User plugin. - else return value is null pointer. - */ - ProtocolUser* getUserPlugin(){return _pUser;}; - - /** - @brief Get IAP plugin - @return if IAP plugin exist ,return value is IAP plugin. - else return value is null pointer. - */ - std::map* getIAPPlugin(){return &_pluginsIAPMap;}; - - /** - @brief Get Share plugin - @return if Share plugin exist ,return value is Share plugin. - else return value is null pointer. - */ - ProtocolShare* getSharePlugin(){return _pShare;}; - - /** - @brief Get Social plugin - @return if Social plugin exist ,return value is Social plugin. - else return value is null pointer. - */ - ProtocolSocial* getSocialPlugin(){return _pSocial;}; - - /** - @brief Get Ads plugin - @return if Ads plugin exist ,return value is Ads plugin. - else return value is null pointer. - */ - ProtocolAds* getAdsPlugin(){return _pAds;}; - - /** - @brief Get Push plugin - @return if Push plugin exist ,return value is Push plugin. - else return value is null pointer. - */ - ProtocolPush* getPushPlugin(){return _pPush;}; - - /** - @brief Get Crash plugin - @return if Crash plugin exist ,return value is Crash plugin. - else return value is null pointer. - */ - ProtocolCrash* getCrashPlugin(){return _pCrash;}; - - /** - @brief Get Custom plugin - @return if Crash plugin exist ,return value is Custom plugin. - else return value is null pointer. - */ - ProtocolCustom* getCustomPlugin(){return _pCustom;}; - - - /** - @brief Get REC plugin - @return if REC plugin exist ,return value is REC plugin. - else return value is null pointer. - */ - ProtocolREC* getRECPlugin(){return _pREC;}; - - /** - @brief Get AdTracking plugin - @return if AdTracking plugin exist ,return value is AdTracking plugin. - else return value is null pointer. - */ - ProtocolAdTracking* getAdTrackingPlugin(){return _pAdTracking;}; - - /** - @brief Get channel ID - @return return value is channel ID. - */ - std::string getChannelId(); - - /** - @brief Get custom param - @return return value is custom param for channel. - */ - std::string getCustomParam(); - - /** - @brief Get framework version - @return return value is the version of AnySDKFramework. - */ - std::string getFrameworkVersion(); - - /** - @Title: setIsAnaylticsEnabled - @Description: choose to open or close - @param @param enabled true or false - @return void - */ - void setIsAnaylticsEnabled(bool value){bIsAnaylticsEnabled = value;}; - /** - @Title: isAnaylticsEnabled - @Description: the status of Anayltics - @param @return true or false - @return boolean - */ - bool isAnaylticsEnabled(){return bIsAnaylticsEnabled;}; - - - void loadPlugin(const char* nodeName,int type); -protected: - void setDebugMode(bool flag); - std::string getSupportPlugin(); - void release(); - - -private: - AgentManager(void); - - // Analytics plugin - ProtocolAnalytics* _pAnalytics; - - // user plugin - ProtocolUser* _pUser; - - // IAP plugins - // ProtocolIAP* _pIAP; - std::map _pluginsIAPMap; - - // Share plugin - ProtocolShare* _pShare; - - // Social plugin - ProtocolSocial* _pSocial; - - // Ads plugin - ProtocolAds* _pAds; - - // Push plugin - ProtocolPush* _pPush; - - // Crash plugin - ProtocolCrash* _pCrash; - - // Custom plugin - ProtocolCustom* _pCustom; - - // REC plugin - ProtocolREC* _pREC; - - // AdTracking plugin - ProtocolAdTracking* _pAdTracking; - - bool bIsAnaylticsEnabled; - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_AGENTMANAGER_H__ */ diff --git a/android/arm64-v8a/include/anysdk/JSBRelation.h b/android/arm64-v8a/include/anysdk/JSBRelation.h deleted file mode 100644 index 7775b0dc..00000000 --- a/android/arm64-v8a/include/anysdk/JSBRelation.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file JSBRelation.h - */ -#ifndef __CCX_JSBRELATION_H__ -#define __CCX_JSBRELATION_H__ - -#include "PluginProtocol.h" -#include -#include -#include - -using namespace std; - -namespace anysdk { namespace framework { - -/**    - *  @class  JSBRelation   - */ -class JSBRelation -{ -public: - static string getMethodsOfPlugin(PluginProtocol* plugin); - - - - -private: -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_JSBRELATION_H__ */ diff --git a/android/arm64-v8a/include/anysdk/PluginFactory.h b/android/arm64-v8a/include/anysdk/PluginFactory.h deleted file mode 100644 index 79922c97..00000000 --- a/android/arm64-v8a/include/anysdk/PluginFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGIN_FACTORY_H__ -#define __CCX_PLUGIN_FACTORY_H__ - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginManager; -/**    - *  @class  PluginFactory   - */ -class PluginFactory -{ -public: - virtual ~PluginFactory(); - /** - @brief Get singleton of PluginFactory - */ - static PluginFactory* getInstance(); - - /** - @brief Destory the instance of PluginFactory - */ - static void purgeFactory(); - -private: - friend class PluginManager; - PluginFactory(void); - - /** - @brief create the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* createPlugin(const char* name, int pluginType); -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_FACTORY_H__ */ diff --git a/android/arm64-v8a/include/anysdk/PluginJavaData.h b/android/arm64-v8a/include/anysdk/PluginJavaData.h deleted file mode 100644 index bd37b745..00000000 --- a/android/arm64-v8a/include/anysdk/PluginJavaData.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __PLUGIN_JAVA_DATA_H__ -#define __PLUGIN_JAVA_DATA_H__ - -#include -#include - -namespace anysdk { namespace framework { - -typedef struct _PluginJavaData_ -{ - jobject jobj; - std::string jclassName; -} PluginJavaData; - -}} //namespace anysdk { namespace framework { - -#endif // __PLUGIN_JAVA_DATA_H__ diff --git a/android/arm64-v8a/include/anysdk/PluginJniHelper.h b/android/arm64-v8a/include/anysdk/PluginJniHelper.h deleted file mode 100644 index 82981907..00000000 --- a/android/arm64-v8a/include/anysdk/PluginJniHelper.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __PLUGIN_JNI_HELPER_H__ -#define __PLUGIN_JNI_HELPER_H__ - -#include -#include - -namespace anysdk {namespace framework{ - -typedef struct PluginJniMethodInfo_ -{ - JNIEnv * env; - jclass classID; - jmethodID methodID; -} PluginJniMethodInfo; - -class PluginJniHelper -{ -public: - static JavaVM* getJavaVM(); - static void setJavaVM(JavaVM *javaVM); - static JNIEnv* getEnv(); - - static bool getStaticMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static bool getMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static std::string jstring2string(jstring jstr); - static jstring newStringUTF(JNIEnv* env, const std::string& utf8Str); - - static bool setClassLoaderFrom(jobject nativeActivityInstance); - - static jmethodID loadclassMethod_methodID; - static jobject classloader; - -private: - static JavaVM *_psJavaVM; - static bool getMethodInfo_DefaultClassLoader(PluginJniMethodInfo &methodinfo, - const char *className, - const char *methodName, - const char *paramCode); -}; - -}} - -#endif // __PLUGIN_JNI_HELPER_H__ diff --git a/android/arm64-v8a/include/anysdk/PluginJniMacros.h b/android/arm64-v8a/include/anysdk/PluginJniMacros.h deleted file mode 100644 index eace0d9a..00000000 --- a/android/arm64-v8a/include/anysdk/PluginJniMacros.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef __PLUGIN_JNI_MACROS_H__ -#define __PLUGIN_JNI_MACROS_H__ - -#define return_if_fails(cond) if (!(cond)) return; -#define return_val_if_fails(cond, ret) if(!(cond)) return (ret); - -#define CALL_BASERET_JAVA_FUNC_WITH_PARAM(retType, paramCode, param, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID, param); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_BASERET_JAVA_FUNC(retType, paramCode, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_JAVA_FUNC_WITH_VALIST(retCode) \ -std::vector allParams; \ -if (NULL != param) \ -{ \ - allParams.push_back(param); \ - \ - va_list argp; \ - PluginParam* pArg = NULL; \ - va_start( argp, param ); \ - while (1) \ - { \ - pArg = va_arg(argp, PluginParam*); \ - if (pArg == NULL) \ - break; \ - \ - allParams.push_back(pArg); \ - } \ - va_end(argp); \ -} \ - \ -return call##retCode##FuncWithParam(funcName, allParams); \ - - -#define CALL_JAVA_FUNC(retType, retCode, defaultRet, jRetCode) \ -retType ret = defaultRet; \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(this); \ -if (NULL == pData) { \ - PluginUtils::outputLog(ANDROID_LOG_ERROR, "PluginProtocol", "Can't find java data for plugin : %s", this->getPluginName()); \ - return ret; \ -} \ - \ -std::string paramCode; \ -int nParamNum = params.size(); \ -if (0 == nParamNum) \ -{ \ - paramCode = "()"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName(this, funcName); \ -} else \ -{ \ - PluginParam* pRetParam = NULL; \ - bool needDel = false; \ - if (nParamNum == 1) { \ - pRetParam = params[0]; \ - } else { \ - std::map allParams; \ - for (int i = 0; i < nParamNum; i++) \ - { \ - PluginParam* pArg = params[i]; \ - if (pArg == NULL) \ - { \ - break; \ - } \ - \ - char strKey[8] = { 0 }; \ - sprintf(strKey, "Param%d", i + 1); \ - allParams[strKey] = pArg; \ - } \ - \ - pRetParam = new PluginParam(allParams); \ - needDel = true; \ - } \ - \ - switch(pRetParam->getCurrentType()) \ - { \ - case PluginParam::kParamTypeInt: \ - paramCode = "(I)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getIntValue()); \ - break; \ - case PluginParam::kParamTypeFloat: \ - paramCode = "(F)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getFloatValue()); \ - break; \ - case PluginParam::kParamTypeBool: \ - paramCode = "(Z)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getBoolValue()); \ - break; \ - case PluginParam::kParamTypeString: \ - { \ - jstring jstr = PluginJniHelper::newStringUTF(PluginUtils::getEnv(), pRetParam->getStringValue()); \ - paramCode = "(Ljava/lang/String;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jstr); \ - PluginUtils::getEnv()->DeleteLocalRef(jstr); \ - } \ - break; \ - case PluginParam::kParamTypeStringMap: \ - case PluginParam::kParamTypeMap: \ - { \ - jobject jMap = PluginUtils::getJObjFromParam(pRetParam); \ - paramCode = "(Lorg/json/JSONObject;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jMap); \ - PluginUtils::getEnv()->DeleteLocalRef(jMap); \ - } \ - break; \ - default: \ - break; \ - } \ - \ - if (needDel && pRetParam != NULL) \ - { \ - delete pRetParam; \ - pRetParam = NULL; \ - } \ -} \ -return ret; \ - - -#endif // __PLUGIN_JNI_MACROS_H__ diff --git a/android/arm64-v8a/include/anysdk/PluginManager.h b/android/arm64-v8a/include/anysdk/PluginManager.h deleted file mode 100644 index 93282ae7..00000000 --- a/android/arm64-v8a/include/anysdk/PluginManager.h +++ /dev/null @@ -1,51 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGINMANAGER_H__ -#define __CCX_PLUGINMANAGER_H__ - -#include "PluginProtocol.h" -#include "PluginFactory.h" -#include -#include - -namespace anysdk { namespace framework { - -/**    - *  @class  PluginManager   - */ -class PluginManager -{ -public: - virtual ~PluginManager(); - /** - @brief Get singleton of PluginManager - */ - static PluginManager* getInstance(); - /** - @brief Destory the instance of PluginManager - */ - static void end(); - - /** - @brief load the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* loadPlugin(const char* name, int pluginType); - /** - @brief unload the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - void unloadPlugin(const char* name, int pluginType = 0); - - -private: - PluginManager(void); - std::map _pluginsMap; -// bool _isDebug; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGINMANAGER_H__ */ diff --git a/android/arm64-v8a/include/anysdk/PluginParam.h b/android/arm64-v8a/include/anysdk/PluginParam.h deleted file mode 100644 index 1f35d4a7..00000000 --- a/android/arm64-v8a/include/anysdk/PluginParam.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file PluginParam.h - */ -#ifndef __CCX_PLUGIN_PARAM_H__ -#define __CCX_PLUGIN_PARAM_H__ - -#include -#include -/// \typedef std::map StringMap -/// typedef YString. -typedef std::map StringMap; - -namespace anysdk { namespace framework { - -class PluginProtocol; -/**    - *  @class  PluginParam   - */ -class PluginParam -{ -public: - /** - @brief the default constructor of PluginParam - */ - PluginParam(); - - virtual ~PluginParam(); - /** - @brief the constructor of PluginParam - @param the value is Integer - */ - PluginParam(int nValue); - /** - @brief the constructor of PluginParam - @param the value is float - */ - PluginParam(float fValue); - /** - @brief the constructor of PluginParam - @param the value is boolean - */ - PluginParam(bool bValue); - /** - @brief the default constructor of PluginParam - @param the value is char - */ - PluginParam(const char* strValue); - /** - @brief the default constructor of PluginParam - @param the value is StringMap - */ - PluginParam(StringMap strMapValue); - - typedef enum{ - kParamTypeNull = 0, - kParamTypeInt, - kParamTypeFloat, - kParamTypeBool, - kParamTypeString, - kParamTypeStringMap, - kParamTypeMap, - } ParamType; - /** - @brief get the ParamType of value - */ - inline ParamType getCurrentType() { - return _type; - } - /** - @brief get the int value - */ - inline int getIntValue() { - return _intValue; - } - /** - @brief get the float value - */ - inline float getFloatValue() { - return _floatValue; - } - /** - @brief get the boolean value - */ - inline bool getBoolValue() { - return _boolValue; - } - /** - @brief get the char value - */ - inline const char* getStringValue() { - return _strValue.c_str(); - } - /** - @brief get the map of value - */ - inline std::map getMapValue() { - return _mapValue; - } - /** - @brief get the StringMap value - */ - inline StringMap getStrMapValue() { - return _strMapValue; - } - -private: - friend class PluginProtocol; - /** - @brief the constructor of PluginParam - @param the map of value - */ - PluginParam(std::map mapValue); - -private: - ParamType _type; - - int _intValue; - float _floatValue; - bool _boolValue; - std::string _strValue; - std::map _mapValue; - StringMap _strMapValue; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_PARAM_H__ */ diff --git a/android/arm64-v8a/include/anysdk/PluginProtocol.h b/android/arm64-v8a/include/anysdk/PluginProtocol.h deleted file mode 100644 index 95cf706d..00000000 --- a/android/arm64-v8a/include/anysdk/PluginProtocol.h +++ /dev/null @@ -1,144 +0,0 @@ -/** @file PluginProtocol.h - */ -#ifndef __CCX_IPLUGIN_H__ -#define __CCX_IPLUGIN_H__ - -#include "PluginParam.h" -#include - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher -#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else -#define CC_DEPRECATED_ATTRIBUTE -#endif - -namespace anysdk { namespace framework { - -/** - * @class PluginProtocol - * @brief The super class for all plugins. - */ -class PluginProtocol -{ -public: - virtual ~PluginProtocol() {}; - - /** - *@brief set plugin name - *@param the name of plugin - */ - virtual void setPluginName(const char* name) = 0 ; - /** - *@brief get plugin name - *@return the name of plugin - */ - virtual const char* getPluginName() = 0 ; - - /** - *@brief get the version of plugin - *@return the version of plugin - */ - virtual std::string getPluginVersion(); - /** - *@brief get the version of sdk - *@return the version of sdk - */ - virtual std::string getSDKVersion(); - - /** - *@brief switch debug plug-in on/off - *@param the value of on/off - */ - CC_DEPRECATED_ATTRIBUTE virtual void setDebugMode(bool bDebug); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return void - */ - virtual void callFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return void - */ - virtual void callFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, std::vector params); - - /** - @brief Check function the plugin support or not - @param the name of plugin - @return if the function support ,return true - else retur false - */ - virtual bool isFunctionSupported(std::string functionName); - - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_IPLUGIN_H__ */ diff --git a/android/arm64-v8a/include/anysdk/PluginUtils.h b/android/arm64-v8a/include/anysdk/PluginUtils.h deleted file mode 100644 index 3742c161..00000000 --- a/android/arm64-v8a/include/anysdk/PluginUtils.h +++ /dev/null @@ -1,157 +0,0 @@ -#ifndef __PLUGIN_UTILS_H__ -#define __PLUGIN_UTILS_H__ - -#include "PluginJniHelper.h" -#include "PluginJavaData.h" -#include -#include -#include "PluginParam.h" -#include "PluginJniMacros.h" -#include -//#include - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginUtils -{ -public: -//cjh static void initPluginWrapper(android_app* app); - static jobject createJavaMapObject(std::map* paramMap); - static jobject createJavaListObject(std::list* paramList); - static void initJavaPlugin(PluginProtocol* pPlugin, jobject jObj, const char* className, int type); - static JNIEnv* getEnv(); - - static PluginJavaData* getPluginJavaData(PluginProtocol* pKeyObj); - static void setPluginJavaData(PluginProtocol* pKeyObj, PluginJavaData* pData, int type); - static void erasePluginJavaData(PluginProtocol* pKeyObj,int type); - static void erasePluginJavaData(std::string key); - - static PluginProtocol* getPluginPtr(std::string className); - - static jobject getJObjFromParam(PluginParam* param); - - // methods have no return value - template - static void callJavaFunctionWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - return_if_fails(paramCode != NULL && strlen(paramCode) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - t.env->CallVoidMethod(pData->jobj, t.methodID, param); - t.env->DeleteLocalRef(t.classID); - } - } - static void callJavaFunctionWithName(PluginProtocol* thiz, const char* funcName) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()V")) - { - t.env->CallVoidMethod(pData->jobj, t.methodID); - t.env->DeleteLocalRef(t.classID); - } - } - - // methods return value is string - template - static std::string callJavaStringFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - jstring strRet = (jstring)t.env->CallObjectMethod(pData->jobj, t.methodID, param); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - static std::string callJavaStringFuncWithName(PluginProtocol* thiz, const char* funcName) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()Ljava/lang/String;")) - { - jstring strRet = (jstring) t.env->CallObjectMethod(pData->jobj, t.methodID); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - - // methods return value is int - template - static int callJavaIntFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(int, paramCode, param, Int, 0) - } - static int callJavaIntFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(int, "()I", Int, 0) - } - - // methods return value is float - template - static float callJavaFloatFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(float, paramCode, param, Float, 0.0f) - } - static float callJavaFloatFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(float, "()F", Float, 0.0f); - } - - // methods return value is bool - template - static bool callJavaBoolFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(bool, paramCode, param, Boolean, false) - } - static bool callJavaBoolFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(bool, "()Z", Boolean, false) - } - - static void callJavaFunctionWithName_string_map(PluginProtocol* thiz, const char* funcName, const char* keyParam, std::map* paramMap); - - static void outputLog(int type, const char* logTag, const char* pFormat, ...); - static void output(int type, const char* logTag, const char* contents); - - static void resetLogLevel(); -private: - static std::string _logLevel; -}; - -}} // namespace anysdk { namespace framework { - -#endif //__PLUGIN_UTILS_H__ diff --git a/android/arm64-v8a/include/anysdk/ProtocolAdTracking.h b/android/arm64-v8a/include/anysdk/ProtocolAdTracking.h deleted file mode 100644 index 6fc557a2..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolAdTracking.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file ProtocolAdTracking.h - */ -#ifndef __CCX_PROTOCOL_ADTRACKING_H__ -#define __CCX_PROTOCOL_ADTRACKING_H__ - -#include "PluginProtocol.h" -#include -namespace anysdk { namespace framework { -/**    - *@class  ProtocolAdTracking - *@brief the interface of AdTracking   - */ -class ProtocolAdTracking : public PluginProtocol -{ -public: - - /** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userId user identifier - * @return void - */ - virtual void onRegister(const char* userId) = 0; - - /** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onLogin(std::map userInfo) = 0; - - /** - * - * @Title: onPay - * @Description: Call this method if you want to track pay events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onPay(std::map productInfo) = 0; - - /** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ - virtual void trackEvent(const char* eventId, std::map* paramMap = NULL) = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_ADTRACKING_H__ ----- */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolAds.h b/android/arm64-v8a/include/anysdk/ProtocolAds.h deleted file mode 100644 index 8e29987f..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolAds.h +++ /dev/null @@ -1,133 +0,0 @@ -/** @file ProtocolAds.h - */ -#ifndef __CCX_PROTOCOL_ADS_H__ -#define __CCX_PROTOCOL_ADS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TAdsDeveloperInfo -/// typedef TAdsDeveloperInfo. -typedef std::map TAdsDeveloperInfo; -/// \typedef std::map TAdsInfo -/// typedef TAdsInfo. -typedef std::map TAdsInfo; -/** @brief AdsResultCode enum, with inline docs */ -typedef enum -{ - kAdsReceived = 0, /**< enum the callback: the ad is received is at center. */ - - kAdsShown, /**< enum the callback: the advertisement dismissed. */ - kAdsDismissed, /**< enum the callback: the advertisement dismissed. */ - - kPointsSpendSucceed, /**< enum the callback: the points spend succeed. */ - kPointsSpendFailed, /**< enum the callback: the points spend failed. */ - - kNetworkError, /**< enum the callback of Network error at center. */ - kUnknownError, /**< enum the callback of Unknown error. */ - kOfferWallOnPointsChanged, /**< enum the callback of Changing the point of offerwall. */ - kRewardedVideoWithReward,/**< enum the callback of receiving the reward of rewardedvideo. */ - kInAppPurchaseFinished,/**< enum the callback of finishing IAP ad. */ - kAdsClicked,/**< enum the callback of the advertisement clicked. */ - kAdsExtension = 40000 /**< enum value is extension code . */ -} AdsResultCode; -/** @brief AdsPos enum, with inline docs */ -typedef enum { - kPosCenter = 0,/**< enum the toolbar is at center. */ - kPosTop,/**< enum the toolbar is at top. */ - kPosTopLeft,/**< enum the toolbar is at topleft. */ - kPosTopRight,/**< enum the toolbar is at topright. */ - kPosBottom,/**< enum the toolbar is at bottom. */ - kPosBottomLeft,/**< enum the toolbar is at bottomleft. */ - kPosBottomRight,/**< enum the toolbar is at bottomright. */ -} AdsPos; -/** @brief AdsType enum, with inline docs */ -typedef enum { - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL,/**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED,/**< enum value is Native advanced ads . */ -} AdsType; - -class ProtocolAds; -class AdsListener -{ -public: - /** - *@brief The advertisement request result - *@param the id of callback - *@param the information of callback - */ - virtual void onAdsResult(AdsResultCode code, const char* msg) = 0; -}; - -class ProtocolAds : public PluginProtocol -{ -public: - - - - /** - @brief show adview - @param the type of ads - @param the idx of ads - */ - virtual void showAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief Hide the adview - @param the type of ads - @param the idx of ads - */ - virtual void hideAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief preload the adview - @param the type of ads - @param the idx of ads - */ - virtual void preloadAds(AdsType adsType, int idx = 1)= 0; - - /** - *@brief Query the points of player - *@return the point - */ - virtual float queryPoints() = 0; - - /** - *@brief Spend the points. - Use this method to notify server spend points. - *@param points Need spend number of points - */ - virtual void spendPoints(int points) = 0; - - /** - @brief set the Ads listener - @param pListener The callback object for Ads result - */ - virtual void setAdsListener(AdsListener* listener) = 0; - - /** - @brief get pListener The callback object for Ads result - @return the listener - */ - virtual AdsListener* getAdsListener() = 0; - - /** - @brief Is it supportive of this type of ads - @param the type of ads - @return if it is supportive ,return true - else retur false - */ - virtual bool isAdTypeSupported(AdsType adType) = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_ADS_H__ */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolAnalytics.h b/android/arm64-v8a/include/anysdk/ProtocolAnalytics.h deleted file mode 100644 index ce3372d6..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolAnalytics.h +++ /dev/null @@ -1,107 +0,0 @@ -/** @file ProtocolAnalytics.h - */ -#ifndef __CCX_PROTOCOL_ANALYTICS_H__ -#define __CCX_PROTOCOL_ANALYTICS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map LogEventParamPair -/// typedef LogEventParamPair. -typedef std::pair< std::string, std::string > LogEventParamPair; -/// \typedef std::map LogEventParamMap -/// typedef LogEventParamMap. -typedef std::map< std::string, std::string > LogEventParamMap; -typedef enum { - ANONYMOUS,/**< enum value is anonymous typek. */ - REGISTED,/**< enum value is registed type. */ - SINA_WEIBO,/**< enum value is sineweibo type. */ - TENCENT_WEIBO,/**< enum value is tecentweibo type */ - QQ,/**< enum value is qq type */ - ND91,/**< enum value is nd91 type. */ -} AccountType; -typedef enum { - LOGIN,/**< enum value is the login operate. */ - LOGOUT,/**< enum value is the logout operate. */ - REGISTER,/**< enum value is the register operate. */ -} AccountOperate; -typedef enum { - MALE,/**< enum value is male. */ - FEMALE,/**< enum value is female. */ - UNKNOWN,/**< enum value is unknow. */ - -} AccountGender; -typedef enum { - GUIDE_LINE,/**< enum value is the guideline type.. */ - MAIN_LINE,/**< enum value is the mainline type.. */ - BRANCH_LINE,/** -#include - -namespace anysdk { namespace framework { - -class ProtocolCrash : public PluginProtocol -{ -public: - /** - * set user identifier - * - * @param userInfo - */ - virtual void setUserIdentifier(const char* identifier) = 0; - - /** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ - virtual void reportException(const char* message, const char* exception) = 0; - - /** - * customize logging - * - * @param string Custom log - */ - virtual void leaveBreadcrumb(const char* breadcrumb) = 0; - - - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_CRASH_H__ */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolCustom.h b/android/arm64-v8a/include/anysdk/ProtocolCustom.h deleted file mode 100644 index dc92558e..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolCustom.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file ProtocolCustom.h - */ -#ifndef __CCX_PROTOCOL_CUSTOM_H__ -#define __CCX_PROTOCOL_CUSTOM_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -typedef enum -{ - kCustomExtension = 80000 /**< enum value is extension code . */ -} CustomResultCode; -/**    - *@class  CustomResultListener - *@brief the interface of share callback   - */ -class CustomResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onCustomResult(CustomResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolCustom - *@brief the interface of custom   - */ -class ProtocolCustom : public PluginProtocol -{ -public: - - /** - @breif set the result listener - @param pListener The callback object for custom result - @wraning Must invoke this interface before custom - */ - virtual void setResultListener(CustomResultListener* pListener) = 0; - - virtual CustomResultListener* getCustomListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_Custom_H__ ----- */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolIAP.h b/android/arm64-v8a/include/anysdk/ProtocolIAP.h deleted file mode 100644 index 4a875b32..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolIAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file ProtocolIAP.h - */ -#ifndef __CCX_PROTOCOL_IAP_H__ -#define __CCX_PROTOCOL_IAP_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TIAPDeveloperInfo -/// typedef TIAPDeveloperInfo. -typedef std::map TIAPDeveloperInfo; -/// \typedef std::map TProductInfo -/// typedef TProductInfo. -typedef std::map TProductInfo; -/// typedef TProductsInfo. -typedef std::map AllProductsInfo; -/** @brief PayResultCode enum, with inline docs */ -typedef enum -{ - kPaySuccess = 0,/**< enum value is callback of succeeding in paying . */ - kPayFail,/**< enum value is callback of failing to pay . */ - kPayCancel,/**< enum value is callback of canceling to pay . */ - kPayNetworkError,/**< enum value is callback of network error . */ - kPayProductionInforIncomplete,/**< enum value is callback of incompleting info . */ - kPayInitSuccess,/**< enum value is callback of succeeding in initing sdk . */ - kPayInitFail,/**< enum value is callback of failing to init sdk . */ - kPayNowPaying,/**< enum value is callback of paying now . */ - kPayRechargeSuccess,/**< enum value is callback of succeeding in recharging. */ - kPayExtension = 30000 /**< enum value is extension code . */ -} PayResultCode; -/** @brief RequestResultCode enum, with inline docs */ -typedef enum -{ - kRequestSuccess = 31000,/**< enum value is callback of succeeding in paying . */ - kRequestFail/**< enum value is callback of failing to pay . */ -} RequestResultCode; -/**    - *@class  PayResultListener - *@brief the interface of pay callback   - */ -class PayResultListener -{ -public: - /**    - *@brief the interface of pay callback  - *@param the id of callback - *@param the information of callback - *@param the info of pay - */ - virtual void onPayResult(PayResultCode ret, const char* msg, TProductInfo info) = 0; - /** - *@brief the interface of request callback - *@param the id of callback - *@param the information of callback - *@param the info of request product - */ - virtual void onRequestResult(RequestResultCode ret, const char* msg, AllProductsInfo info) {} -}; -/**    - *@class  ProtocolIAP - *@brief the interface of pay    - */ - -class ProtocolIAP : public PluginProtocol -{ -public: - - /** - @brief pay for product - @param info The info of product, must contains key: - productName The name of product - productPrice The price of product(must can be parse to float) - productDesc The description of product - @warning For different plugin, the parameter should have other keys to pay. - Look at the manual of plugins. - */ - virtual void payForProduct(TProductInfo info) = 0; - /** - @brief get order id - @return the order id - */ - virtual std::string getOrderId() = 0; - - /** - @breif set the result listener - @param pListener The callback object for pay result - @wraning Must invoke this interface before payForProduct. - */ - virtual void setResultListener(PayResultListener* pListener) = 0; - - virtual PayResultListener* getPayListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - /** - @brief change the state of paying - @param the state - */ - - static void resetPayState() - { - _paying = false; - } - static bool _paying; - - - -}; - - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_IAP_H__ */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolPush.h b/android/arm64-v8a/include/anysdk/ProtocolPush.h deleted file mode 100644 index e9e2fac8..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolPush.h +++ /dev/null @@ -1,104 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PROTOCOL_PUSH_H__ -#define __CCX_PROTOCOL_PUSH_H__ - -#include "PluginProtocol.h" -#include -#include -#include -using namespace std; - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kPushReceiveMessage = 0,/**value is callback of Receiving Message . */ - kPushExtensionCode = 60000 /**< enum value is extension code . */ - - -} PushActionResultCode; -class ProtocolPush; -/**    - *@class  PushActionListener - *@brief the interface of Push callback   - */ -class PushActionListener -{ -public: - /**    - *@brief the interface of Push callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolPush* pPlugin, PushActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolPush   - */ -class ProtocolPush : public PluginProtocol -{ -public: - - - /** - *@brief start/register Push services - *@return void - */ - virtual void startPush() = 0 ; - - - /** - *@brief close Push services - *@return void - */ - virtual void closePush() = 0 ; - - - /** - *@brief set alias - *@param tags - *@return void - */ - virtual void setAlias(string alias) = 0; - - /** - *@brief del alias - *@param tags - *@return void - */ - virtual void delAlias(string alias) = 0; - - /** - *@brief set tag - *@param tags - *@return void - */ - virtual void setTags(list tags) = 0; - - /** - *@brief delete tag - *@param tags - *@return void - */ - virtual void delTags(list tags) = 0; - - /** - @brief set the result listener - @param pListener The callback object for push result - */ - virtual void setActionListener(PushActionListener* listener) = 0 ; - - /** - @brief get pListener The callback object for Push result - @return the listener - */ - virtual PushActionListener* getActionListener() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_PUSH_H__ */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolREC.h b/android/arm64-v8a/include/anysdk/ProtocolREC.h deleted file mode 100644 index b0db2c0d..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolREC.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file ProtocolREC.h - */ -#ifndef __CCX_PROTOCOL_REC_H__ -#define __CCX_PROTOCOL_REC_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { - -typedef std::map TVideoInfo; - -/** @brief RECResultCode enum, with inline docs */ -typedef enum -{ - kRECInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk . */ - kRECInitFail,/**< enum value is callback of failing to init sdk. */ - kRECStartRecording,/**< enum value is callback of starting to record. */ - kRECStopRecording,/**< enum value is callback of stoping to record. */ - kRECPauseRecording,/**< enum value is callback of pausing to record. */ - kRECResumeRecording,/**< enum value is callback of resuming to record. */ - kRECEnterSDKPage,/**< enum value is callback of entering SDK`s page. */ - kRECQuitSDKPage,/**< enum value is callback of quiting SDK`s page. */ - kRECShareSuccess,/**< enum value is callback of succeeding in sharing. */ - kRECShareFail,/**< enum value is callback of failing to share. */ - kRECExtension = 90000 /**< enum value is extension code . */ -} RECResultCode; -/**    - *@class  RECResultListener - *@brief the interface of REC callback   - */ -class RECResultListener -{ -public: - /**    - *@brief the interface of REC callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onRECResult(RECResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolREC - *@brief the interface of REC   - */ -class ProtocolREC : public PluginProtocol -{ -public: - - /** - * @Description: Start to record video - */ - virtual void startRecording() = 0; - - /** - * @Description: Stop to record video - */ - virtual void stopRecording() = 0; - - /** - * @Description: share video - * @Param info The info of share - */ - virtual void share(TVideoInfo info) = 0; - - - - /** - @breif set the result listener - @param pListener The callback object for REC result - @wraning Must invoke this interface before REC - */ - virtual void setResultListener(RECResultListener* pListener) = 0; - - virtual RECResultListener* getRECListener() = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolShare.h b/android/arm64-v8a/include/anysdk/ProtocolShare.h deleted file mode 100644 index 2215a4ff..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolShare.h +++ /dev/null @@ -1,72 +0,0 @@ -/** @file ProtocolShare.h - */ -#ifndef __CCX_PROTOCOL_SHARE_H__ -#define __CCX_PROTOCOL_SHARE_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TShareDeveloperInfo -/// typedef TShareDeveloperInfo. -typedef std::map TShareDeveloperInfo; -/// \typedef std::map TShareInfo -/// typedef TShareInfo. -typedef std::map TShareInfo; -/** @brief ShareResultCode enum, with inline docs */ -typedef enum -{ - kShareSuccess = 0,/**< enum value is callback of failing to sharing . */ - kShareFail,/**< enum value is callback of failing to share . */ - kShareCancel,/**< enum value is callback of canceling to share . */ - kShareNetworkError,/**< enum value is callback of network error . */ - kShareExtension = 10000 /**< enum value is extension code . */ -} ShareResultCode; -/**    - *@class  ShareResultListener - *@brief the interface of share callback   - */ -class ShareResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onShareResult(ShareResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolShare - *@brief the interface of share   - */ -class ProtocolShare : public PluginProtocol -{ -public: - - - - /** - @brief share information - @param info The info of share, contains key: - SharedText The text need to share - SharedImagePath The full path of image file need to share (optinal) - @warning For different plugin, the parameter should have other keys to share. - Look at the manual of plugins. */ - virtual void share(TShareInfo info) = 0; - - /** - @breif set the result listener - @param pListener The callback object for share result - @wraning Must invoke this interface before share - */ - virtual void setResultListener(ShareResultListener* pListener) = 0; - - virtual ShareResultListener* getShareListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolSocial.h b/android/arm64-v8a/include/anysdk/ProtocolSocial.h deleted file mode 100644 index 3fa5639b..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolSocial.h +++ /dev/null @@ -1,105 +0,0 @@ -/** @file ProtocolSocial.h - */ -#ifndef __CCX_PROTOCOL_SOCIAL_H__ -#define __CCX_PROTOCOL_SOCIAL_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TSocialDeveloperInfo -/// typedef TSocialDeveloperInfo. -typedef std::map TSocialDeveloperInfo; -/// \typedef std::map TAchievementInfo -/// typedef TAchievementInfo. -typedef std::map TAchievementInfo; -/** @brief SocialRetCode enum, with inline docs */ -typedef enum -{ - // code for leaderboard feature - kScoreSubmitSucceed =1,/**< enum value is callback of succeeding in submiting. */ - kScoreSubmitfail,/**< enum value is callback of failing to submit . */ - - // code for achievement feature - kAchUnlockSucceed,/**< enum value is callback of succeeding in unlocking. */ - kAchUnlockFail,/**< enum value is callback of failing to unlock. */ - - kSocialSignInSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignInFail,/**< enum value is callback of failing to login. */ - - kSocialSignOutSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignOutFail,/**< enum value is callback of failing to login. */ - kSocialGetGameFriends,/**< enum value is callback of getGameFriends. */ - kSocialExtensionCode = 20000 /**< enum value is extension code . */ - -} SocialRetCode; -/**    - *@class  SocialListener - *@brief the interface of social callback   - */ -class SocialListener -{ -public: - /**    - *@brief the interface of social callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onSocialResult(SocialRetCode code, const char* msg) = 0; -}; - -/**    - *@class  ProtocolSocial - *@brief the interface of social   - */ -class ProtocolSocial : public PluginProtocol -{ -public: - - /** - @brief user signIn - */ - virtual void signIn() = 0; - - /** - @brief user signOut - */ - virtual void signOut() = 0; - - /** - @brief submit the score - @param leaderboardID - @param the score - */ - virtual void submitScore(const char* leadboardID, long score) = 0; - /** - @brief show the id of Leaderboard page - @param leaderboardID - */ - virtual void showLeaderboard(const char* leaderboardID) = 0; - - /** - @brief methods of achievement feature - @param the info of achievement - */ - virtual void unlockAchievement(TAchievementInfo achInfo) = 0; - /** - @brief show the page of achievements - */ - virtual void showAchievements() = 0; - /** - @brief set pListener The callback object for social result - @param the listener - */ - virtual void setListener(SocialListener* listener) = 0; - /** - @brief get pListener The callback object for social result - @return the listener - */ - virtual SocialListener* getListener() = 0; -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SOCIAL_H__ ----- */ diff --git a/android/arm64-v8a/include/anysdk/ProtocolUser.h b/android/arm64-v8a/include/anysdk/ProtocolUser.h deleted file mode 100644 index 387fb9e8..00000000 --- a/android/arm64-v8a/include/anysdk/ProtocolUser.h +++ /dev/null @@ -1,135 +0,0 @@ -/** @file ProtocolUser.h - */ -#ifndef __CCX_PROTOCOL_USER_H__ -#define __CCX_PROTOCOL_USER_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TUserDeveloperInfo -/// typedef TUserDeveloperInfo. -typedef std::map TUserDeveloperInfo; -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk. */ - kInitFail,/**< enum value is callback of failing to init sdk. */ - kLoginSuccess,/**< enum value is callback of succeeding in login.*/ - kLoginNetworkError,/**< enum value is callback of network error*/ - kLoginNoNeed,/**< enum value is callback of no need login.*/ - kLoginFail,/**< enum value is callback of failing to login. */ - kLoginCancel,/**< enum value is callback of canceling to login. */ - kLogoutSuccess,/**< enum value is callback of succeeding in logout. */ - kLogoutFail,/**< enum value is callback of failing to logout. */ - kPlatformEnter,/**< enum value is callback after enter platform. */ - kPlatformBack,/**< enum value is callback after exit antiAddiction. */ - kPausePage,/**< enum value is callback after exit pause page. */ - kExitPage,/**< enum value is callback after exit exit page. */ - kAntiAddictionQuery,/**< enum value is callback after querying antiAddiction. */ - kRealNameRegister,/**< enum value is callback after registering realname. */ - kAccountSwitchSuccess,/**< enum value is callback of succeeding in switching account. */ - kAccountSwitchFail,/**< enum value is callback of failing to switch account. */ - kOpenShop,/**< enum value is callback of open the shop. */ - kAccountSwitchCancel,/**< enum value is callback of canceling to switch account. */ - kGameExitPage,/**< enum value is callback of no channel exit page. */ - kUserExtension = 50000 /**< enum value is extension code . */ - - -} UserActionResultCode; -/** @brief ToolBarPlace enum, with inline docs */ -typedef enum -{ - kToolBarTopLeft = 1,/**< enum the toolbar is at topleft. */ - kToolBarTopRight,/**< enum the toolbar is at topright. */ - kToolBarMidLeft,/**< enum the toolbar is at midleft. */ - kToolBarMidRight,/**< enum the toolbar is at midright. */ - kToolBarBottomLeft,/**< enum the toolbar is at bottomleft. */ - kToolBarBottomRight,/**< enum the toolbar is at bottomright. */ -} ToolBarPlace; - -class ProtocolUser; -/**    - *@class  UserActionListener - *@brief the interface of user callback   - */ -class UserActionListener -{ -public: - /**    - *@brief the interface of user callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolUser* pPlugin, UserActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolUser   - */ -class ProtocolUser : public PluginProtocol -{ -public: - - - /** - @brief User login - */ - virtual void login() = 0 ; - - /** - @brief User login - if the process of logining need to know the param of server_id , - you can use the function - and if you must change oauthloginserver, you can add the param of oauthLoginServer - @param server_id - @param oauthLoginServer - */ - - CC_DEPRECATED_ATTRIBUTE virtual void login(std::string server_id, std::string oauthLoginServer = "") = 0 ; - - /** - @brief User login - if the process of logining need to know the parameters , - you can use the function - @param the parameters - */ - virtual void login(std::map info) = 0 ; - - /** - @brief Check whether the user logined or not - @return If user logined, return value is true; - else return value is false. - */ - virtual bool isLogined() = 0 ; - - /** - @brief Get USER ID - @return If user logined, return value is userID; - else return value is empty string. - */ - virtual std::string getUserID() = 0 ; - /** - @brief set the result listener - @param pListener The callback object for user result - */ - virtual void setActionListener(UserActionListener* listener) = 0 ; - /** - @brief get pListener The callback object for user result - @return the listener - */ - virtual UserActionListener* getActionListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_USER_H__ */ diff --git a/android/arm64-v8a/include/anysdk/Statistics.h b/android/arm64-v8a/include/anysdk/Statistics.h deleted file mode 100644 index bb389ff0..00000000 --- a/android/arm64-v8a/include/anysdk/Statistics.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __STATISTICS_H__ -#define __STATISTICS_H__ - -#include -namespace anysdk { namespace framework { - -class Statistics -{ -public: - static void initInfo(); - static void createPlugin(std::string pluginName, int pluginType); - static void callFunction(std::string pluginName, std::string functionName); - -}; - -}} // namespace anysdk { namespace framework { - -#endif //__STATISTICS_H__ diff --git a/android/arm64-v8a/libPluginProtocolStatic.a b/android/arm64-v8a/libPluginProtocolStatic.a deleted file mode 100644 index eb15874c..00000000 Binary files a/android/arm64-v8a/libPluginProtocolStatic.a and /dev/null differ diff --git a/android/armeabi-v7a/include/anysdk/AgentManager.h b/android/armeabi-v7a/include/anysdk/AgentManager.h deleted file mode 100644 index 092a9eaf..00000000 --- a/android/armeabi-v7a/include/anysdk/AgentManager.h +++ /dev/null @@ -1,245 +0,0 @@ -/** @file AgentManager.h - */ - - -#ifndef __CCX_AGENTMANAGER_H__ -#define __CCX_AGENTMANAGER_H__ - -#include "PluginManager.h" -#include "ProtocolIAP.h" -#include "ProtocolAnalytics.h" -#include "ProtocolShare.h" -#include "ProtocolAds.h" -#include "ProtocolSocial.h" -#include "ProtocolUser.h" -#include "ProtocolPush.h" -#include "ProtocolCrash.h" -#include "ProtocolREC.h" -#include "ProtocolCustom.h" -#include "ProtocolAdTracking.h" -#include -#include -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum { - kPluginAds = 16,/**< enum value is the type of Ads. */ - kPluginAnalytics = 1,/**< enum value is the type of Analytics. */ - kPluginIAP = 8,/**< enum value is the type of IAP. */ - kPluginShare = 2,/**< enum value is the type of Share. */ - kPluginUser = 32,/**< enum value is the type of User. */ - kPluginSocial = 4,/**< enum value is the type of Social. */ - kPluginPush = 64,/**< enum value is the type of Push. */ - kPluginCrash = 128,/**< enum value is the type of Crash. */ - kPluginCustom = 256,/**< enum value is the type of Custom. */ - kPluginREC = 512,/**< enum value is the type of REC. */ - kPluginAdTracking = 1024,/**< enum value is the type of AdTracking. */ -}Plugin_type; -/**    - *  @class  AgentManager   - */ -class AgentManager -{ -public: - virtual ~AgentManager(); - /** - @brief Get singleton of AgentManager - */ - - static AgentManager* getInstance(); - /** - @brief Destory the instance of AgentManager - */ - static void end(); - - /** - @breif the init of AgentManager - @param the appKey of anysdk - @param the appSecret of anysdk - @param the privateKey of anysdk - @param the url of oauthLoginServer - @warning Must invoke this interface before loadAllPlugins - */ - void init(std::string appKey,std::string appSecret,std::string privateKey,std::string oauthLoginServer); - - /** - @brief load the plugins - */ - CC_DEPRECATED_ATTRIBUTE void loadALLPlugin(); - /** - @brief unload the plugins - */ - CC_DEPRECATED_ATTRIBUTE void unloadALLPlugin(); - - /** - @brief load the plugins - */ - void loadAllPlugins(); - - /** - @brief unload the plugins - */ - void unloadAllPlugins(); - - /** - @brief Get Analytics plugin - @return if Analytics plugin exist ,return value is Analytics plugin. - else return value is null pointer. - */ - ProtocolAnalytics* getAnalyticsPlugin(){return _pAnalytics;}; - - /** - @brief Get User plugin - @return if User plugin exist ,return value is User plugin. - else return value is null pointer. - */ - ProtocolUser* getUserPlugin(){return _pUser;}; - - /** - @brief Get IAP plugin - @return if IAP plugin exist ,return value is IAP plugin. - else return value is null pointer. - */ - std::map* getIAPPlugin(){return &_pluginsIAPMap;}; - - /** - @brief Get Share plugin - @return if Share plugin exist ,return value is Share plugin. - else return value is null pointer. - */ - ProtocolShare* getSharePlugin(){return _pShare;}; - - /** - @brief Get Social plugin - @return if Social plugin exist ,return value is Social plugin. - else return value is null pointer. - */ - ProtocolSocial* getSocialPlugin(){return _pSocial;}; - - /** - @brief Get Ads plugin - @return if Ads plugin exist ,return value is Ads plugin. - else return value is null pointer. - */ - ProtocolAds* getAdsPlugin(){return _pAds;}; - - /** - @brief Get Push plugin - @return if Push plugin exist ,return value is Push plugin. - else return value is null pointer. - */ - ProtocolPush* getPushPlugin(){return _pPush;}; - - /** - @brief Get Crash plugin - @return if Crash plugin exist ,return value is Crash plugin. - else return value is null pointer. - */ - ProtocolCrash* getCrashPlugin(){return _pCrash;}; - - /** - @brief Get Custom plugin - @return if Crash plugin exist ,return value is Custom plugin. - else return value is null pointer. - */ - ProtocolCustom* getCustomPlugin(){return _pCustom;}; - - - /** - @brief Get REC plugin - @return if REC plugin exist ,return value is REC plugin. - else return value is null pointer. - */ - ProtocolREC* getRECPlugin(){return _pREC;}; - - /** - @brief Get AdTracking plugin - @return if AdTracking plugin exist ,return value is AdTracking plugin. - else return value is null pointer. - */ - ProtocolAdTracking* getAdTrackingPlugin(){return _pAdTracking;}; - - /** - @brief Get channel ID - @return return value is channel ID. - */ - std::string getChannelId(); - - /** - @brief Get custom param - @return return value is custom param for channel. - */ - std::string getCustomParam(); - - /** - @brief Get framework version - @return return value is the version of AnySDKFramework. - */ - std::string getFrameworkVersion(); - - /** - @Title: setIsAnaylticsEnabled - @Description: choose to open or close - @param @param enabled true or false - @return void - */ - void setIsAnaylticsEnabled(bool value){bIsAnaylticsEnabled = value;}; - /** - @Title: isAnaylticsEnabled - @Description: the status of Anayltics - @param @return true or false - @return boolean - */ - bool isAnaylticsEnabled(){return bIsAnaylticsEnabled;}; - - - void loadPlugin(const char* nodeName,int type); -protected: - void setDebugMode(bool flag); - std::string getSupportPlugin(); - void release(); - - -private: - AgentManager(void); - - // Analytics plugin - ProtocolAnalytics* _pAnalytics; - - // user plugin - ProtocolUser* _pUser; - - // IAP plugins - // ProtocolIAP* _pIAP; - std::map _pluginsIAPMap; - - // Share plugin - ProtocolShare* _pShare; - - // Social plugin - ProtocolSocial* _pSocial; - - // Ads plugin - ProtocolAds* _pAds; - - // Push plugin - ProtocolPush* _pPush; - - // Crash plugin - ProtocolCrash* _pCrash; - - // Custom plugin - ProtocolCustom* _pCustom; - - // REC plugin - ProtocolREC* _pREC; - - // AdTracking plugin - ProtocolAdTracking* _pAdTracking; - - bool bIsAnaylticsEnabled; - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_AGENTMANAGER_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/JSBRelation.h b/android/armeabi-v7a/include/anysdk/JSBRelation.h deleted file mode 100644 index 7775b0dc..00000000 --- a/android/armeabi-v7a/include/anysdk/JSBRelation.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file JSBRelation.h - */ -#ifndef __CCX_JSBRELATION_H__ -#define __CCX_JSBRELATION_H__ - -#include "PluginProtocol.h" -#include -#include -#include - -using namespace std; - -namespace anysdk { namespace framework { - -/**    - *  @class  JSBRelation   - */ -class JSBRelation -{ -public: - static string getMethodsOfPlugin(PluginProtocol* plugin); - - - - -private: -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_JSBRELATION_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/PluginFactory.h b/android/armeabi-v7a/include/anysdk/PluginFactory.h deleted file mode 100644 index 79922c97..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGIN_FACTORY_H__ -#define __CCX_PLUGIN_FACTORY_H__ - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginManager; -/**    - *  @class  PluginFactory   - */ -class PluginFactory -{ -public: - virtual ~PluginFactory(); - /** - @brief Get singleton of PluginFactory - */ - static PluginFactory* getInstance(); - - /** - @brief Destory the instance of PluginFactory - */ - static void purgeFactory(); - -private: - friend class PluginManager; - PluginFactory(void); - - /** - @brief create the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* createPlugin(const char* name, int pluginType); -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_FACTORY_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/PluginJavaData.h b/android/armeabi-v7a/include/anysdk/PluginJavaData.h deleted file mode 100644 index bd37b745..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginJavaData.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __PLUGIN_JAVA_DATA_H__ -#define __PLUGIN_JAVA_DATA_H__ - -#include -#include - -namespace anysdk { namespace framework { - -typedef struct _PluginJavaData_ -{ - jobject jobj; - std::string jclassName; -} PluginJavaData; - -}} //namespace anysdk { namespace framework { - -#endif // __PLUGIN_JAVA_DATA_H__ diff --git a/android/armeabi-v7a/include/anysdk/PluginJniHelper.h b/android/armeabi-v7a/include/anysdk/PluginJniHelper.h deleted file mode 100644 index 82981907..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginJniHelper.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __PLUGIN_JNI_HELPER_H__ -#define __PLUGIN_JNI_HELPER_H__ - -#include -#include - -namespace anysdk {namespace framework{ - -typedef struct PluginJniMethodInfo_ -{ - JNIEnv * env; - jclass classID; - jmethodID methodID; -} PluginJniMethodInfo; - -class PluginJniHelper -{ -public: - static JavaVM* getJavaVM(); - static void setJavaVM(JavaVM *javaVM); - static JNIEnv* getEnv(); - - static bool getStaticMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static bool getMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static std::string jstring2string(jstring jstr); - static jstring newStringUTF(JNIEnv* env, const std::string& utf8Str); - - static bool setClassLoaderFrom(jobject nativeActivityInstance); - - static jmethodID loadclassMethod_methodID; - static jobject classloader; - -private: - static JavaVM *_psJavaVM; - static bool getMethodInfo_DefaultClassLoader(PluginJniMethodInfo &methodinfo, - const char *className, - const char *methodName, - const char *paramCode); -}; - -}} - -#endif // __PLUGIN_JNI_HELPER_H__ diff --git a/android/armeabi-v7a/include/anysdk/PluginJniMacros.h b/android/armeabi-v7a/include/anysdk/PluginJniMacros.h deleted file mode 100644 index eace0d9a..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginJniMacros.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef __PLUGIN_JNI_MACROS_H__ -#define __PLUGIN_JNI_MACROS_H__ - -#define return_if_fails(cond) if (!(cond)) return; -#define return_val_if_fails(cond, ret) if(!(cond)) return (ret); - -#define CALL_BASERET_JAVA_FUNC_WITH_PARAM(retType, paramCode, param, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID, param); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_BASERET_JAVA_FUNC(retType, paramCode, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_JAVA_FUNC_WITH_VALIST(retCode) \ -std::vector allParams; \ -if (NULL != param) \ -{ \ - allParams.push_back(param); \ - \ - va_list argp; \ - PluginParam* pArg = NULL; \ - va_start( argp, param ); \ - while (1) \ - { \ - pArg = va_arg(argp, PluginParam*); \ - if (pArg == NULL) \ - break; \ - \ - allParams.push_back(pArg); \ - } \ - va_end(argp); \ -} \ - \ -return call##retCode##FuncWithParam(funcName, allParams); \ - - -#define CALL_JAVA_FUNC(retType, retCode, defaultRet, jRetCode) \ -retType ret = defaultRet; \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(this); \ -if (NULL == pData) { \ - PluginUtils::outputLog(ANDROID_LOG_ERROR, "PluginProtocol", "Can't find java data for plugin : %s", this->getPluginName()); \ - return ret; \ -} \ - \ -std::string paramCode; \ -int nParamNum = params.size(); \ -if (0 == nParamNum) \ -{ \ - paramCode = "()"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName(this, funcName); \ -} else \ -{ \ - PluginParam* pRetParam = NULL; \ - bool needDel = false; \ - if (nParamNum == 1) { \ - pRetParam = params[0]; \ - } else { \ - std::map allParams; \ - for (int i = 0; i < nParamNum; i++) \ - { \ - PluginParam* pArg = params[i]; \ - if (pArg == NULL) \ - { \ - break; \ - } \ - \ - char strKey[8] = { 0 }; \ - sprintf(strKey, "Param%d", i + 1); \ - allParams[strKey] = pArg; \ - } \ - \ - pRetParam = new PluginParam(allParams); \ - needDel = true; \ - } \ - \ - switch(pRetParam->getCurrentType()) \ - { \ - case PluginParam::kParamTypeInt: \ - paramCode = "(I)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getIntValue()); \ - break; \ - case PluginParam::kParamTypeFloat: \ - paramCode = "(F)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getFloatValue()); \ - break; \ - case PluginParam::kParamTypeBool: \ - paramCode = "(Z)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getBoolValue()); \ - break; \ - case PluginParam::kParamTypeString: \ - { \ - jstring jstr = PluginJniHelper::newStringUTF(PluginUtils::getEnv(), pRetParam->getStringValue()); \ - paramCode = "(Ljava/lang/String;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jstr); \ - PluginUtils::getEnv()->DeleteLocalRef(jstr); \ - } \ - break; \ - case PluginParam::kParamTypeStringMap: \ - case PluginParam::kParamTypeMap: \ - { \ - jobject jMap = PluginUtils::getJObjFromParam(pRetParam); \ - paramCode = "(Lorg/json/JSONObject;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jMap); \ - PluginUtils::getEnv()->DeleteLocalRef(jMap); \ - } \ - break; \ - default: \ - break; \ - } \ - \ - if (needDel && pRetParam != NULL) \ - { \ - delete pRetParam; \ - pRetParam = NULL; \ - } \ -} \ -return ret; \ - - -#endif // __PLUGIN_JNI_MACROS_H__ diff --git a/android/armeabi-v7a/include/anysdk/PluginManager.h b/android/armeabi-v7a/include/anysdk/PluginManager.h deleted file mode 100644 index 93282ae7..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginManager.h +++ /dev/null @@ -1,51 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGINMANAGER_H__ -#define __CCX_PLUGINMANAGER_H__ - -#include "PluginProtocol.h" -#include "PluginFactory.h" -#include -#include - -namespace anysdk { namespace framework { - -/**    - *  @class  PluginManager   - */ -class PluginManager -{ -public: - virtual ~PluginManager(); - /** - @brief Get singleton of PluginManager - */ - static PluginManager* getInstance(); - /** - @brief Destory the instance of PluginManager - */ - static void end(); - - /** - @brief load the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* loadPlugin(const char* name, int pluginType); - /** - @brief unload the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - void unloadPlugin(const char* name, int pluginType = 0); - - -private: - PluginManager(void); - std::map _pluginsMap; -// bool _isDebug; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGINMANAGER_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/PluginParam.h b/android/armeabi-v7a/include/anysdk/PluginParam.h deleted file mode 100644 index 1f35d4a7..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginParam.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file PluginParam.h - */ -#ifndef __CCX_PLUGIN_PARAM_H__ -#define __CCX_PLUGIN_PARAM_H__ - -#include -#include -/// \typedef std::map StringMap -/// typedef YString. -typedef std::map StringMap; - -namespace anysdk { namespace framework { - -class PluginProtocol; -/**    - *  @class  PluginParam   - */ -class PluginParam -{ -public: - /** - @brief the default constructor of PluginParam - */ - PluginParam(); - - virtual ~PluginParam(); - /** - @brief the constructor of PluginParam - @param the value is Integer - */ - PluginParam(int nValue); - /** - @brief the constructor of PluginParam - @param the value is float - */ - PluginParam(float fValue); - /** - @brief the constructor of PluginParam - @param the value is boolean - */ - PluginParam(bool bValue); - /** - @brief the default constructor of PluginParam - @param the value is char - */ - PluginParam(const char* strValue); - /** - @brief the default constructor of PluginParam - @param the value is StringMap - */ - PluginParam(StringMap strMapValue); - - typedef enum{ - kParamTypeNull = 0, - kParamTypeInt, - kParamTypeFloat, - kParamTypeBool, - kParamTypeString, - kParamTypeStringMap, - kParamTypeMap, - } ParamType; - /** - @brief get the ParamType of value - */ - inline ParamType getCurrentType() { - return _type; - } - /** - @brief get the int value - */ - inline int getIntValue() { - return _intValue; - } - /** - @brief get the float value - */ - inline float getFloatValue() { - return _floatValue; - } - /** - @brief get the boolean value - */ - inline bool getBoolValue() { - return _boolValue; - } - /** - @brief get the char value - */ - inline const char* getStringValue() { - return _strValue.c_str(); - } - /** - @brief get the map of value - */ - inline std::map getMapValue() { - return _mapValue; - } - /** - @brief get the StringMap value - */ - inline StringMap getStrMapValue() { - return _strMapValue; - } - -private: - friend class PluginProtocol; - /** - @brief the constructor of PluginParam - @param the map of value - */ - PluginParam(std::map mapValue); - -private: - ParamType _type; - - int _intValue; - float _floatValue; - bool _boolValue; - std::string _strValue; - std::map _mapValue; - StringMap _strMapValue; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_PARAM_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/PluginProtocol.h b/android/armeabi-v7a/include/anysdk/PluginProtocol.h deleted file mode 100644 index 95cf706d..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginProtocol.h +++ /dev/null @@ -1,144 +0,0 @@ -/** @file PluginProtocol.h - */ -#ifndef __CCX_IPLUGIN_H__ -#define __CCX_IPLUGIN_H__ - -#include "PluginParam.h" -#include - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher -#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else -#define CC_DEPRECATED_ATTRIBUTE -#endif - -namespace anysdk { namespace framework { - -/** - * @class PluginProtocol - * @brief The super class for all plugins. - */ -class PluginProtocol -{ -public: - virtual ~PluginProtocol() {}; - - /** - *@brief set plugin name - *@param the name of plugin - */ - virtual void setPluginName(const char* name) = 0 ; - /** - *@brief get plugin name - *@return the name of plugin - */ - virtual const char* getPluginName() = 0 ; - - /** - *@brief get the version of plugin - *@return the version of plugin - */ - virtual std::string getPluginVersion(); - /** - *@brief get the version of sdk - *@return the version of sdk - */ - virtual std::string getSDKVersion(); - - /** - *@brief switch debug plug-in on/off - *@param the value of on/off - */ - CC_DEPRECATED_ATTRIBUTE virtual void setDebugMode(bool bDebug); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return void - */ - virtual void callFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return void - */ - virtual void callFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, std::vector params); - - /** - @brief Check function the plugin support or not - @param the name of plugin - @return if the function support ,return true - else retur false - */ - virtual bool isFunctionSupported(std::string functionName); - - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_IPLUGIN_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/PluginUtils.h b/android/armeabi-v7a/include/anysdk/PluginUtils.h deleted file mode 100644 index 3742c161..00000000 --- a/android/armeabi-v7a/include/anysdk/PluginUtils.h +++ /dev/null @@ -1,157 +0,0 @@ -#ifndef __PLUGIN_UTILS_H__ -#define __PLUGIN_UTILS_H__ - -#include "PluginJniHelper.h" -#include "PluginJavaData.h" -#include -#include -#include "PluginParam.h" -#include "PluginJniMacros.h" -#include -//#include - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginUtils -{ -public: -//cjh static void initPluginWrapper(android_app* app); - static jobject createJavaMapObject(std::map* paramMap); - static jobject createJavaListObject(std::list* paramList); - static void initJavaPlugin(PluginProtocol* pPlugin, jobject jObj, const char* className, int type); - static JNIEnv* getEnv(); - - static PluginJavaData* getPluginJavaData(PluginProtocol* pKeyObj); - static void setPluginJavaData(PluginProtocol* pKeyObj, PluginJavaData* pData, int type); - static void erasePluginJavaData(PluginProtocol* pKeyObj,int type); - static void erasePluginJavaData(std::string key); - - static PluginProtocol* getPluginPtr(std::string className); - - static jobject getJObjFromParam(PluginParam* param); - - // methods have no return value - template - static void callJavaFunctionWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - return_if_fails(paramCode != NULL && strlen(paramCode) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - t.env->CallVoidMethod(pData->jobj, t.methodID, param); - t.env->DeleteLocalRef(t.classID); - } - } - static void callJavaFunctionWithName(PluginProtocol* thiz, const char* funcName) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()V")) - { - t.env->CallVoidMethod(pData->jobj, t.methodID); - t.env->DeleteLocalRef(t.classID); - } - } - - // methods return value is string - template - static std::string callJavaStringFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - jstring strRet = (jstring)t.env->CallObjectMethod(pData->jobj, t.methodID, param); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - static std::string callJavaStringFuncWithName(PluginProtocol* thiz, const char* funcName) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()Ljava/lang/String;")) - { - jstring strRet = (jstring) t.env->CallObjectMethod(pData->jobj, t.methodID); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - - // methods return value is int - template - static int callJavaIntFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(int, paramCode, param, Int, 0) - } - static int callJavaIntFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(int, "()I", Int, 0) - } - - // methods return value is float - template - static float callJavaFloatFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(float, paramCode, param, Float, 0.0f) - } - static float callJavaFloatFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(float, "()F", Float, 0.0f); - } - - // methods return value is bool - template - static bool callJavaBoolFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(bool, paramCode, param, Boolean, false) - } - static bool callJavaBoolFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(bool, "()Z", Boolean, false) - } - - static void callJavaFunctionWithName_string_map(PluginProtocol* thiz, const char* funcName, const char* keyParam, std::map* paramMap); - - static void outputLog(int type, const char* logTag, const char* pFormat, ...); - static void output(int type, const char* logTag, const char* contents); - - static void resetLogLevel(); -private: - static std::string _logLevel; -}; - -}} // namespace anysdk { namespace framework { - -#endif //__PLUGIN_UTILS_H__ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolAdTracking.h b/android/armeabi-v7a/include/anysdk/ProtocolAdTracking.h deleted file mode 100644 index 6fc557a2..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolAdTracking.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file ProtocolAdTracking.h - */ -#ifndef __CCX_PROTOCOL_ADTRACKING_H__ -#define __CCX_PROTOCOL_ADTRACKING_H__ - -#include "PluginProtocol.h" -#include -namespace anysdk { namespace framework { -/**    - *@class  ProtocolAdTracking - *@brief the interface of AdTracking   - */ -class ProtocolAdTracking : public PluginProtocol -{ -public: - - /** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userId user identifier - * @return void - */ - virtual void onRegister(const char* userId) = 0; - - /** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onLogin(std::map userInfo) = 0; - - /** - * - * @Title: onPay - * @Description: Call this method if you want to track pay events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onPay(std::map productInfo) = 0; - - /** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ - virtual void trackEvent(const char* eventId, std::map* paramMap = NULL) = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_ADTRACKING_H__ ----- */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolAds.h b/android/armeabi-v7a/include/anysdk/ProtocolAds.h deleted file mode 100644 index 8e29987f..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolAds.h +++ /dev/null @@ -1,133 +0,0 @@ -/** @file ProtocolAds.h - */ -#ifndef __CCX_PROTOCOL_ADS_H__ -#define __CCX_PROTOCOL_ADS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TAdsDeveloperInfo -/// typedef TAdsDeveloperInfo. -typedef std::map TAdsDeveloperInfo; -/// \typedef std::map TAdsInfo -/// typedef TAdsInfo. -typedef std::map TAdsInfo; -/** @brief AdsResultCode enum, with inline docs */ -typedef enum -{ - kAdsReceived = 0, /**< enum the callback: the ad is received is at center. */ - - kAdsShown, /**< enum the callback: the advertisement dismissed. */ - kAdsDismissed, /**< enum the callback: the advertisement dismissed. */ - - kPointsSpendSucceed, /**< enum the callback: the points spend succeed. */ - kPointsSpendFailed, /**< enum the callback: the points spend failed. */ - - kNetworkError, /**< enum the callback of Network error at center. */ - kUnknownError, /**< enum the callback of Unknown error. */ - kOfferWallOnPointsChanged, /**< enum the callback of Changing the point of offerwall. */ - kRewardedVideoWithReward,/**< enum the callback of receiving the reward of rewardedvideo. */ - kInAppPurchaseFinished,/**< enum the callback of finishing IAP ad. */ - kAdsClicked,/**< enum the callback of the advertisement clicked. */ - kAdsExtension = 40000 /**< enum value is extension code . */ -} AdsResultCode; -/** @brief AdsPos enum, with inline docs */ -typedef enum { - kPosCenter = 0,/**< enum the toolbar is at center. */ - kPosTop,/**< enum the toolbar is at top. */ - kPosTopLeft,/**< enum the toolbar is at topleft. */ - kPosTopRight,/**< enum the toolbar is at topright. */ - kPosBottom,/**< enum the toolbar is at bottom. */ - kPosBottomLeft,/**< enum the toolbar is at bottomleft. */ - kPosBottomRight,/**< enum the toolbar is at bottomright. */ -} AdsPos; -/** @brief AdsType enum, with inline docs */ -typedef enum { - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL,/**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED,/**< enum value is Native advanced ads . */ -} AdsType; - -class ProtocolAds; -class AdsListener -{ -public: - /** - *@brief The advertisement request result - *@param the id of callback - *@param the information of callback - */ - virtual void onAdsResult(AdsResultCode code, const char* msg) = 0; -}; - -class ProtocolAds : public PluginProtocol -{ -public: - - - - /** - @brief show adview - @param the type of ads - @param the idx of ads - */ - virtual void showAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief Hide the adview - @param the type of ads - @param the idx of ads - */ - virtual void hideAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief preload the adview - @param the type of ads - @param the idx of ads - */ - virtual void preloadAds(AdsType adsType, int idx = 1)= 0; - - /** - *@brief Query the points of player - *@return the point - */ - virtual float queryPoints() = 0; - - /** - *@brief Spend the points. - Use this method to notify server spend points. - *@param points Need spend number of points - */ - virtual void spendPoints(int points) = 0; - - /** - @brief set the Ads listener - @param pListener The callback object for Ads result - */ - virtual void setAdsListener(AdsListener* listener) = 0; - - /** - @brief get pListener The callback object for Ads result - @return the listener - */ - virtual AdsListener* getAdsListener() = 0; - - /** - @brief Is it supportive of this type of ads - @param the type of ads - @return if it is supportive ,return true - else retur false - */ - virtual bool isAdTypeSupported(AdsType adType) = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_ADS_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolAnalytics.h b/android/armeabi-v7a/include/anysdk/ProtocolAnalytics.h deleted file mode 100644 index ce3372d6..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolAnalytics.h +++ /dev/null @@ -1,107 +0,0 @@ -/** @file ProtocolAnalytics.h - */ -#ifndef __CCX_PROTOCOL_ANALYTICS_H__ -#define __CCX_PROTOCOL_ANALYTICS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map LogEventParamPair -/// typedef LogEventParamPair. -typedef std::pair< std::string, std::string > LogEventParamPair; -/// \typedef std::map LogEventParamMap -/// typedef LogEventParamMap. -typedef std::map< std::string, std::string > LogEventParamMap; -typedef enum { - ANONYMOUS,/**< enum value is anonymous typek. */ - REGISTED,/**< enum value is registed type. */ - SINA_WEIBO,/**< enum value is sineweibo type. */ - TENCENT_WEIBO,/**< enum value is tecentweibo type */ - QQ,/**< enum value is qq type */ - ND91,/**< enum value is nd91 type. */ -} AccountType; -typedef enum { - LOGIN,/**< enum value is the login operate. */ - LOGOUT,/**< enum value is the logout operate. */ - REGISTER,/**< enum value is the register operate. */ -} AccountOperate; -typedef enum { - MALE,/**< enum value is male. */ - FEMALE,/**< enum value is female. */ - UNKNOWN,/**< enum value is unknow. */ - -} AccountGender; -typedef enum { - GUIDE_LINE,/**< enum value is the guideline type.. */ - MAIN_LINE,/**< enum value is the mainline type.. */ - BRANCH_LINE,/** -#include - -namespace anysdk { namespace framework { - -class ProtocolCrash : public PluginProtocol -{ -public: - /** - * set user identifier - * - * @param userInfo - */ - virtual void setUserIdentifier(const char* identifier) = 0; - - /** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ - virtual void reportException(const char* message, const char* exception) = 0; - - /** - * customize logging - * - * @param string Custom log - */ - virtual void leaveBreadcrumb(const char* breadcrumb) = 0; - - - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_CRASH_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolCustom.h b/android/armeabi-v7a/include/anysdk/ProtocolCustom.h deleted file mode 100644 index dc92558e..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolCustom.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file ProtocolCustom.h - */ -#ifndef __CCX_PROTOCOL_CUSTOM_H__ -#define __CCX_PROTOCOL_CUSTOM_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -typedef enum -{ - kCustomExtension = 80000 /**< enum value is extension code . */ -} CustomResultCode; -/**    - *@class  CustomResultListener - *@brief the interface of share callback   - */ -class CustomResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onCustomResult(CustomResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolCustom - *@brief the interface of custom   - */ -class ProtocolCustom : public PluginProtocol -{ -public: - - /** - @breif set the result listener - @param pListener The callback object for custom result - @wraning Must invoke this interface before custom - */ - virtual void setResultListener(CustomResultListener* pListener) = 0; - - virtual CustomResultListener* getCustomListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_Custom_H__ ----- */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolIAP.h b/android/armeabi-v7a/include/anysdk/ProtocolIAP.h deleted file mode 100644 index 4a875b32..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolIAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file ProtocolIAP.h - */ -#ifndef __CCX_PROTOCOL_IAP_H__ -#define __CCX_PROTOCOL_IAP_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TIAPDeveloperInfo -/// typedef TIAPDeveloperInfo. -typedef std::map TIAPDeveloperInfo; -/// \typedef std::map TProductInfo -/// typedef TProductInfo. -typedef std::map TProductInfo; -/// typedef TProductsInfo. -typedef std::map AllProductsInfo; -/** @brief PayResultCode enum, with inline docs */ -typedef enum -{ - kPaySuccess = 0,/**< enum value is callback of succeeding in paying . */ - kPayFail,/**< enum value is callback of failing to pay . */ - kPayCancel,/**< enum value is callback of canceling to pay . */ - kPayNetworkError,/**< enum value is callback of network error . */ - kPayProductionInforIncomplete,/**< enum value is callback of incompleting info . */ - kPayInitSuccess,/**< enum value is callback of succeeding in initing sdk . */ - kPayInitFail,/**< enum value is callback of failing to init sdk . */ - kPayNowPaying,/**< enum value is callback of paying now . */ - kPayRechargeSuccess,/**< enum value is callback of succeeding in recharging. */ - kPayExtension = 30000 /**< enum value is extension code . */ -} PayResultCode; -/** @brief RequestResultCode enum, with inline docs */ -typedef enum -{ - kRequestSuccess = 31000,/**< enum value is callback of succeeding in paying . */ - kRequestFail/**< enum value is callback of failing to pay . */ -} RequestResultCode; -/**    - *@class  PayResultListener - *@brief the interface of pay callback   - */ -class PayResultListener -{ -public: - /**    - *@brief the interface of pay callback  - *@param the id of callback - *@param the information of callback - *@param the info of pay - */ - virtual void onPayResult(PayResultCode ret, const char* msg, TProductInfo info) = 0; - /** - *@brief the interface of request callback - *@param the id of callback - *@param the information of callback - *@param the info of request product - */ - virtual void onRequestResult(RequestResultCode ret, const char* msg, AllProductsInfo info) {} -}; -/**    - *@class  ProtocolIAP - *@brief the interface of pay    - */ - -class ProtocolIAP : public PluginProtocol -{ -public: - - /** - @brief pay for product - @param info The info of product, must contains key: - productName The name of product - productPrice The price of product(must can be parse to float) - productDesc The description of product - @warning For different plugin, the parameter should have other keys to pay. - Look at the manual of plugins. - */ - virtual void payForProduct(TProductInfo info) = 0; - /** - @brief get order id - @return the order id - */ - virtual std::string getOrderId() = 0; - - /** - @breif set the result listener - @param pListener The callback object for pay result - @wraning Must invoke this interface before payForProduct. - */ - virtual void setResultListener(PayResultListener* pListener) = 0; - - virtual PayResultListener* getPayListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - /** - @brief change the state of paying - @param the state - */ - - static void resetPayState() - { - _paying = false; - } - static bool _paying; - - - -}; - - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_IAP_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolPush.h b/android/armeabi-v7a/include/anysdk/ProtocolPush.h deleted file mode 100644 index e9e2fac8..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolPush.h +++ /dev/null @@ -1,104 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PROTOCOL_PUSH_H__ -#define __CCX_PROTOCOL_PUSH_H__ - -#include "PluginProtocol.h" -#include -#include -#include -using namespace std; - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kPushReceiveMessage = 0,/**value is callback of Receiving Message . */ - kPushExtensionCode = 60000 /**< enum value is extension code . */ - - -} PushActionResultCode; -class ProtocolPush; -/**    - *@class  PushActionListener - *@brief the interface of Push callback   - */ -class PushActionListener -{ -public: - /**    - *@brief the interface of Push callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolPush* pPlugin, PushActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolPush   - */ -class ProtocolPush : public PluginProtocol -{ -public: - - - /** - *@brief start/register Push services - *@return void - */ - virtual void startPush() = 0 ; - - - /** - *@brief close Push services - *@return void - */ - virtual void closePush() = 0 ; - - - /** - *@brief set alias - *@param tags - *@return void - */ - virtual void setAlias(string alias) = 0; - - /** - *@brief del alias - *@param tags - *@return void - */ - virtual void delAlias(string alias) = 0; - - /** - *@brief set tag - *@param tags - *@return void - */ - virtual void setTags(list tags) = 0; - - /** - *@brief delete tag - *@param tags - *@return void - */ - virtual void delTags(list tags) = 0; - - /** - @brief set the result listener - @param pListener The callback object for push result - */ - virtual void setActionListener(PushActionListener* listener) = 0 ; - - /** - @brief get pListener The callback object for Push result - @return the listener - */ - virtual PushActionListener* getActionListener() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_PUSH_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolREC.h b/android/armeabi-v7a/include/anysdk/ProtocolREC.h deleted file mode 100644 index b0db2c0d..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolREC.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file ProtocolREC.h - */ -#ifndef __CCX_PROTOCOL_REC_H__ -#define __CCX_PROTOCOL_REC_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { - -typedef std::map TVideoInfo; - -/** @brief RECResultCode enum, with inline docs */ -typedef enum -{ - kRECInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk . */ - kRECInitFail,/**< enum value is callback of failing to init sdk. */ - kRECStartRecording,/**< enum value is callback of starting to record. */ - kRECStopRecording,/**< enum value is callback of stoping to record. */ - kRECPauseRecording,/**< enum value is callback of pausing to record. */ - kRECResumeRecording,/**< enum value is callback of resuming to record. */ - kRECEnterSDKPage,/**< enum value is callback of entering SDK`s page. */ - kRECQuitSDKPage,/**< enum value is callback of quiting SDK`s page. */ - kRECShareSuccess,/**< enum value is callback of succeeding in sharing. */ - kRECShareFail,/**< enum value is callback of failing to share. */ - kRECExtension = 90000 /**< enum value is extension code . */ -} RECResultCode; -/**    - *@class  RECResultListener - *@brief the interface of REC callback   - */ -class RECResultListener -{ -public: - /**    - *@brief the interface of REC callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onRECResult(RECResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolREC - *@brief the interface of REC   - */ -class ProtocolREC : public PluginProtocol -{ -public: - - /** - * @Description: Start to record video - */ - virtual void startRecording() = 0; - - /** - * @Description: Stop to record video - */ - virtual void stopRecording() = 0; - - /** - * @Description: share video - * @Param info The info of share - */ - virtual void share(TVideoInfo info) = 0; - - - - /** - @breif set the result listener - @param pListener The callback object for REC result - @wraning Must invoke this interface before REC - */ - virtual void setResultListener(RECResultListener* pListener) = 0; - - virtual RECResultListener* getRECListener() = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolShare.h b/android/armeabi-v7a/include/anysdk/ProtocolShare.h deleted file mode 100644 index 2215a4ff..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolShare.h +++ /dev/null @@ -1,72 +0,0 @@ -/** @file ProtocolShare.h - */ -#ifndef __CCX_PROTOCOL_SHARE_H__ -#define __CCX_PROTOCOL_SHARE_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TShareDeveloperInfo -/// typedef TShareDeveloperInfo. -typedef std::map TShareDeveloperInfo; -/// \typedef std::map TShareInfo -/// typedef TShareInfo. -typedef std::map TShareInfo; -/** @brief ShareResultCode enum, with inline docs */ -typedef enum -{ - kShareSuccess = 0,/**< enum value is callback of failing to sharing . */ - kShareFail,/**< enum value is callback of failing to share . */ - kShareCancel,/**< enum value is callback of canceling to share . */ - kShareNetworkError,/**< enum value is callback of network error . */ - kShareExtension = 10000 /**< enum value is extension code . */ -} ShareResultCode; -/**    - *@class  ShareResultListener - *@brief the interface of share callback   - */ -class ShareResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onShareResult(ShareResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolShare - *@brief the interface of share   - */ -class ProtocolShare : public PluginProtocol -{ -public: - - - - /** - @brief share information - @param info The info of share, contains key: - SharedText The text need to share - SharedImagePath The full path of image file need to share (optinal) - @warning For different plugin, the parameter should have other keys to share. - Look at the manual of plugins. */ - virtual void share(TShareInfo info) = 0; - - /** - @breif set the result listener - @param pListener The callback object for share result - @wraning Must invoke this interface before share - */ - virtual void setResultListener(ShareResultListener* pListener) = 0; - - virtual ShareResultListener* getShareListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolSocial.h b/android/armeabi-v7a/include/anysdk/ProtocolSocial.h deleted file mode 100644 index 3fa5639b..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolSocial.h +++ /dev/null @@ -1,105 +0,0 @@ -/** @file ProtocolSocial.h - */ -#ifndef __CCX_PROTOCOL_SOCIAL_H__ -#define __CCX_PROTOCOL_SOCIAL_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TSocialDeveloperInfo -/// typedef TSocialDeveloperInfo. -typedef std::map TSocialDeveloperInfo; -/// \typedef std::map TAchievementInfo -/// typedef TAchievementInfo. -typedef std::map TAchievementInfo; -/** @brief SocialRetCode enum, with inline docs */ -typedef enum -{ - // code for leaderboard feature - kScoreSubmitSucceed =1,/**< enum value is callback of succeeding in submiting. */ - kScoreSubmitfail,/**< enum value is callback of failing to submit . */ - - // code for achievement feature - kAchUnlockSucceed,/**< enum value is callback of succeeding in unlocking. */ - kAchUnlockFail,/**< enum value is callback of failing to unlock. */ - - kSocialSignInSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignInFail,/**< enum value is callback of failing to login. */ - - kSocialSignOutSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignOutFail,/**< enum value is callback of failing to login. */ - kSocialGetGameFriends,/**< enum value is callback of getGameFriends. */ - kSocialExtensionCode = 20000 /**< enum value is extension code . */ - -} SocialRetCode; -/**    - *@class  SocialListener - *@brief the interface of social callback   - */ -class SocialListener -{ -public: - /**    - *@brief the interface of social callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onSocialResult(SocialRetCode code, const char* msg) = 0; -}; - -/**    - *@class  ProtocolSocial - *@brief the interface of social   - */ -class ProtocolSocial : public PluginProtocol -{ -public: - - /** - @brief user signIn - */ - virtual void signIn() = 0; - - /** - @brief user signOut - */ - virtual void signOut() = 0; - - /** - @brief submit the score - @param leaderboardID - @param the score - */ - virtual void submitScore(const char* leadboardID, long score) = 0; - /** - @brief show the id of Leaderboard page - @param leaderboardID - */ - virtual void showLeaderboard(const char* leaderboardID) = 0; - - /** - @brief methods of achievement feature - @param the info of achievement - */ - virtual void unlockAchievement(TAchievementInfo achInfo) = 0; - /** - @brief show the page of achievements - */ - virtual void showAchievements() = 0; - /** - @brief set pListener The callback object for social result - @param the listener - */ - virtual void setListener(SocialListener* listener) = 0; - /** - @brief get pListener The callback object for social result - @return the listener - */ - virtual SocialListener* getListener() = 0; -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SOCIAL_H__ ----- */ diff --git a/android/armeabi-v7a/include/anysdk/ProtocolUser.h b/android/armeabi-v7a/include/anysdk/ProtocolUser.h deleted file mode 100644 index 387fb9e8..00000000 --- a/android/armeabi-v7a/include/anysdk/ProtocolUser.h +++ /dev/null @@ -1,135 +0,0 @@ -/** @file ProtocolUser.h - */ -#ifndef __CCX_PROTOCOL_USER_H__ -#define __CCX_PROTOCOL_USER_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TUserDeveloperInfo -/// typedef TUserDeveloperInfo. -typedef std::map TUserDeveloperInfo; -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk. */ - kInitFail,/**< enum value is callback of failing to init sdk. */ - kLoginSuccess,/**< enum value is callback of succeeding in login.*/ - kLoginNetworkError,/**< enum value is callback of network error*/ - kLoginNoNeed,/**< enum value is callback of no need login.*/ - kLoginFail,/**< enum value is callback of failing to login. */ - kLoginCancel,/**< enum value is callback of canceling to login. */ - kLogoutSuccess,/**< enum value is callback of succeeding in logout. */ - kLogoutFail,/**< enum value is callback of failing to logout. */ - kPlatformEnter,/**< enum value is callback after enter platform. */ - kPlatformBack,/**< enum value is callback after exit antiAddiction. */ - kPausePage,/**< enum value is callback after exit pause page. */ - kExitPage,/**< enum value is callback after exit exit page. */ - kAntiAddictionQuery,/**< enum value is callback after querying antiAddiction. */ - kRealNameRegister,/**< enum value is callback after registering realname. */ - kAccountSwitchSuccess,/**< enum value is callback of succeeding in switching account. */ - kAccountSwitchFail,/**< enum value is callback of failing to switch account. */ - kOpenShop,/**< enum value is callback of open the shop. */ - kAccountSwitchCancel,/**< enum value is callback of canceling to switch account. */ - kGameExitPage,/**< enum value is callback of no channel exit page. */ - kUserExtension = 50000 /**< enum value is extension code . */ - - -} UserActionResultCode; -/** @brief ToolBarPlace enum, with inline docs */ -typedef enum -{ - kToolBarTopLeft = 1,/**< enum the toolbar is at topleft. */ - kToolBarTopRight,/**< enum the toolbar is at topright. */ - kToolBarMidLeft,/**< enum the toolbar is at midleft. */ - kToolBarMidRight,/**< enum the toolbar is at midright. */ - kToolBarBottomLeft,/**< enum the toolbar is at bottomleft. */ - kToolBarBottomRight,/**< enum the toolbar is at bottomright. */ -} ToolBarPlace; - -class ProtocolUser; -/**    - *@class  UserActionListener - *@brief the interface of user callback   - */ -class UserActionListener -{ -public: - /**    - *@brief the interface of user callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolUser* pPlugin, UserActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolUser   - */ -class ProtocolUser : public PluginProtocol -{ -public: - - - /** - @brief User login - */ - virtual void login() = 0 ; - - /** - @brief User login - if the process of logining need to know the param of server_id , - you can use the function - and if you must change oauthloginserver, you can add the param of oauthLoginServer - @param server_id - @param oauthLoginServer - */ - - CC_DEPRECATED_ATTRIBUTE virtual void login(std::string server_id, std::string oauthLoginServer = "") = 0 ; - - /** - @brief User login - if the process of logining need to know the parameters , - you can use the function - @param the parameters - */ - virtual void login(std::map info) = 0 ; - - /** - @brief Check whether the user logined or not - @return If user logined, return value is true; - else return value is false. - */ - virtual bool isLogined() = 0 ; - - /** - @brief Get USER ID - @return If user logined, return value is userID; - else return value is empty string. - */ - virtual std::string getUserID() = 0 ; - /** - @brief set the result listener - @param pListener The callback object for user result - */ - virtual void setActionListener(UserActionListener* listener) = 0 ; - /** - @brief get pListener The callback object for user result - @return the listener - */ - virtual UserActionListener* getActionListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_USER_H__ */ diff --git a/android/armeabi-v7a/include/anysdk/Statistics.h b/android/armeabi-v7a/include/anysdk/Statistics.h deleted file mode 100644 index bb389ff0..00000000 --- a/android/armeabi-v7a/include/anysdk/Statistics.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __STATISTICS_H__ -#define __STATISTICS_H__ - -#include -namespace anysdk { namespace framework { - -class Statistics -{ -public: - static void initInfo(); - static void createPlugin(std::string pluginName, int pluginType); - static void callFunction(std::string pluginName, std::string functionName); - -}; - -}} // namespace anysdk { namespace framework { - -#endif //__STATISTICS_H__ diff --git a/android/armeabi-v7a/libPluginProtocolStatic.a b/android/armeabi-v7a/libPluginProtocolStatic.a deleted file mode 100644 index bd531994..00000000 Binary files a/android/armeabi-v7a/libPluginProtocolStatic.a and /dev/null differ diff --git a/android/x86/include/anysdk/AgentManager.h b/android/x86/include/anysdk/AgentManager.h deleted file mode 100644 index 092a9eaf..00000000 --- a/android/x86/include/anysdk/AgentManager.h +++ /dev/null @@ -1,245 +0,0 @@ -/** @file AgentManager.h - */ - - -#ifndef __CCX_AGENTMANAGER_H__ -#define __CCX_AGENTMANAGER_H__ - -#include "PluginManager.h" -#include "ProtocolIAP.h" -#include "ProtocolAnalytics.h" -#include "ProtocolShare.h" -#include "ProtocolAds.h" -#include "ProtocolSocial.h" -#include "ProtocolUser.h" -#include "ProtocolPush.h" -#include "ProtocolCrash.h" -#include "ProtocolREC.h" -#include "ProtocolCustom.h" -#include "ProtocolAdTracking.h" -#include -#include -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum { - kPluginAds = 16,/**< enum value is the type of Ads. */ - kPluginAnalytics = 1,/**< enum value is the type of Analytics. */ - kPluginIAP = 8,/**< enum value is the type of IAP. */ - kPluginShare = 2,/**< enum value is the type of Share. */ - kPluginUser = 32,/**< enum value is the type of User. */ - kPluginSocial = 4,/**< enum value is the type of Social. */ - kPluginPush = 64,/**< enum value is the type of Push. */ - kPluginCrash = 128,/**< enum value is the type of Crash. */ - kPluginCustom = 256,/**< enum value is the type of Custom. */ - kPluginREC = 512,/**< enum value is the type of REC. */ - kPluginAdTracking = 1024,/**< enum value is the type of AdTracking. */ -}Plugin_type; -/**    - *  @class  AgentManager   - */ -class AgentManager -{ -public: - virtual ~AgentManager(); - /** - @brief Get singleton of AgentManager - */ - - static AgentManager* getInstance(); - /** - @brief Destory the instance of AgentManager - */ - static void end(); - - /** - @breif the init of AgentManager - @param the appKey of anysdk - @param the appSecret of anysdk - @param the privateKey of anysdk - @param the url of oauthLoginServer - @warning Must invoke this interface before loadAllPlugins - */ - void init(std::string appKey,std::string appSecret,std::string privateKey,std::string oauthLoginServer); - - /** - @brief load the plugins - */ - CC_DEPRECATED_ATTRIBUTE void loadALLPlugin(); - /** - @brief unload the plugins - */ - CC_DEPRECATED_ATTRIBUTE void unloadALLPlugin(); - - /** - @brief load the plugins - */ - void loadAllPlugins(); - - /** - @brief unload the plugins - */ - void unloadAllPlugins(); - - /** - @brief Get Analytics plugin - @return if Analytics plugin exist ,return value is Analytics plugin. - else return value is null pointer. - */ - ProtocolAnalytics* getAnalyticsPlugin(){return _pAnalytics;}; - - /** - @brief Get User plugin - @return if User plugin exist ,return value is User plugin. - else return value is null pointer. - */ - ProtocolUser* getUserPlugin(){return _pUser;}; - - /** - @brief Get IAP plugin - @return if IAP plugin exist ,return value is IAP plugin. - else return value is null pointer. - */ - std::map* getIAPPlugin(){return &_pluginsIAPMap;}; - - /** - @brief Get Share plugin - @return if Share plugin exist ,return value is Share plugin. - else return value is null pointer. - */ - ProtocolShare* getSharePlugin(){return _pShare;}; - - /** - @brief Get Social plugin - @return if Social plugin exist ,return value is Social plugin. - else return value is null pointer. - */ - ProtocolSocial* getSocialPlugin(){return _pSocial;}; - - /** - @brief Get Ads plugin - @return if Ads plugin exist ,return value is Ads plugin. - else return value is null pointer. - */ - ProtocolAds* getAdsPlugin(){return _pAds;}; - - /** - @brief Get Push plugin - @return if Push plugin exist ,return value is Push plugin. - else return value is null pointer. - */ - ProtocolPush* getPushPlugin(){return _pPush;}; - - /** - @brief Get Crash plugin - @return if Crash plugin exist ,return value is Crash plugin. - else return value is null pointer. - */ - ProtocolCrash* getCrashPlugin(){return _pCrash;}; - - /** - @brief Get Custom plugin - @return if Crash plugin exist ,return value is Custom plugin. - else return value is null pointer. - */ - ProtocolCustom* getCustomPlugin(){return _pCustom;}; - - - /** - @brief Get REC plugin - @return if REC plugin exist ,return value is REC plugin. - else return value is null pointer. - */ - ProtocolREC* getRECPlugin(){return _pREC;}; - - /** - @brief Get AdTracking plugin - @return if AdTracking plugin exist ,return value is AdTracking plugin. - else return value is null pointer. - */ - ProtocolAdTracking* getAdTrackingPlugin(){return _pAdTracking;}; - - /** - @brief Get channel ID - @return return value is channel ID. - */ - std::string getChannelId(); - - /** - @brief Get custom param - @return return value is custom param for channel. - */ - std::string getCustomParam(); - - /** - @brief Get framework version - @return return value is the version of AnySDKFramework. - */ - std::string getFrameworkVersion(); - - /** - @Title: setIsAnaylticsEnabled - @Description: choose to open or close - @param @param enabled true or false - @return void - */ - void setIsAnaylticsEnabled(bool value){bIsAnaylticsEnabled = value;}; - /** - @Title: isAnaylticsEnabled - @Description: the status of Anayltics - @param @return true or false - @return boolean - */ - bool isAnaylticsEnabled(){return bIsAnaylticsEnabled;}; - - - void loadPlugin(const char* nodeName,int type); -protected: - void setDebugMode(bool flag); - std::string getSupportPlugin(); - void release(); - - -private: - AgentManager(void); - - // Analytics plugin - ProtocolAnalytics* _pAnalytics; - - // user plugin - ProtocolUser* _pUser; - - // IAP plugins - // ProtocolIAP* _pIAP; - std::map _pluginsIAPMap; - - // Share plugin - ProtocolShare* _pShare; - - // Social plugin - ProtocolSocial* _pSocial; - - // Ads plugin - ProtocolAds* _pAds; - - // Push plugin - ProtocolPush* _pPush; - - // Crash plugin - ProtocolCrash* _pCrash; - - // Custom plugin - ProtocolCustom* _pCustom; - - // REC plugin - ProtocolREC* _pREC; - - // AdTracking plugin - ProtocolAdTracking* _pAdTracking; - - bool bIsAnaylticsEnabled; - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_AGENTMANAGER_H__ */ diff --git a/android/x86/include/anysdk/JSBRelation.h b/android/x86/include/anysdk/JSBRelation.h deleted file mode 100644 index 7775b0dc..00000000 --- a/android/x86/include/anysdk/JSBRelation.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file JSBRelation.h - */ -#ifndef __CCX_JSBRELATION_H__ -#define __CCX_JSBRELATION_H__ - -#include "PluginProtocol.h" -#include -#include -#include - -using namespace std; - -namespace anysdk { namespace framework { - -/**    - *  @class  JSBRelation   - */ -class JSBRelation -{ -public: - static string getMethodsOfPlugin(PluginProtocol* plugin); - - - - -private: -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_JSBRELATION_H__ */ diff --git a/android/x86/include/anysdk/PluginFactory.h b/android/x86/include/anysdk/PluginFactory.h deleted file mode 100644 index 79922c97..00000000 --- a/android/x86/include/anysdk/PluginFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGIN_FACTORY_H__ -#define __CCX_PLUGIN_FACTORY_H__ - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginManager; -/**    - *  @class  PluginFactory   - */ -class PluginFactory -{ -public: - virtual ~PluginFactory(); - /** - @brief Get singleton of PluginFactory - */ - static PluginFactory* getInstance(); - - /** - @brief Destory the instance of PluginFactory - */ - static void purgeFactory(); - -private: - friend class PluginManager; - PluginFactory(void); - - /** - @brief create the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* createPlugin(const char* name, int pluginType); -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_FACTORY_H__ */ diff --git a/android/x86/include/anysdk/PluginJavaData.h b/android/x86/include/anysdk/PluginJavaData.h deleted file mode 100644 index bd37b745..00000000 --- a/android/x86/include/anysdk/PluginJavaData.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __PLUGIN_JAVA_DATA_H__ -#define __PLUGIN_JAVA_DATA_H__ - -#include -#include - -namespace anysdk { namespace framework { - -typedef struct _PluginJavaData_ -{ - jobject jobj; - std::string jclassName; -} PluginJavaData; - -}} //namespace anysdk { namespace framework { - -#endif // __PLUGIN_JAVA_DATA_H__ diff --git a/android/x86/include/anysdk/PluginJniHelper.h b/android/x86/include/anysdk/PluginJniHelper.h deleted file mode 100644 index 82981907..00000000 --- a/android/x86/include/anysdk/PluginJniHelper.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __PLUGIN_JNI_HELPER_H__ -#define __PLUGIN_JNI_HELPER_H__ - -#include -#include - -namespace anysdk {namespace framework{ - -typedef struct PluginJniMethodInfo_ -{ - JNIEnv * env; - jclass classID; - jmethodID methodID; -} PluginJniMethodInfo; - -class PluginJniHelper -{ -public: - static JavaVM* getJavaVM(); - static void setJavaVM(JavaVM *javaVM); - static JNIEnv* getEnv(); - - static bool getStaticMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static bool getMethodInfo(PluginJniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode); - static std::string jstring2string(jstring jstr); - static jstring newStringUTF(JNIEnv* env, const std::string& utf8Str); - - static bool setClassLoaderFrom(jobject nativeActivityInstance); - - static jmethodID loadclassMethod_methodID; - static jobject classloader; - -private: - static JavaVM *_psJavaVM; - static bool getMethodInfo_DefaultClassLoader(PluginJniMethodInfo &methodinfo, - const char *className, - const char *methodName, - const char *paramCode); -}; - -}} - -#endif // __PLUGIN_JNI_HELPER_H__ diff --git a/android/x86/include/anysdk/PluginJniMacros.h b/android/x86/include/anysdk/PluginJniMacros.h deleted file mode 100644 index eace0d9a..00000000 --- a/android/x86/include/anysdk/PluginJniMacros.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef __PLUGIN_JNI_MACROS_H__ -#define __PLUGIN_JNI_MACROS_H__ - -#define return_if_fails(cond) if (!(cond)) return; -#define return_val_if_fails(cond, ret) if(!(cond)) return (ret); - -#define CALL_BASERET_JAVA_FUNC_WITH_PARAM(retType, paramCode, param, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID, param); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_BASERET_JAVA_FUNC(retType, paramCode, retCode, defaultRet) \ -retType ret = defaultRet; \ -return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); \ -return_val_if_fails(pData != NULL, ret); \ - \ -PluginJniMethodInfo t; \ -if (PluginJniHelper::getMethodInfo(t \ - , pData->jclassName.c_str() \ - , funcName \ - , paramCode)) \ -{ \ - ret = t.env->Call##retCode##Method(pData->jobj, t.methodID); \ - t.env->DeleteLocalRef(t.classID); \ -} \ -return ret; \ - - -#define CALL_JAVA_FUNC_WITH_VALIST(retCode) \ -std::vector allParams; \ -if (NULL != param) \ -{ \ - allParams.push_back(param); \ - \ - va_list argp; \ - PluginParam* pArg = NULL; \ - va_start( argp, param ); \ - while (1) \ - { \ - pArg = va_arg(argp, PluginParam*); \ - if (pArg == NULL) \ - break; \ - \ - allParams.push_back(pArg); \ - } \ - va_end(argp); \ -} \ - \ -return call##retCode##FuncWithParam(funcName, allParams); \ - - -#define CALL_JAVA_FUNC(retType, retCode, defaultRet, jRetCode) \ -retType ret = defaultRet; \ -PluginJavaData* pData = PluginUtils::getPluginJavaData(this); \ -if (NULL == pData) { \ - PluginUtils::outputLog(ANDROID_LOG_ERROR, "PluginProtocol", "Can't find java data for plugin : %s", this->getPluginName()); \ - return ret; \ -} \ - \ -std::string paramCode; \ -int nParamNum = params.size(); \ -if (0 == nParamNum) \ -{ \ - paramCode = "()"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName(this, funcName); \ -} else \ -{ \ - PluginParam* pRetParam = NULL; \ - bool needDel = false; \ - if (nParamNum == 1) { \ - pRetParam = params[0]; \ - } else { \ - std::map allParams; \ - for (int i = 0; i < nParamNum; i++) \ - { \ - PluginParam* pArg = params[i]; \ - if (pArg == NULL) \ - { \ - break; \ - } \ - \ - char strKey[8] = { 0 }; \ - sprintf(strKey, "Param%d", i + 1); \ - allParams[strKey] = pArg; \ - } \ - \ - pRetParam = new PluginParam(allParams); \ - needDel = true; \ - } \ - \ - switch(pRetParam->getCurrentType()) \ - { \ - case PluginParam::kParamTypeInt: \ - paramCode = "(I)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getIntValue()); \ - break; \ - case PluginParam::kParamTypeFloat: \ - paramCode = "(F)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getFloatValue()); \ - break; \ - case PluginParam::kParamTypeBool: \ - paramCode = "(Z)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), pRetParam->getBoolValue()); \ - break; \ - case PluginParam::kParamTypeString: \ - { \ - jstring jstr = PluginJniHelper::newStringUTF(PluginUtils::getEnv(), pRetParam->getStringValue()); \ - paramCode = "(Ljava/lang/String;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jstr); \ - PluginUtils::getEnv()->DeleteLocalRef(jstr); \ - } \ - break; \ - case PluginParam::kParamTypeStringMap: \ - case PluginParam::kParamTypeMap: \ - { \ - jobject jMap = PluginUtils::getJObjFromParam(pRetParam); \ - paramCode = "(Lorg/json/JSONObject;)"; \ - paramCode.append(jRetCode); \ - ret = PluginUtils::callJava##retCode##FuncWithName_oneParam(this, funcName, paramCode.c_str(), jMap); \ - PluginUtils::getEnv()->DeleteLocalRef(jMap); \ - } \ - break; \ - default: \ - break; \ - } \ - \ - if (needDel && pRetParam != NULL) \ - { \ - delete pRetParam; \ - pRetParam = NULL; \ - } \ -} \ -return ret; \ - - -#endif // __PLUGIN_JNI_MACROS_H__ diff --git a/android/x86/include/anysdk/PluginManager.h b/android/x86/include/anysdk/PluginManager.h deleted file mode 100644 index 93282ae7..00000000 --- a/android/x86/include/anysdk/PluginManager.h +++ /dev/null @@ -1,51 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGINMANAGER_H__ -#define __CCX_PLUGINMANAGER_H__ - -#include "PluginProtocol.h" -#include "PluginFactory.h" -#include -#include - -namespace anysdk { namespace framework { - -/**    - *  @class  PluginManager   - */ -class PluginManager -{ -public: - virtual ~PluginManager(); - /** - @brief Get singleton of PluginManager - */ - static PluginManager* getInstance(); - /** - @brief Destory the instance of PluginManager - */ - static void end(); - - /** - @brief load the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* loadPlugin(const char* name, int pluginType); - /** - @brief unload the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - void unloadPlugin(const char* name, int pluginType = 0); - - -private: - PluginManager(void); - std::map _pluginsMap; -// bool _isDebug; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGINMANAGER_H__ */ diff --git a/android/x86/include/anysdk/PluginParam.h b/android/x86/include/anysdk/PluginParam.h deleted file mode 100644 index 1f35d4a7..00000000 --- a/android/x86/include/anysdk/PluginParam.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file PluginParam.h - */ -#ifndef __CCX_PLUGIN_PARAM_H__ -#define __CCX_PLUGIN_PARAM_H__ - -#include -#include -/// \typedef std::map StringMap -/// typedef YString. -typedef std::map StringMap; - -namespace anysdk { namespace framework { - -class PluginProtocol; -/**    - *  @class  PluginParam   - */ -class PluginParam -{ -public: - /** - @brief the default constructor of PluginParam - */ - PluginParam(); - - virtual ~PluginParam(); - /** - @brief the constructor of PluginParam - @param the value is Integer - */ - PluginParam(int nValue); - /** - @brief the constructor of PluginParam - @param the value is float - */ - PluginParam(float fValue); - /** - @brief the constructor of PluginParam - @param the value is boolean - */ - PluginParam(bool bValue); - /** - @brief the default constructor of PluginParam - @param the value is char - */ - PluginParam(const char* strValue); - /** - @brief the default constructor of PluginParam - @param the value is StringMap - */ - PluginParam(StringMap strMapValue); - - typedef enum{ - kParamTypeNull = 0, - kParamTypeInt, - kParamTypeFloat, - kParamTypeBool, - kParamTypeString, - kParamTypeStringMap, - kParamTypeMap, - } ParamType; - /** - @brief get the ParamType of value - */ - inline ParamType getCurrentType() { - return _type; - } - /** - @brief get the int value - */ - inline int getIntValue() { - return _intValue; - } - /** - @brief get the float value - */ - inline float getFloatValue() { - return _floatValue; - } - /** - @brief get the boolean value - */ - inline bool getBoolValue() { - return _boolValue; - } - /** - @brief get the char value - */ - inline const char* getStringValue() { - return _strValue.c_str(); - } - /** - @brief get the map of value - */ - inline std::map getMapValue() { - return _mapValue; - } - /** - @brief get the StringMap value - */ - inline StringMap getStrMapValue() { - return _strMapValue; - } - -private: - friend class PluginProtocol; - /** - @brief the constructor of PluginParam - @param the map of value - */ - PluginParam(std::map mapValue); - -private: - ParamType _type; - - int _intValue; - float _floatValue; - bool _boolValue; - std::string _strValue; - std::map _mapValue; - StringMap _strMapValue; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_PARAM_H__ */ diff --git a/android/x86/include/anysdk/PluginProtocol.h b/android/x86/include/anysdk/PluginProtocol.h deleted file mode 100644 index 95cf706d..00000000 --- a/android/x86/include/anysdk/PluginProtocol.h +++ /dev/null @@ -1,144 +0,0 @@ -/** @file PluginProtocol.h - */ -#ifndef __CCX_IPLUGIN_H__ -#define __CCX_IPLUGIN_H__ - -#include "PluginParam.h" -#include - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher -#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else -#define CC_DEPRECATED_ATTRIBUTE -#endif - -namespace anysdk { namespace framework { - -/** - * @class PluginProtocol - * @brief The super class for all plugins. - */ -class PluginProtocol -{ -public: - virtual ~PluginProtocol() {}; - - /** - *@brief set plugin name - *@param the name of plugin - */ - virtual void setPluginName(const char* name) = 0 ; - /** - *@brief get plugin name - *@return the name of plugin - */ - virtual const char* getPluginName() = 0 ; - - /** - *@brief get the version of plugin - *@return the version of plugin - */ - virtual std::string getPluginVersion(); - /** - *@brief get the version of sdk - *@return the version of sdk - */ - virtual std::string getSDKVersion(); - - /** - *@brief switch debug plug-in on/off - *@param the value of on/off - */ - CC_DEPRECATED_ATTRIBUTE virtual void setDebugMode(bool bDebug); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return void - */ - virtual void callFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return void - */ - virtual void callFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, std::vector params); - - /** - @brief Check function the plugin support or not - @param the name of plugin - @return if the function support ,return true - else retur false - */ - virtual bool isFunctionSupported(std::string functionName); - - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_IPLUGIN_H__ */ diff --git a/android/x86/include/anysdk/PluginUtils.h b/android/x86/include/anysdk/PluginUtils.h deleted file mode 100644 index 3742c161..00000000 --- a/android/x86/include/anysdk/PluginUtils.h +++ /dev/null @@ -1,157 +0,0 @@ -#ifndef __PLUGIN_UTILS_H__ -#define __PLUGIN_UTILS_H__ - -#include "PluginJniHelper.h" -#include "PluginJavaData.h" -#include -#include -#include "PluginParam.h" -#include "PluginJniMacros.h" -#include -//#include - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginUtils -{ -public: -//cjh static void initPluginWrapper(android_app* app); - static jobject createJavaMapObject(std::map* paramMap); - static jobject createJavaListObject(std::list* paramList); - static void initJavaPlugin(PluginProtocol* pPlugin, jobject jObj, const char* className, int type); - static JNIEnv* getEnv(); - - static PluginJavaData* getPluginJavaData(PluginProtocol* pKeyObj); - static void setPluginJavaData(PluginProtocol* pKeyObj, PluginJavaData* pData, int type); - static void erasePluginJavaData(PluginProtocol* pKeyObj,int type); - static void erasePluginJavaData(std::string key); - - static PluginProtocol* getPluginPtr(std::string className); - - static jobject getJObjFromParam(PluginParam* param); - - // methods have no return value - template - static void callJavaFunctionWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - return_if_fails(paramCode != NULL && strlen(paramCode) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - t.env->CallVoidMethod(pData->jobj, t.methodID, param); - t.env->DeleteLocalRef(t.classID); - } - } - static void callJavaFunctionWithName(PluginProtocol* thiz, const char* funcName) - { - return_if_fails(funcName != NULL && strlen(funcName) > 0); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_if_fails(pData != NULL); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()V")) - { - t.env->CallVoidMethod(pData->jobj, t.methodID); - t.env->DeleteLocalRef(t.classID); - } - } - - // methods return value is string - template - static std::string callJavaStringFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - return_val_if_fails(paramCode != NULL && strlen(paramCode) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , paramCode)) - { - jstring strRet = (jstring)t.env->CallObjectMethod(pData->jobj, t.methodID, param); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - static std::string callJavaStringFuncWithName(PluginProtocol* thiz, const char* funcName) - { - std::string ret = ""; - return_val_if_fails(funcName != NULL && strlen(funcName) > 0, ret); - PluginJavaData* pData = PluginUtils::getPluginJavaData(thiz); - return_val_if_fails(pData != NULL, ret); - - PluginJniMethodInfo t; - if (PluginJniHelper::getMethodInfo(t - , pData->jclassName.c_str() - , funcName - , "()Ljava/lang/String;")) - { - jstring strRet = (jstring) t.env->CallObjectMethod(pData->jobj, t.methodID); - ret = PluginJniHelper::jstring2string(strRet); - t.env->DeleteLocalRef(t.classID); - } - return ret; - } - - // methods return value is int - template - static int callJavaIntFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(int, paramCode, param, Int, 0) - } - static int callJavaIntFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(int, "()I", Int, 0) - } - - // methods return value is float - template - static float callJavaFloatFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(float, paramCode, param, Float, 0.0f) - } - static float callJavaFloatFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(float, "()F", Float, 0.0f); - } - - // methods return value is bool - template - static bool callJavaBoolFuncWithName_oneParam(PluginProtocol* thiz, const char* funcName, const char* paramCode, T param) - { - CALL_BASERET_JAVA_FUNC_WITH_PARAM(bool, paramCode, param, Boolean, false) - } - static bool callJavaBoolFuncWithName(PluginProtocol* thiz, const char* funcName) - { - CALL_BASERET_JAVA_FUNC(bool, "()Z", Boolean, false) - } - - static void callJavaFunctionWithName_string_map(PluginProtocol* thiz, const char* funcName, const char* keyParam, std::map* paramMap); - - static void outputLog(int type, const char* logTag, const char* pFormat, ...); - static void output(int type, const char* logTag, const char* contents); - - static void resetLogLevel(); -private: - static std::string _logLevel; -}; - -}} // namespace anysdk { namespace framework { - -#endif //__PLUGIN_UTILS_H__ diff --git a/android/x86/include/anysdk/ProtocolAdTracking.h b/android/x86/include/anysdk/ProtocolAdTracking.h deleted file mode 100644 index 6fc557a2..00000000 --- a/android/x86/include/anysdk/ProtocolAdTracking.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file ProtocolAdTracking.h - */ -#ifndef __CCX_PROTOCOL_ADTRACKING_H__ -#define __CCX_PROTOCOL_ADTRACKING_H__ - -#include "PluginProtocol.h" -#include -namespace anysdk { namespace framework { -/**    - *@class  ProtocolAdTracking - *@brief the interface of AdTracking   - */ -class ProtocolAdTracking : public PluginProtocol -{ -public: - - /** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userId user identifier - * @return void - */ - virtual void onRegister(const char* userId) = 0; - - /** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onLogin(std::map userInfo) = 0; - - /** - * - * @Title: onPay - * @Description: Call this method if you want to track pay events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onPay(std::map productInfo) = 0; - - /** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ - virtual void trackEvent(const char* eventId, std::map* paramMap = NULL) = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_ADTRACKING_H__ ----- */ diff --git a/android/x86/include/anysdk/ProtocolAds.h b/android/x86/include/anysdk/ProtocolAds.h deleted file mode 100644 index 8e29987f..00000000 --- a/android/x86/include/anysdk/ProtocolAds.h +++ /dev/null @@ -1,133 +0,0 @@ -/** @file ProtocolAds.h - */ -#ifndef __CCX_PROTOCOL_ADS_H__ -#define __CCX_PROTOCOL_ADS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TAdsDeveloperInfo -/// typedef TAdsDeveloperInfo. -typedef std::map TAdsDeveloperInfo; -/// \typedef std::map TAdsInfo -/// typedef TAdsInfo. -typedef std::map TAdsInfo; -/** @brief AdsResultCode enum, with inline docs */ -typedef enum -{ - kAdsReceived = 0, /**< enum the callback: the ad is received is at center. */ - - kAdsShown, /**< enum the callback: the advertisement dismissed. */ - kAdsDismissed, /**< enum the callback: the advertisement dismissed. */ - - kPointsSpendSucceed, /**< enum the callback: the points spend succeed. */ - kPointsSpendFailed, /**< enum the callback: the points spend failed. */ - - kNetworkError, /**< enum the callback of Network error at center. */ - kUnknownError, /**< enum the callback of Unknown error. */ - kOfferWallOnPointsChanged, /**< enum the callback of Changing the point of offerwall. */ - kRewardedVideoWithReward,/**< enum the callback of receiving the reward of rewardedvideo. */ - kInAppPurchaseFinished,/**< enum the callback of finishing IAP ad. */ - kAdsClicked,/**< enum the callback of the advertisement clicked. */ - kAdsExtension = 40000 /**< enum value is extension code . */ -} AdsResultCode; -/** @brief AdsPos enum, with inline docs */ -typedef enum { - kPosCenter = 0,/**< enum the toolbar is at center. */ - kPosTop,/**< enum the toolbar is at top. */ - kPosTopLeft,/**< enum the toolbar is at topleft. */ - kPosTopRight,/**< enum the toolbar is at topright. */ - kPosBottom,/**< enum the toolbar is at bottom. */ - kPosBottomLeft,/**< enum the toolbar is at bottomleft. */ - kPosBottomRight,/**< enum the toolbar is at bottomright. */ -} AdsPos; -/** @brief AdsType enum, with inline docs */ -typedef enum { - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL,/**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED,/**< enum value is Native advanced ads . */ -} AdsType; - -class ProtocolAds; -class AdsListener -{ -public: - /** - *@brief The advertisement request result - *@param the id of callback - *@param the information of callback - */ - virtual void onAdsResult(AdsResultCode code, const char* msg) = 0; -}; - -class ProtocolAds : public PluginProtocol -{ -public: - - - - /** - @brief show adview - @param the type of ads - @param the idx of ads - */ - virtual void showAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief Hide the adview - @param the type of ads - @param the idx of ads - */ - virtual void hideAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief preload the adview - @param the type of ads - @param the idx of ads - */ - virtual void preloadAds(AdsType adsType, int idx = 1)= 0; - - /** - *@brief Query the points of player - *@return the point - */ - virtual float queryPoints() = 0; - - /** - *@brief Spend the points. - Use this method to notify server spend points. - *@param points Need spend number of points - */ - virtual void spendPoints(int points) = 0; - - /** - @brief set the Ads listener - @param pListener The callback object for Ads result - */ - virtual void setAdsListener(AdsListener* listener) = 0; - - /** - @brief get pListener The callback object for Ads result - @return the listener - */ - virtual AdsListener* getAdsListener() = 0; - - /** - @brief Is it supportive of this type of ads - @param the type of ads - @return if it is supportive ,return true - else retur false - */ - virtual bool isAdTypeSupported(AdsType adType) = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_ADS_H__ */ diff --git a/android/x86/include/anysdk/ProtocolAnalytics.h b/android/x86/include/anysdk/ProtocolAnalytics.h deleted file mode 100644 index ce3372d6..00000000 --- a/android/x86/include/anysdk/ProtocolAnalytics.h +++ /dev/null @@ -1,107 +0,0 @@ -/** @file ProtocolAnalytics.h - */ -#ifndef __CCX_PROTOCOL_ANALYTICS_H__ -#define __CCX_PROTOCOL_ANALYTICS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map LogEventParamPair -/// typedef LogEventParamPair. -typedef std::pair< std::string, std::string > LogEventParamPair; -/// \typedef std::map LogEventParamMap -/// typedef LogEventParamMap. -typedef std::map< std::string, std::string > LogEventParamMap; -typedef enum { - ANONYMOUS,/**< enum value is anonymous typek. */ - REGISTED,/**< enum value is registed type. */ - SINA_WEIBO,/**< enum value is sineweibo type. */ - TENCENT_WEIBO,/**< enum value is tecentweibo type */ - QQ,/**< enum value is qq type */ - ND91,/**< enum value is nd91 type. */ -} AccountType; -typedef enum { - LOGIN,/**< enum value is the login operate. */ - LOGOUT,/**< enum value is the logout operate. */ - REGISTER,/**< enum value is the register operate. */ -} AccountOperate; -typedef enum { - MALE,/**< enum value is male. */ - FEMALE,/**< enum value is female. */ - UNKNOWN,/**< enum value is unknow. */ - -} AccountGender; -typedef enum { - GUIDE_LINE,/**< enum value is the guideline type.. */ - MAIN_LINE,/**< enum value is the mainline type.. */ - BRANCH_LINE,/** -#include - -namespace anysdk { namespace framework { - -class ProtocolCrash : public PluginProtocol -{ -public: - /** - * set user identifier - * - * @param userInfo - */ - virtual void setUserIdentifier(const char* identifier) = 0; - - /** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ - virtual void reportException(const char* message, const char* exception) = 0; - - /** - * customize logging - * - * @param string Custom log - */ - virtual void leaveBreadcrumb(const char* breadcrumb) = 0; - - - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_CRASH_H__ */ diff --git a/android/x86/include/anysdk/ProtocolCustom.h b/android/x86/include/anysdk/ProtocolCustom.h deleted file mode 100644 index dc92558e..00000000 --- a/android/x86/include/anysdk/ProtocolCustom.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file ProtocolCustom.h - */ -#ifndef __CCX_PROTOCOL_CUSTOM_H__ -#define __CCX_PROTOCOL_CUSTOM_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -typedef enum -{ - kCustomExtension = 80000 /**< enum value is extension code . */ -} CustomResultCode; -/**    - *@class  CustomResultListener - *@brief the interface of share callback   - */ -class CustomResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onCustomResult(CustomResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolCustom - *@brief the interface of custom   - */ -class ProtocolCustom : public PluginProtocol -{ -public: - - /** - @breif set the result listener - @param pListener The callback object for custom result - @wraning Must invoke this interface before custom - */ - virtual void setResultListener(CustomResultListener* pListener) = 0; - - virtual CustomResultListener* getCustomListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_Custom_H__ ----- */ diff --git a/android/x86/include/anysdk/ProtocolIAP.h b/android/x86/include/anysdk/ProtocolIAP.h deleted file mode 100644 index 4a875b32..00000000 --- a/android/x86/include/anysdk/ProtocolIAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file ProtocolIAP.h - */ -#ifndef __CCX_PROTOCOL_IAP_H__ -#define __CCX_PROTOCOL_IAP_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TIAPDeveloperInfo -/// typedef TIAPDeveloperInfo. -typedef std::map TIAPDeveloperInfo; -/// \typedef std::map TProductInfo -/// typedef TProductInfo. -typedef std::map TProductInfo; -/// typedef TProductsInfo. -typedef std::map AllProductsInfo; -/** @brief PayResultCode enum, with inline docs */ -typedef enum -{ - kPaySuccess = 0,/**< enum value is callback of succeeding in paying . */ - kPayFail,/**< enum value is callback of failing to pay . */ - kPayCancel,/**< enum value is callback of canceling to pay . */ - kPayNetworkError,/**< enum value is callback of network error . */ - kPayProductionInforIncomplete,/**< enum value is callback of incompleting info . */ - kPayInitSuccess,/**< enum value is callback of succeeding in initing sdk . */ - kPayInitFail,/**< enum value is callback of failing to init sdk . */ - kPayNowPaying,/**< enum value is callback of paying now . */ - kPayRechargeSuccess,/**< enum value is callback of succeeding in recharging. */ - kPayExtension = 30000 /**< enum value is extension code . */ -} PayResultCode; -/** @brief RequestResultCode enum, with inline docs */ -typedef enum -{ - kRequestSuccess = 31000,/**< enum value is callback of succeeding in paying . */ - kRequestFail/**< enum value is callback of failing to pay . */ -} RequestResultCode; -/**    - *@class  PayResultListener - *@brief the interface of pay callback   - */ -class PayResultListener -{ -public: - /**    - *@brief the interface of pay callback  - *@param the id of callback - *@param the information of callback - *@param the info of pay - */ - virtual void onPayResult(PayResultCode ret, const char* msg, TProductInfo info) = 0; - /** - *@brief the interface of request callback - *@param the id of callback - *@param the information of callback - *@param the info of request product - */ - virtual void onRequestResult(RequestResultCode ret, const char* msg, AllProductsInfo info) {} -}; -/**    - *@class  ProtocolIAP - *@brief the interface of pay    - */ - -class ProtocolIAP : public PluginProtocol -{ -public: - - /** - @brief pay for product - @param info The info of product, must contains key: - productName The name of product - productPrice The price of product(must can be parse to float) - productDesc The description of product - @warning For different plugin, the parameter should have other keys to pay. - Look at the manual of plugins. - */ - virtual void payForProduct(TProductInfo info) = 0; - /** - @brief get order id - @return the order id - */ - virtual std::string getOrderId() = 0; - - /** - @breif set the result listener - @param pListener The callback object for pay result - @wraning Must invoke this interface before payForProduct. - */ - virtual void setResultListener(PayResultListener* pListener) = 0; - - virtual PayResultListener* getPayListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - /** - @brief change the state of paying - @param the state - */ - - static void resetPayState() - { - _paying = false; - } - static bool _paying; - - - -}; - - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_IAP_H__ */ diff --git a/android/x86/include/anysdk/ProtocolPush.h b/android/x86/include/anysdk/ProtocolPush.h deleted file mode 100644 index e9e2fac8..00000000 --- a/android/x86/include/anysdk/ProtocolPush.h +++ /dev/null @@ -1,104 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PROTOCOL_PUSH_H__ -#define __CCX_PROTOCOL_PUSH_H__ - -#include "PluginProtocol.h" -#include -#include -#include -using namespace std; - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kPushReceiveMessage = 0,/**value is callback of Receiving Message . */ - kPushExtensionCode = 60000 /**< enum value is extension code . */ - - -} PushActionResultCode; -class ProtocolPush; -/**    - *@class  PushActionListener - *@brief the interface of Push callback   - */ -class PushActionListener -{ -public: - /**    - *@brief the interface of Push callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolPush* pPlugin, PushActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolPush   - */ -class ProtocolPush : public PluginProtocol -{ -public: - - - /** - *@brief start/register Push services - *@return void - */ - virtual void startPush() = 0 ; - - - /** - *@brief close Push services - *@return void - */ - virtual void closePush() = 0 ; - - - /** - *@brief set alias - *@param tags - *@return void - */ - virtual void setAlias(string alias) = 0; - - /** - *@brief del alias - *@param tags - *@return void - */ - virtual void delAlias(string alias) = 0; - - /** - *@brief set tag - *@param tags - *@return void - */ - virtual void setTags(list tags) = 0; - - /** - *@brief delete tag - *@param tags - *@return void - */ - virtual void delTags(list tags) = 0; - - /** - @brief set the result listener - @param pListener The callback object for push result - */ - virtual void setActionListener(PushActionListener* listener) = 0 ; - - /** - @brief get pListener The callback object for Push result - @return the listener - */ - virtual PushActionListener* getActionListener() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_PUSH_H__ */ diff --git a/android/x86/include/anysdk/ProtocolREC.h b/android/x86/include/anysdk/ProtocolREC.h deleted file mode 100644 index b0db2c0d..00000000 --- a/android/x86/include/anysdk/ProtocolREC.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file ProtocolREC.h - */ -#ifndef __CCX_PROTOCOL_REC_H__ -#define __CCX_PROTOCOL_REC_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { - -typedef std::map TVideoInfo; - -/** @brief RECResultCode enum, with inline docs */ -typedef enum -{ - kRECInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk . */ - kRECInitFail,/**< enum value is callback of failing to init sdk. */ - kRECStartRecording,/**< enum value is callback of starting to record. */ - kRECStopRecording,/**< enum value is callback of stoping to record. */ - kRECPauseRecording,/**< enum value is callback of pausing to record. */ - kRECResumeRecording,/**< enum value is callback of resuming to record. */ - kRECEnterSDKPage,/**< enum value is callback of entering SDK`s page. */ - kRECQuitSDKPage,/**< enum value is callback of quiting SDK`s page. */ - kRECShareSuccess,/**< enum value is callback of succeeding in sharing. */ - kRECShareFail,/**< enum value is callback of failing to share. */ - kRECExtension = 90000 /**< enum value is extension code . */ -} RECResultCode; -/**    - *@class  RECResultListener - *@brief the interface of REC callback   - */ -class RECResultListener -{ -public: - /**    - *@brief the interface of REC callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onRECResult(RECResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolREC - *@brief the interface of REC   - */ -class ProtocolREC : public PluginProtocol -{ -public: - - /** - * @Description: Start to record video - */ - virtual void startRecording() = 0; - - /** - * @Description: Stop to record video - */ - virtual void stopRecording() = 0; - - /** - * @Description: share video - * @Param info The info of share - */ - virtual void share(TVideoInfo info) = 0; - - - - /** - @breif set the result listener - @param pListener The callback object for REC result - @wraning Must invoke this interface before REC - */ - virtual void setResultListener(RECResultListener* pListener) = 0; - - virtual RECResultListener* getRECListener() = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/x86/include/anysdk/ProtocolShare.h b/android/x86/include/anysdk/ProtocolShare.h deleted file mode 100644 index 2215a4ff..00000000 --- a/android/x86/include/anysdk/ProtocolShare.h +++ /dev/null @@ -1,72 +0,0 @@ -/** @file ProtocolShare.h - */ -#ifndef __CCX_PROTOCOL_SHARE_H__ -#define __CCX_PROTOCOL_SHARE_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TShareDeveloperInfo -/// typedef TShareDeveloperInfo. -typedef std::map TShareDeveloperInfo; -/// \typedef std::map TShareInfo -/// typedef TShareInfo. -typedef std::map TShareInfo; -/** @brief ShareResultCode enum, with inline docs */ -typedef enum -{ - kShareSuccess = 0,/**< enum value is callback of failing to sharing . */ - kShareFail,/**< enum value is callback of failing to share . */ - kShareCancel,/**< enum value is callback of canceling to share . */ - kShareNetworkError,/**< enum value is callback of network error . */ - kShareExtension = 10000 /**< enum value is extension code . */ -} ShareResultCode; -/**    - *@class  ShareResultListener - *@brief the interface of share callback   - */ -class ShareResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onShareResult(ShareResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolShare - *@brief the interface of share   - */ -class ProtocolShare : public PluginProtocol -{ -public: - - - - /** - @brief share information - @param info The info of share, contains key: - SharedText The text need to share - SharedImagePath The full path of image file need to share (optinal) - @warning For different plugin, the parameter should have other keys to share. - Look at the manual of plugins. */ - virtual void share(TShareInfo info) = 0; - - /** - @breif set the result listener - @param pListener The callback object for share result - @wraning Must invoke this interface before share - */ - virtual void setResultListener(ShareResultListener* pListener) = 0; - - virtual ShareResultListener* getShareListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/android/x86/include/anysdk/ProtocolSocial.h b/android/x86/include/anysdk/ProtocolSocial.h deleted file mode 100644 index 3fa5639b..00000000 --- a/android/x86/include/anysdk/ProtocolSocial.h +++ /dev/null @@ -1,105 +0,0 @@ -/** @file ProtocolSocial.h - */ -#ifndef __CCX_PROTOCOL_SOCIAL_H__ -#define __CCX_PROTOCOL_SOCIAL_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TSocialDeveloperInfo -/// typedef TSocialDeveloperInfo. -typedef std::map TSocialDeveloperInfo; -/// \typedef std::map TAchievementInfo -/// typedef TAchievementInfo. -typedef std::map TAchievementInfo; -/** @brief SocialRetCode enum, with inline docs */ -typedef enum -{ - // code for leaderboard feature - kScoreSubmitSucceed =1,/**< enum value is callback of succeeding in submiting. */ - kScoreSubmitfail,/**< enum value is callback of failing to submit . */ - - // code for achievement feature - kAchUnlockSucceed,/**< enum value is callback of succeeding in unlocking. */ - kAchUnlockFail,/**< enum value is callback of failing to unlock. */ - - kSocialSignInSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignInFail,/**< enum value is callback of failing to login. */ - - kSocialSignOutSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignOutFail,/**< enum value is callback of failing to login. */ - kSocialGetGameFriends,/**< enum value is callback of getGameFriends. */ - kSocialExtensionCode = 20000 /**< enum value is extension code . */ - -} SocialRetCode; -/**    - *@class  SocialListener - *@brief the interface of social callback   - */ -class SocialListener -{ -public: - /**    - *@brief the interface of social callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onSocialResult(SocialRetCode code, const char* msg) = 0; -}; - -/**    - *@class  ProtocolSocial - *@brief the interface of social   - */ -class ProtocolSocial : public PluginProtocol -{ -public: - - /** - @brief user signIn - */ - virtual void signIn() = 0; - - /** - @brief user signOut - */ - virtual void signOut() = 0; - - /** - @brief submit the score - @param leaderboardID - @param the score - */ - virtual void submitScore(const char* leadboardID, long score) = 0; - /** - @brief show the id of Leaderboard page - @param leaderboardID - */ - virtual void showLeaderboard(const char* leaderboardID) = 0; - - /** - @brief methods of achievement feature - @param the info of achievement - */ - virtual void unlockAchievement(TAchievementInfo achInfo) = 0; - /** - @brief show the page of achievements - */ - virtual void showAchievements() = 0; - /** - @brief set pListener The callback object for social result - @param the listener - */ - virtual void setListener(SocialListener* listener) = 0; - /** - @brief get pListener The callback object for social result - @return the listener - */ - virtual SocialListener* getListener() = 0; -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SOCIAL_H__ ----- */ diff --git a/android/x86/include/anysdk/ProtocolUser.h b/android/x86/include/anysdk/ProtocolUser.h deleted file mode 100644 index 387fb9e8..00000000 --- a/android/x86/include/anysdk/ProtocolUser.h +++ /dev/null @@ -1,135 +0,0 @@ -/** @file ProtocolUser.h - */ -#ifndef __CCX_PROTOCOL_USER_H__ -#define __CCX_PROTOCOL_USER_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TUserDeveloperInfo -/// typedef TUserDeveloperInfo. -typedef std::map TUserDeveloperInfo; -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk. */ - kInitFail,/**< enum value is callback of failing to init sdk. */ - kLoginSuccess,/**< enum value is callback of succeeding in login.*/ - kLoginNetworkError,/**< enum value is callback of network error*/ - kLoginNoNeed,/**< enum value is callback of no need login.*/ - kLoginFail,/**< enum value is callback of failing to login. */ - kLoginCancel,/**< enum value is callback of canceling to login. */ - kLogoutSuccess,/**< enum value is callback of succeeding in logout. */ - kLogoutFail,/**< enum value is callback of failing to logout. */ - kPlatformEnter,/**< enum value is callback after enter platform. */ - kPlatformBack,/**< enum value is callback after exit antiAddiction. */ - kPausePage,/**< enum value is callback after exit pause page. */ - kExitPage,/**< enum value is callback after exit exit page. */ - kAntiAddictionQuery,/**< enum value is callback after querying antiAddiction. */ - kRealNameRegister,/**< enum value is callback after registering realname. */ - kAccountSwitchSuccess,/**< enum value is callback of succeeding in switching account. */ - kAccountSwitchFail,/**< enum value is callback of failing to switch account. */ - kOpenShop,/**< enum value is callback of open the shop. */ - kAccountSwitchCancel,/**< enum value is callback of canceling to switch account. */ - kGameExitPage,/**< enum value is callback of no channel exit page. */ - kUserExtension = 50000 /**< enum value is extension code . */ - - -} UserActionResultCode; -/** @brief ToolBarPlace enum, with inline docs */ -typedef enum -{ - kToolBarTopLeft = 1,/**< enum the toolbar is at topleft. */ - kToolBarTopRight,/**< enum the toolbar is at topright. */ - kToolBarMidLeft,/**< enum the toolbar is at midleft. */ - kToolBarMidRight,/**< enum the toolbar is at midright. */ - kToolBarBottomLeft,/**< enum the toolbar is at bottomleft. */ - kToolBarBottomRight,/**< enum the toolbar is at bottomright. */ -} ToolBarPlace; - -class ProtocolUser; -/**    - *@class  UserActionListener - *@brief the interface of user callback   - */ -class UserActionListener -{ -public: - /**    - *@brief the interface of user callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolUser* pPlugin, UserActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolUser   - */ -class ProtocolUser : public PluginProtocol -{ -public: - - - /** - @brief User login - */ - virtual void login() = 0 ; - - /** - @brief User login - if the process of logining need to know the param of server_id , - you can use the function - and if you must change oauthloginserver, you can add the param of oauthLoginServer - @param server_id - @param oauthLoginServer - */ - - CC_DEPRECATED_ATTRIBUTE virtual void login(std::string server_id, std::string oauthLoginServer = "") = 0 ; - - /** - @brief User login - if the process of logining need to know the parameters , - you can use the function - @param the parameters - */ - virtual void login(std::map info) = 0 ; - - /** - @brief Check whether the user logined or not - @return If user logined, return value is true; - else return value is false. - */ - virtual bool isLogined() = 0 ; - - /** - @brief Get USER ID - @return If user logined, return value is userID; - else return value is empty string. - */ - virtual std::string getUserID() = 0 ; - /** - @brief set the result listener - @param pListener The callback object for user result - */ - virtual void setActionListener(UserActionListener* listener) = 0 ; - /** - @brief get pListener The callback object for user result - @return the listener - */ - virtual UserActionListener* getActionListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_USER_H__ */ diff --git a/android/x86/include/anysdk/Statistics.h b/android/x86/include/anysdk/Statistics.h deleted file mode 100644 index bb389ff0..00000000 --- a/android/x86/include/anysdk/Statistics.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __STATISTICS_H__ -#define __STATISTICS_H__ - -#include -namespace anysdk { namespace framework { - -class Statistics -{ -public: - static void initInfo(); - static void createPlugin(std::string pluginName, int pluginType); - static void callFunction(std::string pluginName, std::string functionName); - -}; - -}} // namespace anysdk { namespace framework { - -#endif //__STATISTICS_H__ diff --git a/android/x86/libPluginProtocolStatic.a b/android/x86/libPluginProtocolStatic.a deleted file mode 100644 index 22c51710..00000000 Binary files a/android/x86/libPluginProtocolStatic.a and /dev/null differ diff --git a/ios/include/anysdk/appstore/AdsUtil.h b/ios/include/anysdk/appstore/AdsUtil.h deleted file mode 100644 index 15161729..00000000 --- a/ios/include/anysdk/appstore/AdsUtil.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// AdsUtil.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-23. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -@interface AdsUtil : NSObject - -/** - * get the parameters of ads system in special case - * - * @return return the parameters - */ -+ (NSMutableDictionary*)getAdsParams; - -@end diff --git a/ios/include/anysdk/appstore/AdsWrapper.h b/ios/include/anysdk/appstore/AdsWrapper.h deleted file mode 100644 index 03b899d0..00000000 --- a/ios/include/anysdk/appstore/AdsWrapper.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// AdsWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import - -typedef enum -{ - RESULT_CODE_AdsReceived = 0, // The ad is received - RESULT_CODE_AdsShown, // The advertisement shown - RESULT_CODE_AdsDismissed, // The advertisement - // dismissed - RESULT_CODE_PointsSpendSucceed, // The points - // spend succeed - RESULT_CODE_PointsSpendFailed, // The points - // spend failed - RESULT_CODE_NetworkError, // Network error - RESULT_CODE_UnknownError, // Unknown error - RESULT_CODE_OfferWallOnPointsChanged, // Change the point of offerwall - RESULT_CODE_RewardedVideoWithReward,//the callback of receiving the reward of rewardedvideo - RESULT_CODE_InAppPurchaseFinished,////the callback of finishing YAP ad - RESULT_CODE_AdsClicked, //the callback of the advertisement clicked - RESULT_CODE_ADSEXTENSION = 40000 //ads extension code - -}AD_RET_CODE; - -typedef enum -{ - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL, /**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED/**< enum value is Native advanced ads . */ -} ADS_TYPE; -typedef enum -{ - POS_CENTER = 0,/**< enum the toolbar is at center. */ - POS_TOP,/**< enum the toolbar is at top. */ - POS_TOP_LEFT,/**< enum the toolbar is at topleft. */ - POS_TOP_RIGHT,/**< enum the toolbar is at topright. */ - POS_BOTTOM,/**< enum the toolbar is at bottom. */ - POS_BOTTOM_LEFT,/**< enum the toolbar is at bottomleft. */ - POS_BOTTOM_RIGHT/**< enum the toolbar is at bottomright. */ - -}AD_POS; - -@interface AdsWrapper : NSObject - -/** - * get current RootViewController - * - * @return RootViewController - */ -+ (UIViewController *)getCurrentRootViewController; - -/** - * get top window - * - * @return return top window - */ -+ (UIWindow*) getTopWindow; - -/** - * The callback interface of yap system - * - * @param pPlugin the yap plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onAdsResult:(id)target retCode:(int)code msg:(NSString*)msg; - -/** - * add ad view - * - * @param view view - * @param pos position - */ -+ (void) addAdView:(UIView*) view atPos:(AD_POS) pos; - -/** - * get the name of the advertising types - * - * @param adType the type of the advertising - * - * @return the name of the advertising types - */ -+ (NSString*)getAdNameWithType:(int)adType; - -@end diff --git a/ios/include/anysdk/appstore/AgentManager.h b/ios/include/anysdk/appstore/AgentManager.h deleted file mode 100644 index 936eadc0..00000000 --- a/ios/include/anysdk/appstore/AgentManager.h +++ /dev/null @@ -1,269 +0,0 @@ -/** @file AgentManager.h - */ - - -#ifndef __CCX_AGENTMANAGER_H__ -#define __CCX_AGENTMANAGER_H__ - -#include "PluginManager.h" -#include "ProtocolYAP.h" -#include "ProtocolAnalytics.h" -#include "ProtocolShare.h" -#include "ProtocolAds.h" -#include "ProtocolSocial.h" -#include "ProtocolUser.h" -#include "ProtocolPush.h" -#include "ProtocolCrash.h" -#include "ProtocolREC.h" -#include "ProtocolCustom.h" -#include "ProtocolAdTracking.h" -#include -#include - -#define ProtocolIAP ProtocolYAP -#define getIAPPlugin getYAPPlugin -#define kPluginIAP kPluginYAP -#define onPay onYap -#define kPaySuccess kYapSuccess -#define kPayFail kYapFail -#define kPayCancel kPayCancel -#define kPayNetworkError kPayNetworkError -#define kPayProductionInforIncomplete kYapProductionInforIncomplete -#define kPayInitSuccess kYapInitSuccess -#define kPayInitFail kYapInitFail -#define kPayNowPaying kYapNowYaping -#define kPayRechargeSuccess kYapYapSuccess -#define kPayExtension kYapExtension -#define PayResultCode YapResultCode -#define resetPayState resetYapState -#define getPayListener getYapListener -#define payForProduct yapForProduct -#define onPayResult onYapResult -#define PayResultListener YapResultListener -#define kPayCancel kYapCancel -#define kPayNetworkError kYapNetworkError - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum { - kPluginAds = 16,/**< enum value is the type of Ads. */ - kPluginAnalytics = 1,/**< enum value is the type of Analytics. */ - kPluginYAP = 8,/**< enum value is the type of YAP. */ - kPluginShare = 2,/**< enum value is the type of Share. */ - kPluginUser = 32,/**< enum value is the type of User. */ - kPluginSocial = 4,/**< enum value is the type of Social. */ - kPluginPush = 64,/**< enum value is the type of Push. */ - kPluginCrash = 128,/**< enum value is the type of Crash. */ - kPluginCustom = 256,/**< enum value is the type of Custom. */ - kPluginREC = 512,/**< enum value is the type of REC. */ - kPluginAdTracking = 1024,/**< enum value is the type of AdTracking. */ -}Plugin_type; -/**    - *  @class  AgentManager   - */ -class AgentManager -{ -public: - virtual ~AgentManager(); - /** - @brief Get singleton of AgentManager - */ - - static AgentManager* getInstance(); - /** - @brief Destory the instance of AgentManager - */ - static void end(); - - /** - @breif the init of AgentManager - @param the appKey of anysdk - @param the appSecret of anysdk - @param the privateKey of anysdk - @param the url of oauthLoginServer - @warning Must invoke this interface before loadAllPlugins - */ - void init(std::string appKey,std::string appSecret,std::string privateKey,std::string oauthLoginServer); - - /** - @brief load the plugins - */ - CC_DEPRECATED_ATTRIBUTE void loadALLPlugin(); - /** - @brief unload the plugins - */ - CC_DEPRECATED_ATTRIBUTE void unloadALLPlugin(); - - /** - @brief load the plugins - */ - void loadAllPlugins(); - - /** - @brief unload the plugins - */ - void unloadAllPlugins(); - - /** - @brief Get Analytics plugin - @return if Analytics plugin exist ,return value is Analytics plugin. - else return value is null pointer. - */ - ProtocolAnalytics* getAnalyticsPlugin(){return _pAnalytics;}; - - /** - @brief Get User plugin - @return if User plugin exist ,return value is User plugin. - else return value is null pointer. - */ - ProtocolUser* getUserPlugin(){return _pUser;}; - - /** - @brief Get YAP plugin - @return if YAP plugin exist ,return value is YAP plugin. - else return value is null pointer. - */ - std::map* getYAPPlugin(){return &_pluginsYAPMap;}; - - /** - @brief Get Share plugin - @return if Share plugin exist ,return value is Share plugin. - else return value is null pointer. - */ - ProtocolShare* getSharePlugin(){return _pShare;}; - - /** - @brief Get Social plugin - @return if Social plugin exist ,return value is Social plugin. - else return value is null pointer. - */ - ProtocolSocial* getSocialPlugin(){return _pSocial;}; - - /** - @brief Get Ads plugin - @return if Ads plugin exist ,return value is Ads plugin. - else return value is null pointer. - */ - ProtocolAds* getAdsPlugin(){return _pAds;}; - - /** - @brief Get Push plugin - @return if Push plugin exist ,return value is Push plugin. - else return value is null pointer. - */ - ProtocolPush* getPushPlugin(){return _pPush;}; - - /** - @brief Get Crash plugin - @return if Crash plugin exist ,return value is Crash plugin. - else return value is null pointer. - */ - ProtocolCrash* getCrashPlugin(){return _pCrash;}; - - /** - @brief Get Custom plugin - @return if Crash plugin exist ,return value is Custom plugin. - else return value is null pointer. - */ - ProtocolCustom* getCustomPlugin(){return _pCustom;}; - - - /** - @brief Get REC plugin - @return if REC plugin exist ,return value is REC plugin. - else return value is null pointer. - */ - ProtocolREC* getRECPlugin(){return _pREC;}; - - /** - @brief Get AdTracking plugin - @return if AdTracking plugin exist ,return value is AdTracking plugin. - else return value is null pointer. - */ - ProtocolAdTracking* getAdTrackingPlugin(){return _pAdTracking;}; - - /** - @brief Get channel ID - @return return value is channel ID. - */ - std::string getChannelId(); - - /** - @brief Get custom param - @return return value is custom param for channel. - */ - std::string getCustomParam(); - - /** - @brief Get framework version - @return return value is the version of AnySDKFramework. - */ - std::string getFrameworkVersion(); - - /** - @Title: setIsAnaylticsEnabled - @Description: choose to open or close - @param @param enabled true or false - @return void - */ - void setIsAnaylticsEnabled(bool value){bIsAnaylticsEnabled = value;}; - /** - @Title: isAnaylticsEnabled - @Description: the status of Anayltics - @param @return true or false - @return boolean - */ - bool isAnaylticsEnabled(){return bIsAnaylticsEnabled;}; - - - void loadPlugin(const char* nodeName,int type); -protected: - void setDebugMode(bool flag); - std::string getSupportPlugin(); - void release(); - - -private: - AgentManager(void); - - // Analytics plugin - ProtocolAnalytics* _pAnalytics; - - // user plugin - ProtocolUser* _pUser; - - // YAP plugins - // ProtocolYAP* _pYAP; - std::map _pluginsYAPMap; - - // Share plugin - ProtocolShare* _pShare; - - // Social plugin - ProtocolSocial* _pSocial; - - // Ads plugin - ProtocolAds* _pAds; - - // Push plugin - ProtocolPush* _pPush; - - // Crash plugin - ProtocolCrash* _pCrash; - - // Custom plugin - ProtocolCustom* _pCustom; - - // REC plugin - ProtocolREC* _pREC; - - // AdTracking plugin - ProtocolAdTracking* _pAdTracking; - - bool bIsAnaylticsEnabled; - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_AGENTMANAGER_H__ */ diff --git a/ios/include/anysdk/appstore/AnalyticsWrapper.h b/ios/include/anysdk/appstore/AnalyticsWrapper.h deleted file mode 100644 index c20d2d5b..00000000 --- a/ios/include/anysdk/appstore/AnalyticsWrapper.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// AnalyticsWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum { - ACCOUNT_TYPE_ANONYMOUS,/**< enum value is anonymous typek. */ - ACCOUNT_TYPE_REGISTED,/**< enum value is registed type. */ - ACCOUNT_TYPE_SINA_WEIBO,/**< enum value is sineweibo type. */ - ACCOUNT_TYPE_TENCENT_WEIBO,/**< enum value is tecentweibo type */ - ACCOUNT_TYPE_QQ,/**< enum value is qq type */ - ACCOUNT_TYPE_ND91,/**< enum value is nd91 type. */ -} ANALYTICS_ACCOUNT_TYPE; - -typedef enum { - ACCOUNT_OPERATE_LOGIN,/**< enum value is the login operate. */ - ACCOUNT_OPERATE_LOGOUT,/**< enum value is the logout operate. */ - ACCOUNT_OPERATE_REGISTER,/**< enum value is the register operate. */ -}ANALYTICS_ACCOUNT_OPERATE; - -typedef enum { - ACCOUNT_GENDER_MALE,/**< enum value is male. */ - ACCOUNT_GENDER_FEMALE,/**< enum value is female. */ - ACCOUNT_GENDER_UNKNOWN,/**< enum value is unknow. */ - -} ANALYTICS_ACCOUNT_GENDER; - -typedef enum { - TASK_TYPE_GUIDE_LINE,/**< enum value is the guideline type.. */ - TASK_TYPE_MAIN_LINE,/**< enum value is the mainline type.. */ - TASK_TYPE_BRANCH_LINE,/** - -@protocol CocosRuntimeSDKDelegate - -- (NSMutableArray*)getSupportForPlugins; -- (NSMutableDictionary*)getPluginParams; -- (NSString*)getDevelopInfo; - -@end - -#endif /* __CRT_SDK_DELEGATE_H */ diff --git a/ios/include/anysdk/appstore/CustomWrapper.h b/ios/include/anysdk/appstore/CustomWrapper.h deleted file mode 100644 index 2eaf6195..00000000 --- a/ios/include/anysdk/appstore/CustomWrapper.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// CustomWrapper.h -// PluginProtocol -// -// - -#import - -typedef enum -{ - CUSTOMRESULT_CUSTOMEXTENSION = 80000 /**< enum value is extension code . */ -} CUSTOM_RET_CODE; - -@interface CustomWrapper : NSObject - -/** - * The callback interface of Custom system - * - * @param pPlugin the Custom plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onCustomResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/appstore/InterfaceAdTracking.h b/ios/include/anysdk/appstore/InterfaceAdTracking.h deleted file mode 100644 index 67f4c224..00000000 --- a/ios/include/anysdk/appstore/InterfaceAdTracking.h +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAdTracking - -@required -/** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userInfo user identifier - * @return void - */ -- (void) onRegister: (NSString*) userId; - -/** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ -- (void) onLogin: (NSMutableDictionary*) userInfo; - -/** - * - * @Title: onYap - * @Description: Call this method if you want to track yap events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ -- (void) onYap: (NSMutableDictionary*) productInfo; - -/** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events as happening during a section. - * @param eventId The custom event name. - * @return void - */ -- (void) trackEvent: (NSString*) eventId; - -/** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ -- (void) trackEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceAds.h b/ios/include/anysdk/appstore/InterfaceAds.h deleted file mode 100644 index da8fba35..00000000 --- a/ios/include/anysdk/appstore/InterfaceAds.h +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAds - -@required -/** - * show advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) showAds: (NSMutableDictionary*) info; - -/** - * hide advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) hideAds: (NSMutableDictionary*) info; - -/** - * preload advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) preloadAds: (NSMutableDictionary*) info; - -/** - * query the points - * - * @return points - */ -- (float) queryPoints; - -/** - * spend user`s points - * - * @param points the points of spending - */ -- (void) spendPoints: (int) points; - -/** - * Description - * - * @param adType the type of advertising - * - * @return if the type is supported ,return true - or if the type is supported ,return false - */ -- (BOOL) isAdTypeSupported: (int)adType; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceAnalytics.h b/ios/include/anysdk/appstore/InterfaceAnalytics.h deleted file mode 100644 index 230e4c5a..00000000 --- a/ios/include/anysdk/appstore/InterfaceAnalytics.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAnalytics - -@required -/** - * start session analytics - */ -- (void) startSession; - -/** - * stop session analytics - */ -- (void) stopSession; - -/** - * Set the timeout for expiring a session. - * - * @param millis In milliseconds as the unit of time. - * @note It must be invoked before calling startSession. - */ -- (void) setSessionContinueMillis: (long) millis; - -/** - * Whether to catch uncaught exceptions to server. - * - * @warning This interface only worked on android. - */ -- (void) setCaptureUncaughtException: (BOOL) isEnabled; - -/** - * log an error - * - * @param errorId The identity of event - * @param message message for the error - */ -- (void) logError: (NSString*) errorId withMsg:(NSString*) message; - -/** - * log an event - * - * @param eventId The identity of event - */ -- (void) logEvent: (NSString*) eventId; - -/** - * log an event - * - * @param eventId The identity of event - * @param paramMap Extern parameters of the event - */ -- (void) logEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap; - -/** - * Track an event begin - * - * @param eventId The identity of event - */ -- (void) logTimedEventBegin: (NSString*) eventId; - -/** - * Track an event end. - * - * @param eventId The identity of event - */ -- (void) logTimedEventEnd: (NSString*) eventId; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceCrash.h b/ios/include/anysdk/appstore/InterfaceCrash.h deleted file mode 100644 index 669cdd1f..00000000 --- a/ios/include/anysdk/appstore/InterfaceCrash.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012+2013 cocos2d+x.org - - http://www.cocos2d+x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -@protocol InterfaceCrash - -@required - -/** - * set user identifier - * - * @param userInfo - */ -- (void) setUserIdentifier: (NSString*)identifier ; - -/** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ -- (void) reportException: (NSString*)message exception:(NSString*)exception; - -/** - * customize logging - * - * @param string Custom log - */ -- (void) leaveBreadcrumb: (NSString*)breadcrumb; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceCustom.h b/ios/include/anysdk/appstore/InterfaceCustom.h deleted file mode 100644 index ea99750d..00000000 --- a/ios/include/anysdk/appstore/InterfaceCustom.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceCustom - -@required -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - - - -@end diff --git a/ios/include/anysdk/appstore/InterfacePush.h b/ios/include/anysdk/appstore/InterfacePush.h deleted file mode 100644 index 346bd863..00000000 --- a/ios/include/anysdk/appstore/InterfacePush.h +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfacePush - -@required -/** - * start push service - */ -- (void) startPush; - -/** - * close push service - */ -- (void) closePush; - -/** - * set alias - * - * @param alias the value of alias - */ -- (void) setAlias: (NSString*)alias; - -/** - * delete alias - * - * @param alias the value of alias - */ -- (void) delAlias: (NSString*)alias; - -/** - * set tags - * - * @param tags the content of tags - */ -- (void) setTags: (NSMutableArray*)tags; - -/** - * delete tags - * - * @param tags the content of tags - */ -- (void) delTags: (NSMutableArray*)tags; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceREC.h b/ios/include/anysdk/appstore/InterfaceREC.h deleted file mode 100644 index 43cb4635..00000000 --- a/ios/include/anysdk/appstore/InterfaceREC.h +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceREC - -@required - -/** - * - * @Title: startRecording - * @Description: Start to record video - * @param @return None - * @return void - * @throws - */ -- (void) startRecording; - -/** - * - * @Title: stopRecording - * @Description: Stop to record video - * @param @return None - * @return void - * @throws - */ -- (void) stopRecording; - -/** - * - * @Title: share - * @Description: share video - * @param @param info the info of video - * @return void - * @throws - */ -- (void) share:(NSMutableDictionary *) info; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceShare.h b/ios/include/anysdk/appstore/InterfaceShare.h deleted file mode 100644 index b4cb21da..00000000 --- a/ios/include/anysdk/appstore/InterfaceShare.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceShare - -@required -/** - * share - * - * @param shareInfo the content of share - * @note the description is subject to the wiki(http://docs.anysdk.com/YAPSystem#.E6.94.AF.E4.BB.98) - */ -- (void) share: (NSMutableDictionary*) shareInfo; -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceSocial.h b/ios/include/anysdk/appstore/InterfaceSocial.h deleted file mode 100644 index 6f0a4e71..00000000 --- a/ios/include/anysdk/appstore/InterfaceSocial.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceSocial - -/** - * login in socail system - */ -- (void) signIn; - -/** - * logout in socail system - */ -- (void) signOut; -/** - * submit the socre for leaderboard - * - * @param leaderboardID the identifier of leaderboard - * @param score the score - */ -- (void) submitScore: (NSString*) leaderboardID withScore: (long) score; - -/** - * show the leaderboard - * - * @param leaderboardID the identifier of leaderboard - */ -- (void) showLeaderboard: (NSString*) leaderboardID; - -/** - * unlock achievements of game - * - * @param achInfo the content of achievement - */ -- (void) unlockAchievement: (NSMutableDictionary*) achInfo; - -/** - * show achievements of game - */ -- (void) showAchievements; -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceUser.h b/ios/include/anysdk/appstore/InterfaceUser.h deleted file mode 100644 index f415e364..00000000 --- a/ios/include/anysdk/appstore/InterfaceUser.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceUser - -@required -/** - * user login - */ -- (void) login; - -/** - * get the status of login - * - * @return status of login - */ -- (BOOL) isLogined; - -/** - * get user identifier - * - * @return user identifier - */ -- (NSString*) getUserID; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * get the identifier of plugin - * - * @return the identifier of plugin - */ -- (NSString*) getPluginId; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - - -@end diff --git a/ios/include/anysdk/appstore/InterfaceYAP.h b/ios/include/anysdk/appstore/InterfaceYAP.h deleted file mode 100644 index 5897d087..00000000 --- a/ios/include/anysdk/appstore/InterfaceYAP.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceYAP - -@required -/** - * yap for product - * - * @param profuctInfo the information of the product - key:Product_Id value: the identifier of product - key:Product_Name value: the name of product - key:Product_Price value: the price of product, denominated as the yuan. - key:Product_Count value: the count of product - key:Role_Id value:the identifier of role - key:Role_Name value: the name of role - key:Role_Grade value: the grade of role - key:Role_Balance value: the virtual currency amount of role - key:Server_Id value: the identifier of yaping server - key:EXT value: Extended Parameters - * @note the rule of production maybe changes,please the description is subject to the wiki(http://docs.anysdk.com/YAPSystem#.E6.94.AF.E4.BB.98) - */ -- (void) yapForProduct: (NSMutableDictionary*) productInfo; - -/** - * get the order identifier - * - * @return the order identifier - */ -- (NSString*) getOrderId; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * get the identifier of plugin - * - * @return the identifier of plugin - */ -- (NSString*) getPluginId; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/appstore/JSBRelation.h b/ios/include/anysdk/appstore/JSBRelation.h deleted file mode 100644 index 7775b0dc..00000000 --- a/ios/include/anysdk/appstore/JSBRelation.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file JSBRelation.h - */ -#ifndef __CCX_JSBRELATION_H__ -#define __CCX_JSBRELATION_H__ - -#include "PluginProtocol.h" -#include -#include -#include - -using namespace std; - -namespace anysdk { namespace framework { - -/**    - *  @class  JSBRelation   - */ -class JSBRelation -{ -public: - static string getMethodsOfPlugin(PluginProtocol* plugin); - - - - -private: -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_JSBRELATION_H__ */ diff --git a/ios/include/anysdk/appstore/JsonParser.h b/ios/include/anysdk/appstore/JsonParser.h deleted file mode 100644 index c9f4b127..00000000 --- a/ios/include/anysdk/appstore/JsonParser.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// JsonParser.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-17. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -@interface JsonParser : NSObject - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key __attribute__((deprecated)); - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key key2:(NSString*)key2 __attribute__((deprecated)); - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key key2:(NSString*)key2 key3:(NSString*)key3 __attribute__((deprecated)); - - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key __attribute__((deprecated)); - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key key2:(const char*)key2 __attribute__((deprecated)); - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key key2:(const char*)key2 key3:(const char*)key3 __attribute__((deprecated)); - -@end diff --git a/ios/include/anysdk/appstore/PluginApplicationDelegate.h b/ios/include/anysdk/appstore/PluginApplicationDelegate.h deleted file mode 100644 index 2af498ee..00000000 --- a/ios/include/anysdk/appstore/PluginApplicationDelegate.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#import -@protocol PluginApplicationDelegate - -@optional -//about user system - -- (void)applicationDidEnterBackground:(UIApplication *)application ; -- (void)applicationWillEnterForeground:(UIApplication *)application ; - - -//about yap system -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation ; - -- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url; - - -//about push system -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken ; - -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; - -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler ; - - - -@end diff --git a/ios/include/anysdk/appstore/PluginFactory.h b/ios/include/anysdk/appstore/PluginFactory.h deleted file mode 100644 index 79922c97..00000000 --- a/ios/include/anysdk/appstore/PluginFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGIN_FACTORY_H__ -#define __CCX_PLUGIN_FACTORY_H__ - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginManager; -/**    - *  @class  PluginFactory   - */ -class PluginFactory -{ -public: - virtual ~PluginFactory(); - /** - @brief Get singleton of PluginFactory - */ - static PluginFactory* getInstance(); - - /** - @brief Destory the instance of PluginFactory - */ - static void purgeFactory(); - -private: - friend class PluginManager; - PluginFactory(void); - - /** - @brief create the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* createPlugin(const char* name, int pluginType); -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_FACTORY_H__ */ diff --git a/ios/include/anysdk/appstore/PluginHelper.h b/ios/include/anysdk/appstore/PluginHelper.h deleted file mode 100644 index 406fc278..00000000 --- a/ios/include/anysdk/appstore/PluginHelper.h +++ /dev/null @@ -1,130 +0,0 @@ -// -// PluginHelper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import - -@interface PluginHelper : NSObject - -/** - * get the parameters of SDK - * - * @return the parameters of SDK - */ -+ (NSMutableDictionary*) getParamsInfo; - -/** - * - * @Title: getDebugModeStatus - * @Description: get the status of DebugMode - * @param @return status - * @return BOOL yes or no - */ -+ (BOOL) getDebugModeStatus; - -/** - * - * @Title: getLogLevel - * @Description: get the level of log - * @param @return level - * @return "verbose" "debug" "info" "warning" "error" - */ -+ (NSString*) getLogLevel; - -/** - * get the status of network - * - * @return if the network is reachable ,return true - or if the network is reachable,return false - */ -+ (BOOL) networkReachable; - -/** - * get current RootViewController - * - * @return RootViewController - */ -+ (UIViewController *)getCurrentRootViewController; - -/** - * network transmission in plugin - * - * @param data content transmitted over the network - * @param target callback object - * @param sel callback function - * @note the content must contain the value that key is "server_url" - * @note http use post - */ -+ (void) pluginHttp:(NSMutableDictionary*)data target:(id)target sel:(SEL)sel; - -/** - * log output ,the lever is verbose - * - * @param message the message about this log - */ -+ (void) logVerbose:(NSString*)format,...; - -/** - * log output ,the lever is error - * - * @param message the message about this log - */ -+ (void) logError:(NSString*)format,...; - - -/** - * log output ,the lever is debug - * - * @param message the message about this log - */ -+ (void) logDebug:(NSString*)format,...; - -/** - * log output ,the lever is info - * - * @param message the message about this log - */ -+ (void) logInfo:(NSString*)format,...; - -/** - * get the game identifier - * - * @return name - */ -+ (NSString*) getGameId; - -/** - * get the application name - * - * @return name - */ -+ (NSString*) getApplicationName; - -/** - * get the application orientation - * - * @return multiple orientation - */ -+ (NSArray*) getApplicationOrientation; - - -/** - * get the application version - * - * @return version - */ -+ (NSString*) getApplicationVersion; - -/** - * Parsing XML file - * @param the name of XML file - * @return NSMutableDictionary the content of XML file - */ -+ (NSMutableDictionary*) getXMLInfoByFileName:(NSString*)fileName; - -@end \ No newline at end of file diff --git a/ios/include/anysdk/appstore/PluginManager.h b/ios/include/anysdk/appstore/PluginManager.h deleted file mode 100644 index 93282ae7..00000000 --- a/ios/include/anysdk/appstore/PluginManager.h +++ /dev/null @@ -1,51 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGINMANAGER_H__ -#define __CCX_PLUGINMANAGER_H__ - -#include "PluginProtocol.h" -#include "PluginFactory.h" -#include -#include - -namespace anysdk { namespace framework { - -/**    - *  @class  PluginManager   - */ -class PluginManager -{ -public: - virtual ~PluginManager(); - /** - @brief Get singleton of PluginManager - */ - static PluginManager* getInstance(); - /** - @brief Destory the instance of PluginManager - */ - static void end(); - - /** - @brief load the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* loadPlugin(const char* name, int pluginType); - /** - @brief unload the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - void unloadPlugin(const char* name, int pluginType = 0); - - -private: - PluginManager(void); - std::map _pluginsMap; -// bool _isDebug; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGINMANAGER_H__ */ diff --git a/ios/include/anysdk/appstore/PluginParam.h b/ios/include/anysdk/appstore/PluginParam.h deleted file mode 100644 index 1f35d4a7..00000000 --- a/ios/include/anysdk/appstore/PluginParam.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file PluginParam.h - */ -#ifndef __CCX_PLUGIN_PARAM_H__ -#define __CCX_PLUGIN_PARAM_H__ - -#include -#include -/// \typedef std::map StringMap -/// typedef YString. -typedef std::map StringMap; - -namespace anysdk { namespace framework { - -class PluginProtocol; -/**    - *  @class  PluginParam   - */ -class PluginParam -{ -public: - /** - @brief the default constructor of PluginParam - */ - PluginParam(); - - virtual ~PluginParam(); - /** - @brief the constructor of PluginParam - @param the value is Integer - */ - PluginParam(int nValue); - /** - @brief the constructor of PluginParam - @param the value is float - */ - PluginParam(float fValue); - /** - @brief the constructor of PluginParam - @param the value is boolean - */ - PluginParam(bool bValue); - /** - @brief the default constructor of PluginParam - @param the value is char - */ - PluginParam(const char* strValue); - /** - @brief the default constructor of PluginParam - @param the value is StringMap - */ - PluginParam(StringMap strMapValue); - - typedef enum{ - kParamTypeNull = 0, - kParamTypeInt, - kParamTypeFloat, - kParamTypeBool, - kParamTypeString, - kParamTypeStringMap, - kParamTypeMap, - } ParamType; - /** - @brief get the ParamType of value - */ - inline ParamType getCurrentType() { - return _type; - } - /** - @brief get the int value - */ - inline int getIntValue() { - return _intValue; - } - /** - @brief get the float value - */ - inline float getFloatValue() { - return _floatValue; - } - /** - @brief get the boolean value - */ - inline bool getBoolValue() { - return _boolValue; - } - /** - @brief get the char value - */ - inline const char* getStringValue() { - return _strValue.c_str(); - } - /** - @brief get the map of value - */ - inline std::map getMapValue() { - return _mapValue; - } - /** - @brief get the StringMap value - */ - inline StringMap getStrMapValue() { - return _strMapValue; - } - -private: - friend class PluginProtocol; - /** - @brief the constructor of PluginParam - @param the map of value - */ - PluginParam(std::map mapValue); - -private: - ParamType _type; - - int _intValue; - float _floatValue; - bool _boolValue; - std::string _strValue; - std::map _mapValue; - StringMap _strMapValue; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_PARAM_H__ */ diff --git a/ios/include/anysdk/appstore/PluginProtocol.h b/ios/include/anysdk/appstore/PluginProtocol.h deleted file mode 100644 index 95cf706d..00000000 --- a/ios/include/anysdk/appstore/PluginProtocol.h +++ /dev/null @@ -1,144 +0,0 @@ -/** @file PluginProtocol.h - */ -#ifndef __CCX_IPLUGIN_H__ -#define __CCX_IPLUGIN_H__ - -#include "PluginParam.h" -#include - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher -#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else -#define CC_DEPRECATED_ATTRIBUTE -#endif - -namespace anysdk { namespace framework { - -/** - * @class PluginProtocol - * @brief The super class for all plugins. - */ -class PluginProtocol -{ -public: - virtual ~PluginProtocol() {}; - - /** - *@brief set plugin name - *@param the name of plugin - */ - virtual void setPluginName(const char* name) = 0 ; - /** - *@brief get plugin name - *@return the name of plugin - */ - virtual const char* getPluginName() = 0 ; - - /** - *@brief get the version of plugin - *@return the version of plugin - */ - virtual std::string getPluginVersion(); - /** - *@brief get the version of sdk - *@return the version of sdk - */ - virtual std::string getSDKVersion(); - - /** - *@brief switch debug plug-in on/off - *@param the value of on/off - */ - CC_DEPRECATED_ATTRIBUTE virtual void setDebugMode(bool bDebug); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return void - */ - virtual void callFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return void - */ - virtual void callFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, std::vector params); - - /** - @brief Check function the plugin support or not - @param the name of plugin - @return if the function support ,return true - else retur false - */ - virtual bool isFunctionSupported(std::string functionName); - - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_IPLUGIN_H__ */ diff --git a/ios/include/anysdk/appstore/PluginWrapper.h b/ios/include/anysdk/appstore/PluginWrapper.h deleted file mode 100644 index 6aa8ee94..00000000 --- a/ios/include/anysdk/appstore/PluginWrapper.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// PluginWrapper.h -// PluginProtocol -// -#import - -#import -#import "PluginApplicationDelegate.h" -@interface PluginWrapper : NSObject - -@property (nonatomic, strong) NSMutableArray * arrayDelegate; - -+ (PluginWrapper*) getInstance; - -- (void) setDelegate:(id)delegate; - -//about user system - -- (void)applicationDidEnterBackground:(UIApplication *)application ; -- (void)applicationWillEnterForeground:(UIApplication *)application ; - -//about yap system -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation ; - -- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url; - - -//about push system -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken ; - -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ; - -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; - -@end diff --git a/ios/include/anysdk/appstore/ProtocolAdTracking.h b/ios/include/anysdk/appstore/ProtocolAdTracking.h deleted file mode 100644 index 402cc271..00000000 --- a/ios/include/anysdk/appstore/ProtocolAdTracking.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file ProtocolAdTracking.h - */ -#ifndef __CCX_PROTOCOL_ADTRACKING_H__ -#define __CCX_PROTOCOL_ADTRACKING_H__ - -#include "PluginProtocol.h" -#include -namespace anysdk { namespace framework { -/**    - *@class  ProtocolAdTracking - *@brief the interface of AdTracking   - */ -class ProtocolAdTracking : public PluginProtocol -{ -public: - - /** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userId user identifier - * @return void - */ - virtual void onRegister(const char* userId) = 0; - - /** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onLogin(std::map userInfo) = 0; - - /** - * - * @Title: onYap - * @Description: Call this method if you want to track yap events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onYap(std::map productInfo) = 0; - - /** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ - virtual void trackEvent(const char* eventId, std::map* paramMap = NULL) = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_ADTRACKING_H__ ----- */ diff --git a/ios/include/anysdk/appstore/ProtocolAds.h b/ios/include/anysdk/appstore/ProtocolAds.h deleted file mode 100644 index e54d9f2f..00000000 --- a/ios/include/anysdk/appstore/ProtocolAds.h +++ /dev/null @@ -1,133 +0,0 @@ -/** @file ProtocolAds.h - */ -#ifndef __CCX_PROTOCOL_ADS_H__ -#define __CCX_PROTOCOL_ADS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TAdsDeveloperInfo -/// typedef TAdsDeveloperInfo. -typedef std::map TAdsDeveloperInfo; -/// \typedef std::map TAdsInfo -/// typedef TAdsInfo. -typedef std::map TAdsInfo; -/** @brief AdsResultCode enum, with inline docs */ -typedef enum -{ - kAdsReceived = 0, /**< enum the callback: the ad is received is at center. */ - - kAdsShown, /**< enum the callback: the advertisement dismissed. */ - kAdsDismissed, /**< enum the callback: the advertisement dismissed. */ - - kPointsSpendSucceed, /**< enum the callback: the points spend succeed. */ - kPointsSpendFailed, /**< enum the callback: the points spend failed. */ - - kNetworkError, /**< enum the callback of Network error at center. */ - kUnknownError, /**< enum the callback of Unknown error. */ - kOfferWallOnPointsChanged, /**< enum the callback of Changing the point of offerwall. */ - kRewardedVideoWithReward,/**< enum the callback of receiving the reward of rewardedvideo. */ - kInAppPurchaseFinished,/**< enum the callback of finishing YAP ad. */ - kAdsClicked,/**< enum the callback of the advertisement clicked. */ - kAdsExtension = 40000 /**< enum value is extension code . */ -} AdsResultCode; -/** @brief AdsPos enum, with inline docs */ -typedef enum { - kPosCenter = 0,/**< enum the toolbar is at center. */ - kPosTop,/**< enum the toolbar is at top. */ - kPosTopLeft,/**< enum the toolbar is at topleft. */ - kPosTopRight,/**< enum the toolbar is at topright. */ - kPosBottom,/**< enum the toolbar is at bottom. */ - kPosBottomLeft,/**< enum the toolbar is at bottomleft. */ - kPosBottomRight,/**< enum the toolbar is at bottomright. */ -} AdsPos; -/** @brief AdsType enum, with inline docs */ -typedef enum { - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL,/**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED,/**< enum value is Native advanced ads . */ -} AdsType; - -class ProtocolAds; -class AdsListener -{ -public: - /** - *@brief The advertisement request result - *@param the id of callback - *@param the information of callback - */ - virtual void onAdsResult(AdsResultCode code, const char* msg) = 0; -}; - -class ProtocolAds : public PluginProtocol -{ -public: - - - - /** - @brief show adview - @param the type of ads - @param the idx of ads - */ - virtual void showAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief Hide the adview - @param the type of ads - @param the idx of ads - */ - virtual void hideAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief preload the adview - @param the type of ads - @param the idx of ads - */ - virtual void preloadAds(AdsType adsType, int idx = 1)= 0; - - /** - *@brief Query the points of player - *@return the point - */ - virtual float queryPoints() = 0; - - /** - *@brief Spend the points. - Use this method to notify server spend points. - *@param points Need spend number of points - */ - virtual void spendPoints(int points) = 0; - - /** - @brief set the Ads listener - @param pListener The callback object for Ads result - */ - virtual void setAdsListener(AdsListener* listener) = 0; - - /** - @brief get pListener The callback object for Ads result - @return the listener - */ - virtual AdsListener* getAdsListener() = 0; - - /** - @brief Is it supportive of this type of ads - @param the type of ads - @return if it is supportive ,return true - else retur false - */ - virtual bool isAdTypeSupported(AdsType adType) = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_ADS_H__ */ diff --git a/ios/include/anysdk/appstore/ProtocolAnalytics.h b/ios/include/anysdk/appstore/ProtocolAnalytics.h deleted file mode 100644 index ce3372d6..00000000 --- a/ios/include/anysdk/appstore/ProtocolAnalytics.h +++ /dev/null @@ -1,107 +0,0 @@ -/** @file ProtocolAnalytics.h - */ -#ifndef __CCX_PROTOCOL_ANALYTICS_H__ -#define __CCX_PROTOCOL_ANALYTICS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map LogEventParamPair -/// typedef LogEventParamPair. -typedef std::pair< std::string, std::string > LogEventParamPair; -/// \typedef std::map LogEventParamMap -/// typedef LogEventParamMap. -typedef std::map< std::string, std::string > LogEventParamMap; -typedef enum { - ANONYMOUS,/**< enum value is anonymous typek. */ - REGISTED,/**< enum value is registed type. */ - SINA_WEIBO,/**< enum value is sineweibo type. */ - TENCENT_WEIBO,/**< enum value is tecentweibo type */ - QQ,/**< enum value is qq type */ - ND91,/**< enum value is nd91 type. */ -} AccountType; -typedef enum { - LOGIN,/**< enum value is the login operate. */ - LOGOUT,/**< enum value is the logout operate. */ - REGISTER,/**< enum value is the register operate. */ -} AccountOperate; -typedef enum { - MALE,/**< enum value is male. */ - FEMALE,/**< enum value is female. */ - UNKNOWN,/**< enum value is unknow. */ - -} AccountGender; -typedef enum { - GUIDE_LINE,/**< enum value is the guideline type.. */ - MAIN_LINE,/**< enum value is the mainline type.. */ - BRANCH_LINE,/** -#include - -namespace anysdk { namespace framework { - -class ProtocolCrash : public PluginProtocol -{ -public: - /** - * set user identifier - * - * @param userInfo - */ - virtual void setUserIdentifier(const char* identifier) = 0; - - /** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ - virtual void reportException(const char* message, const char* exception) = 0; - - /** - * customize logging - * - * @param string Custom log - */ - virtual void leaveBreadcrumb(const char* breadcrumb) = 0; - - - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_CRASH_H__ */ diff --git a/ios/include/anysdk/appstore/ProtocolCustom.h b/ios/include/anysdk/appstore/ProtocolCustom.h deleted file mode 100644 index dc92558e..00000000 --- a/ios/include/anysdk/appstore/ProtocolCustom.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file ProtocolCustom.h - */ -#ifndef __CCX_PROTOCOL_CUSTOM_H__ -#define __CCX_PROTOCOL_CUSTOM_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -typedef enum -{ - kCustomExtension = 80000 /**< enum value is extension code . */ -} CustomResultCode; -/**    - *@class  CustomResultListener - *@brief the interface of share callback   - */ -class CustomResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onCustomResult(CustomResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolCustom - *@brief the interface of custom   - */ -class ProtocolCustom : public PluginProtocol -{ -public: - - /** - @breif set the result listener - @param pListener The callback object for custom result - @wraning Must invoke this interface before custom - */ - virtual void setResultListener(CustomResultListener* pListener) = 0; - - virtual CustomResultListener* getCustomListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_Custom_H__ ----- */ diff --git a/ios/include/anysdk/appstore/ProtocolPush.h b/ios/include/anysdk/appstore/ProtocolPush.h deleted file mode 100644 index e9e2fac8..00000000 --- a/ios/include/anysdk/appstore/ProtocolPush.h +++ /dev/null @@ -1,104 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PROTOCOL_PUSH_H__ -#define __CCX_PROTOCOL_PUSH_H__ - -#include "PluginProtocol.h" -#include -#include -#include -using namespace std; - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kPushReceiveMessage = 0,/**value is callback of Receiving Message . */ - kPushExtensionCode = 60000 /**< enum value is extension code . */ - - -} PushActionResultCode; -class ProtocolPush; -/**    - *@class  PushActionListener - *@brief the interface of Push callback   - */ -class PushActionListener -{ -public: - /**    - *@brief the interface of Push callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolPush* pPlugin, PushActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolPush   - */ -class ProtocolPush : public PluginProtocol -{ -public: - - - /** - *@brief start/register Push services - *@return void - */ - virtual void startPush() = 0 ; - - - /** - *@brief close Push services - *@return void - */ - virtual void closePush() = 0 ; - - - /** - *@brief set alias - *@param tags - *@return void - */ - virtual void setAlias(string alias) = 0; - - /** - *@brief del alias - *@param tags - *@return void - */ - virtual void delAlias(string alias) = 0; - - /** - *@brief set tag - *@param tags - *@return void - */ - virtual void setTags(list tags) = 0; - - /** - *@brief delete tag - *@param tags - *@return void - */ - virtual void delTags(list tags) = 0; - - /** - @brief set the result listener - @param pListener The callback object for push result - */ - virtual void setActionListener(PushActionListener* listener) = 0 ; - - /** - @brief get pListener The callback object for Push result - @return the listener - */ - virtual PushActionListener* getActionListener() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_PUSH_H__ */ diff --git a/ios/include/anysdk/appstore/ProtocolREC.h b/ios/include/anysdk/appstore/ProtocolREC.h deleted file mode 100644 index b0db2c0d..00000000 --- a/ios/include/anysdk/appstore/ProtocolREC.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file ProtocolREC.h - */ -#ifndef __CCX_PROTOCOL_REC_H__ -#define __CCX_PROTOCOL_REC_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { - -typedef std::map TVideoInfo; - -/** @brief RECResultCode enum, with inline docs */ -typedef enum -{ - kRECInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk . */ - kRECInitFail,/**< enum value is callback of failing to init sdk. */ - kRECStartRecording,/**< enum value is callback of starting to record. */ - kRECStopRecording,/**< enum value is callback of stoping to record. */ - kRECPauseRecording,/**< enum value is callback of pausing to record. */ - kRECResumeRecording,/**< enum value is callback of resuming to record. */ - kRECEnterSDKPage,/**< enum value is callback of entering SDK`s page. */ - kRECQuitSDKPage,/**< enum value is callback of quiting SDK`s page. */ - kRECShareSuccess,/**< enum value is callback of succeeding in sharing. */ - kRECShareFail,/**< enum value is callback of failing to share. */ - kRECExtension = 90000 /**< enum value is extension code . */ -} RECResultCode; -/**    - *@class  RECResultListener - *@brief the interface of REC callback   - */ -class RECResultListener -{ -public: - /**    - *@brief the interface of REC callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onRECResult(RECResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolREC - *@brief the interface of REC   - */ -class ProtocolREC : public PluginProtocol -{ -public: - - /** - * @Description: Start to record video - */ - virtual void startRecording() = 0; - - /** - * @Description: Stop to record video - */ - virtual void stopRecording() = 0; - - /** - * @Description: share video - * @Param info The info of share - */ - virtual void share(TVideoInfo info) = 0; - - - - /** - @breif set the result listener - @param pListener The callback object for REC result - @wraning Must invoke this interface before REC - */ - virtual void setResultListener(RECResultListener* pListener) = 0; - - virtual RECResultListener* getRECListener() = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/ios/include/anysdk/appstore/ProtocolShare.h b/ios/include/anysdk/appstore/ProtocolShare.h deleted file mode 100644 index 2215a4ff..00000000 --- a/ios/include/anysdk/appstore/ProtocolShare.h +++ /dev/null @@ -1,72 +0,0 @@ -/** @file ProtocolShare.h - */ -#ifndef __CCX_PROTOCOL_SHARE_H__ -#define __CCX_PROTOCOL_SHARE_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TShareDeveloperInfo -/// typedef TShareDeveloperInfo. -typedef std::map TShareDeveloperInfo; -/// \typedef std::map TShareInfo -/// typedef TShareInfo. -typedef std::map TShareInfo; -/** @brief ShareResultCode enum, with inline docs */ -typedef enum -{ - kShareSuccess = 0,/**< enum value is callback of failing to sharing . */ - kShareFail,/**< enum value is callback of failing to share . */ - kShareCancel,/**< enum value is callback of canceling to share . */ - kShareNetworkError,/**< enum value is callback of network error . */ - kShareExtension = 10000 /**< enum value is extension code . */ -} ShareResultCode; -/**    - *@class  ShareResultListener - *@brief the interface of share callback   - */ -class ShareResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onShareResult(ShareResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolShare - *@brief the interface of share   - */ -class ProtocolShare : public PluginProtocol -{ -public: - - - - /** - @brief share information - @param info The info of share, contains key: - SharedText The text need to share - SharedImagePath The full path of image file need to share (optinal) - @warning For different plugin, the parameter should have other keys to share. - Look at the manual of plugins. */ - virtual void share(TShareInfo info) = 0; - - /** - @breif set the result listener - @param pListener The callback object for share result - @wraning Must invoke this interface before share - */ - virtual void setResultListener(ShareResultListener* pListener) = 0; - - virtual ShareResultListener* getShareListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/ios/include/anysdk/appstore/ProtocolSocial.h b/ios/include/anysdk/appstore/ProtocolSocial.h deleted file mode 100644 index 3fa5639b..00000000 --- a/ios/include/anysdk/appstore/ProtocolSocial.h +++ /dev/null @@ -1,105 +0,0 @@ -/** @file ProtocolSocial.h - */ -#ifndef __CCX_PROTOCOL_SOCIAL_H__ -#define __CCX_PROTOCOL_SOCIAL_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TSocialDeveloperInfo -/// typedef TSocialDeveloperInfo. -typedef std::map TSocialDeveloperInfo; -/// \typedef std::map TAchievementInfo -/// typedef TAchievementInfo. -typedef std::map TAchievementInfo; -/** @brief SocialRetCode enum, with inline docs */ -typedef enum -{ - // code for leaderboard feature - kScoreSubmitSucceed =1,/**< enum value is callback of succeeding in submiting. */ - kScoreSubmitfail,/**< enum value is callback of failing to submit . */ - - // code for achievement feature - kAchUnlockSucceed,/**< enum value is callback of succeeding in unlocking. */ - kAchUnlockFail,/**< enum value is callback of failing to unlock. */ - - kSocialSignInSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignInFail,/**< enum value is callback of failing to login. */ - - kSocialSignOutSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignOutFail,/**< enum value is callback of failing to login. */ - kSocialGetGameFriends,/**< enum value is callback of getGameFriends. */ - kSocialExtensionCode = 20000 /**< enum value is extension code . */ - -} SocialRetCode; -/**    - *@class  SocialListener - *@brief the interface of social callback   - */ -class SocialListener -{ -public: - /**    - *@brief the interface of social callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onSocialResult(SocialRetCode code, const char* msg) = 0; -}; - -/**    - *@class  ProtocolSocial - *@brief the interface of social   - */ -class ProtocolSocial : public PluginProtocol -{ -public: - - /** - @brief user signIn - */ - virtual void signIn() = 0; - - /** - @brief user signOut - */ - virtual void signOut() = 0; - - /** - @brief submit the score - @param leaderboardID - @param the score - */ - virtual void submitScore(const char* leadboardID, long score) = 0; - /** - @brief show the id of Leaderboard page - @param leaderboardID - */ - virtual void showLeaderboard(const char* leaderboardID) = 0; - - /** - @brief methods of achievement feature - @param the info of achievement - */ - virtual void unlockAchievement(TAchievementInfo achInfo) = 0; - /** - @brief show the page of achievements - */ - virtual void showAchievements() = 0; - /** - @brief set pListener The callback object for social result - @param the listener - */ - virtual void setListener(SocialListener* listener) = 0; - /** - @brief get pListener The callback object for social result - @return the listener - */ - virtual SocialListener* getListener() = 0; -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SOCIAL_H__ ----- */ diff --git a/ios/include/anysdk/appstore/ProtocolUser.h b/ios/include/anysdk/appstore/ProtocolUser.h deleted file mode 100644 index 387fb9e8..00000000 --- a/ios/include/anysdk/appstore/ProtocolUser.h +++ /dev/null @@ -1,135 +0,0 @@ -/** @file ProtocolUser.h - */ -#ifndef __CCX_PROTOCOL_USER_H__ -#define __CCX_PROTOCOL_USER_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TUserDeveloperInfo -/// typedef TUserDeveloperInfo. -typedef std::map TUserDeveloperInfo; -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk. */ - kInitFail,/**< enum value is callback of failing to init sdk. */ - kLoginSuccess,/**< enum value is callback of succeeding in login.*/ - kLoginNetworkError,/**< enum value is callback of network error*/ - kLoginNoNeed,/**< enum value is callback of no need login.*/ - kLoginFail,/**< enum value is callback of failing to login. */ - kLoginCancel,/**< enum value is callback of canceling to login. */ - kLogoutSuccess,/**< enum value is callback of succeeding in logout. */ - kLogoutFail,/**< enum value is callback of failing to logout. */ - kPlatformEnter,/**< enum value is callback after enter platform. */ - kPlatformBack,/**< enum value is callback after exit antiAddiction. */ - kPausePage,/**< enum value is callback after exit pause page. */ - kExitPage,/**< enum value is callback after exit exit page. */ - kAntiAddictionQuery,/**< enum value is callback after querying antiAddiction. */ - kRealNameRegister,/**< enum value is callback after registering realname. */ - kAccountSwitchSuccess,/**< enum value is callback of succeeding in switching account. */ - kAccountSwitchFail,/**< enum value is callback of failing to switch account. */ - kOpenShop,/**< enum value is callback of open the shop. */ - kAccountSwitchCancel,/**< enum value is callback of canceling to switch account. */ - kGameExitPage,/**< enum value is callback of no channel exit page. */ - kUserExtension = 50000 /**< enum value is extension code . */ - - -} UserActionResultCode; -/** @brief ToolBarPlace enum, with inline docs */ -typedef enum -{ - kToolBarTopLeft = 1,/**< enum the toolbar is at topleft. */ - kToolBarTopRight,/**< enum the toolbar is at topright. */ - kToolBarMidLeft,/**< enum the toolbar is at midleft. */ - kToolBarMidRight,/**< enum the toolbar is at midright. */ - kToolBarBottomLeft,/**< enum the toolbar is at bottomleft. */ - kToolBarBottomRight,/**< enum the toolbar is at bottomright. */ -} ToolBarPlace; - -class ProtocolUser; -/**    - *@class  UserActionListener - *@brief the interface of user callback   - */ -class UserActionListener -{ -public: - /**    - *@brief the interface of user callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolUser* pPlugin, UserActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolUser   - */ -class ProtocolUser : public PluginProtocol -{ -public: - - - /** - @brief User login - */ - virtual void login() = 0 ; - - /** - @brief User login - if the process of logining need to know the param of server_id , - you can use the function - and if you must change oauthloginserver, you can add the param of oauthLoginServer - @param server_id - @param oauthLoginServer - */ - - CC_DEPRECATED_ATTRIBUTE virtual void login(std::string server_id, std::string oauthLoginServer = "") = 0 ; - - /** - @brief User login - if the process of logining need to know the parameters , - you can use the function - @param the parameters - */ - virtual void login(std::map info) = 0 ; - - /** - @brief Check whether the user logined or not - @return If user logined, return value is true; - else return value is false. - */ - virtual bool isLogined() = 0 ; - - /** - @brief Get USER ID - @return If user logined, return value is userID; - else return value is empty string. - */ - virtual std::string getUserID() = 0 ; - /** - @brief set the result listener - @param pListener The callback object for user result - */ - virtual void setActionListener(UserActionListener* listener) = 0 ; - /** - @brief get pListener The callback object for user result - @return the listener - */ - virtual UserActionListener* getActionListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_USER_H__ */ diff --git a/ios/include/anysdk/appstore/ProtocolYAP.h b/ios/include/anysdk/appstore/ProtocolYAP.h deleted file mode 100644 index 76706e28..00000000 --- a/ios/include/anysdk/appstore/ProtocolYAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file ProtocolYAP.h - */ -#ifndef __CCX_PROTOCOL_YAP_H__ -#define __CCX_PROTOCOL_YAP_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TYAPDeveloperInfo -/// typedef TYAPDeveloperInfo. -typedef std::map TYAPDeveloperInfo; -/// \typedef std::map TProductInfo -/// typedef TProductInfo. -typedef std::map TProductInfo; -/// typedef TProductsInfo. -typedef std::map AllProductsInfo; -/** @brief YapResultCode enum, with inline docs */ -typedef enum -{ - kYapSuccess = 0,/**< enum value is callback of succeeding in yaping . */ - kYapFail,/**< enum value is callback of failing to yap . */ - kYapCancel,/**< enum value is callback of canceling to yap . */ - kYapNetworkError,/**< enum value is callback of network error . */ - kYapProductionInforIncomplete,/**< enum value is callback of incompleting info . */ - kYapInitSuccess,/**< enum value is callback of succeeding in initing sdk . */ - kYapInitFail,/**< enum value is callback of failing to init sdk . */ - kYapNowYaping,/**< enum value is callback of yaping now . */ - kYapRechargeSuccess,/**< enum value is callback of succeeding in recharging. */ - kYapExtension = 30000 /**< enum value is extension code . */ -} YapResultCode; -/** @brief RequestResultCode enum, with inline docs */ -typedef enum -{ - kRequestSuccess = 31000,/**< enum value is callback of succeeding in yaping . */ - kRequestFail/**< enum value is callback of failing to yap . */ -} RequestResultCode; -/**    - *@class  YapResultListener - *@brief the interface of yap callback   - */ -class YapResultListener -{ -public: - /**    - *@brief the interface of yap callback  - *@param the id of callback - *@param the information of callback - *@param the info of yap - */ - virtual void onYapResult(YapResultCode ret, const char* msg, TProductInfo info) = 0; - /** - *@brief the interface of request callback - *@param the id of callback - *@param the information of callback - *@param the info of request product - */ - virtual void onRequestResult(RequestResultCode ret, const char* msg, AllProductsInfo info) {} -}; -/**    - *@class  ProtocolYAP - *@brief the interface of yap    - */ - -class ProtocolYAP : public PluginProtocol -{ -public: - - /** - @brief yap for product - @param info The info of product, must contains key: - productName The name of product - productPrice The price of product(must can be parse to float) - productDesc The description of product - @warning For different plugin, the parameter should have other keys to yap. - Look at the manual of plugins. - */ - virtual void yapForProduct(TProductInfo info) = 0; - /** - @brief get order id - @return the order id - */ - virtual std::string getOrderId() = 0; - - /** - @breif set the result listener - @param pListener The callback object for yap result - @wraning Must invoke this interface before yapForProduct. - */ - virtual void setResultListener(YapResultListener* pListener) = 0; - - virtual YapResultListener* getYapListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - /** - @brief change the state of yaping - @param the state - */ - - static void resetYapState() - { - _yaping = false; - } - static bool _yaping; - - - -}; - - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_YAP_H__ */ diff --git a/ios/include/anysdk/appstore/PushWrapper.h b/ios/include/anysdk/appstore/PushWrapper.h deleted file mode 100644 index f2d53fe2..00000000 --- a/ios/include/anysdk/appstore/PushWrapper.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PushWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum -{ - ACTION_RET_RECEIVEMESSAGE = 0,/**value is callback of Receiving Message . */ - ACTION_RET_PUSHEXTENSION = 60000 /**value is extension code . */ -} PUSH_RET_CODE; - -@interface PushWrapper : NSObject - -/** - * the callback interface of push system - * - * @param pPlugin the push plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onActionResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/appstore/RECWrapper.h b/ios/include/anysdk/appstore/RECWrapper.h deleted file mode 100644 index f6243a05..00000000 --- a/ios/include/anysdk/appstore/RECWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// RECWrapper.h -// PluginProtocol -// - - -#import -typedef enum -{ - RECRESULT_RECINITSUCCESSS = 0,/**< enum value is callback of succeeding in initing sdk . */ - RECRESULT_RECINITFAIL,/**< enum value is callback of failing to init sdk. */ - RECRESULT_RECSTARTRECORDING,/**< enum value is callback of starting to record. */ - RECRESULT_RECSTOPRECORDING,/**< enum value is callback of stoping to record. */ - RECRESULT_RECPAUSEECORDING,/**< enum value is callback of pausing to record. */ - RECRESULT_RECRESUMERECORDING,/**< enum value is callback of resuming to record. */ - RECRESULT_RECENTERSDKPAGE,/**< enum value is callback of entering SDK`s page. */ - RECRESULT_RECQUITSDKPAGE,/**< enum value is callback of quiting SDK`s page. */ - RECRESULT_RECSHARESUCCESS,/**< enum value is callback of succeeding in sharing. */ - RECRESULT_RECSHAREFAIL,/**< enum value is callback of failing to share. */ - RECRESULT_RECEXTENSION = 90000 /**< enum value is extension code . */ -} REC_RET_CODE; - -@interface RECWrapper : NSObject - -/** - * The callback interface of REC system - * - * @param pPlugin the REC plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onRECResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/appstore/SdkHttpListener.h b/ios/include/anysdk/appstore/SdkHttpListener.h deleted file mode 100644 index 43945413..00000000 --- a/ios/include/anysdk/appstore/SdkHttpListener.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// SdkHttpListener.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -//@protocol -@protocol SdkHttpListener - -/** - * network response - * - * @param response the response message - */ -- (void) onResponse:(NSString*)response; - -/** - * network return error - */ -- (void) onError; - -@end diff --git a/ios/include/anysdk/appstore/ShareWrapper.h b/ios/include/anysdk/appstore/ShareWrapper.h deleted file mode 100644 index 00009774..00000000 --- a/ios/include/anysdk/appstore/ShareWrapper.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// ShareWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-11-12. -// Copyright (c) 2014年 zhangbin. All rights reserved. -// - -#import - -typedef enum -{ - SHARERESULT_SUCCESS = 0,/**< enum value is callback of failing to sharing . */ - SHARERESULT_FAIL,/**< enum value is callback of failing to share . */ - SHARERESULT_CANCEL,/**< enum value is callback of canceling to share . */ - SHARERESULT_NETWORK_ERROR, /**< enum value is callback of network error . */ - SHARERESULT_SHAREEXTENSION = 10000 /**< enum value is extension code . */ -} SHARE_RET_CODE; - -@interface ShareWrapper : NSObject - -/** - * The callback interface of share system - * - * @param pPlugin the share plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onShareResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/appstore/SocialWrapper.h b/ios/include/anysdk/appstore/SocialWrapper.h deleted file mode 100644 index 1eb2ea84..00000000 --- a/ios/include/anysdk/appstore/SocialWrapper.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// SocialWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum -{ - // code for leaderboard feature - SOCIAL_SUBMITSCORE_SUCCEED = 0,/**< enum value is callback of succeeding in submiting. */ - SOCIAL_SUBMITSCORE_FAIL,/**< enum value is callback of failing to submit . */ - // code for achievement feature - SOCIAL_UNLOCKACH_SUCCEED,/**< enum value is callback of succeeding in unlocking. */ - SOCIAL_UNLOCKACH_FAIL,/**< enum value is callback of failing to unlock. */ - SOCIAL_SIGNIN_SUCCEED,/**< enum value is callback of succeeding to login. */ - SOCIAL_SIGNIN_FAIL,/**< enum value is callback of failing to login. */ - SOCIAL_SIGNOUT_SUCCEED,/**< enum value is callback of succeeding to login. */ - SOCIAL_SIGNOUT_FAIL ,/**< enum value is callback of failing to login. */ - SOCIAL_GET_GAME_FRIENDS,/**< enum value is callback of getGameFriends. */ - SOCIAL_SOCIALEXTENSION = 20000/**< enum value is extension code . */ -} SOCIAL_RET_CODE; - -@interface SocialWrapper : NSObject - -/** - * The callback interface of social system - * - * @param pPlugin the social plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onSocialResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/appstore/UserWrapper.h b/ios/include/anysdk/appstore/UserWrapper.h deleted file mode 100644 index a31f9f81..00000000 --- a/ios/include/anysdk/appstore/UserWrapper.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// UserWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-4. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import "InterfaceUser.h" - - -typedef enum -{ - ACTION_RET_INIT_SUCCESS = 0,/**< enum value is callback of succeeding in initing sdk. */ - ACTION_RET_INIT_FAIL,/**< enum value is callback of failing to init sdk. */ - ACTION_RET_LOGIN_SUCCESS,/**< enum value is callback of succeeding in login.*/ - ACTION_RET_LOGIN_TIMEOUT,/**< enum value is callback of network error*/ - ACTION_RET_LOGIN_NO_NEED,/**< enum value is callback of no need login.*/ - ACTION_RET_LOGIN_FAIL,/**< enum value is callback of failing to login. */ - ACTION_RET_LOGIN_CANCEL,/**< enum value is callback of canceling to login. */ - ACTION_RET_LOGOUT_SUCCESS,/**< enum value is callback of succeeding in logout. */ - ACTION_RET_LOGOUT_FAIL,/**< enum value is callback of failing to logout. */ - ACTION_RET_PLATFORM_ENTER,/**< enum value is callback after enter platform. */ - ACTION_RET_PLATFORM_BACK,/**< enum value is callback after exit antiAddiction. */ - ACTION_RET_PAUSE_PAGE,/**< enum value is callback after exit pause page. */ - ACTION_RET_EXIT_PAGE,/**< enum value is callback after exit exit page. */ - ACTION_RET_ANTIADDICTIONQUERY,/**< enum value is callback after querying antiAddiction. */ - ACTION_RET_REALNAMEREGISTER,/**< enum value is callback after registering realname. */ - ACTION_RET_ACCOUNTSWITCH_SUCCESS,/**< enum value is callback of succeeding in switching account. */ - ACTION_RET_ACCOUNTSWITCH_FAIL,/**< enum value is callback of failing to switch account. */ - ACTION_RET_OPENSHOP,/**< enum value is callback of open the shop. */ - ACTION_RET_ACCOUNTSWITCH_CANCEL,/**< enum value is callback of canceling to switch account. */ - ACTION_RET_GAME_EXIT_PAGE,/**< enum value is callback of no channel exit page. */ - ACTION_RET_USEREXTENSION = 50000 /**< enum value is extension code . */ - -} USER_RET_CODE; - -@interface UserWrapper : NSObject -/** - * The callback interface of user system - * - * @param pPlugin the user plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onActionResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -/** - * The login authentication - * - * @param data the parameters - * @param target target description - * @param sel sel description - */ -+ (void) getAccessToken:(NSMutableDictionary*)data target:(id)target sel:(SEL)sel; - -/** - * - * @Title: relaceLoginOauthURL - * @Description:According to server,it changes login oauth url http://changed_host/ - * @return replace url - */ -+ (NSString*)replaceLoginOauthURL:url; - - -@end - diff --git a/ios/include/anysdk/appstore/Wrapper.h b/ios/include/anysdk/appstore/Wrapper.h deleted file mode 100644 index cc4d410b..00000000 --- a/ios/include/anysdk/appstore/Wrapper.h +++ /dev/null @@ -1,110 +0,0 @@ -// -// Wrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import "CocosRuntimeDelegate.h" - -@interface Wrapper : NSObject - -/** - * init developer.xml - */ -+ (void) analysisDeveloperInfo; - -/** - * check application - * - * @param appKey the value of appkey from AnySDK Client - * @param appSeceret the value of appSeceret from AnySDK Client - * @param privateKey the value of privateKey from AnySDK Client - * @param oauthLoginServer the value of appkey from AnySDK Client - */ -+ (void) setAppParam:(const char*)appKey AppSecret:(const char*)appSeceret PrivateKey:(const char*)privateKey OauthLoginServer:(const char*)oauthLoginServer; - -/** - * get the parameters of SDK - * - * @return the parameters of SDK - */ -+ (NSMutableDictionary*) getDeveloperInfo; - -/** - * get the information of channel - * - * @return the information of channel - */ -+ (NSMutableDictionary*) getChannelInfo; - -/** - * get the information of game - * - * @return the information of game - */ -+ (NSMutableDictionary*) getGameInfo; - -/** - * get the information of plugin - * - * @return the information of plugin - */ -+ (NSMutableDictionary*) getPluginInfo; - -/** - * get the information of tool - * - * @return the information of tool - */ -+ (NSMutableDictionary*) getToolInfo; - -/** - * get support for plug-ins - * - * @return support for plug-ins - */ -+ (NSMutableArray*) getSupportForPlugins; - -/** - * NSMutableDictionary change to NSString - * - * @param dict NSMutableDictionary value - * - * @return NSString value - */ -+ (NSString*)dictToNSString:(NSMutableDictionary*)dict; - -/** - * get the identifier of value - * - * @return the identifier of value - */ -+ (NSString*)getChannelId; - -/** - * get custom parameter from AnySDK Client - * - * @return return value description - */ -+ (NSString*) getCustomParam; - -+ (BOOL)networkReachable; - -+ (NSString*) replaceNotifyURL:(Class)class1 url:(NSString*)url; - -+ (void)reset; - -//about cocos runtime -+ (id)getCocosRuntimeSDKProxy; - -+ (void)setCocosRuntimeSDKProxy:(id)runtimeProxy; - -+ (int)getCocosRuntimeSDKVersionCode; - -+ (void)setCocosRuntimeSDKVersionCode:(int)sdkVersionCode; - - -@end diff --git a/ios/include/anysdk/appstore/YAPWrapper.h b/ios/include/anysdk/appstore/YAPWrapper.h deleted file mode 100644 index b4136d72..00000000 --- a/ios/include/anysdk/appstore/YAPWrapper.h +++ /dev/null @@ -1,86 +0,0 @@ -// -// YAPWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -typedef enum -{ - YAPRESULT_SUCCESS = 0,/**< enum value is callback of succeeding in yaping . */ - YAPRESULT_FAIL,/**< enum value is callback of failing to yap . */ - YAPRESULT_CANCEL,/**< enum value is callback of canceling to yap . */ - YAPRESULT_NETWORK_ERROR,/**< enum value is callback of network error . */ - YAPRESULT_PRODUCTIONINFOR_INCOMPLETE,/**< enum value is callback of incompleting info . */ - YAPRESULT_INIT_SUCCESS,/**< enum value is callback of succeeding in initing sdk . */ - YAPRESULT_INIT_FAIL,/**< enum value is callback of failing to init sdk . */ - YAPRESULT_NOW_YAPING,/**< enum value is callback of yaping now . */ - YAPRESULT_YAPEXTENSION = 30000 /**< enum value is extension code . */ -} YAP_RET_CODE; - -typedef enum -{ - REQUESTRESULT_SUCCESS = 31000,/**< enum value is callback of succeeding in yaping . */ - REQUESTRESULT_FAIL/**< enum value is callback of failing to yap . */ -} REQUEST_RET_CODE; - -@interface YAPWrapper : NSObject - -/** - * get the identifier of order - * - * @param orderInfo yapment info - * @param target callback object - * @param action callback function - */ -+ (void)getYapOrderId:(NSMutableDictionary*)orderInfo target:(id)target action:(SEL)action; - -/** - * get order info - * - * @param productInfo product info - * @param user identifier of user - * - * @return order info - */ -+ (NSMutableDictionary*) getOrderInfo:(NSMutableDictionary*)productInfo userID:(NSString*)user; - /** - * The callback interface of yap system - * - * @param pPlugin the yap plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onYapResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -/** - * The callback interface of social system - * - * @param pPlugin the social plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onYapResult:(id)pPlugin retCode:(int)ret products:(NSMutableDictionary*)products; - -/** - * process the notify url - * - * @param class1 plugin - * @param url the source url - * - * @return the destination url - */ -+ (NSString*) replaceNotifyURL:(Class)class1 url:(NSString*)url; - -/** - * process the EE Domain - * - * @param domain - * - * @return void - */ -+ (void)replaceEEDomain:(NSString*)domain; - -@end diff --git a/ios/include/anysdk/common/AdsUtil.h b/ios/include/anysdk/common/AdsUtil.h deleted file mode 100644 index 15161729..00000000 --- a/ios/include/anysdk/common/AdsUtil.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// AdsUtil.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-23. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -@interface AdsUtil : NSObject - -/** - * get the parameters of ads system in special case - * - * @return return the parameters - */ -+ (NSMutableDictionary*)getAdsParams; - -@end diff --git a/ios/include/anysdk/common/AdsWrapper.h b/ios/include/anysdk/common/AdsWrapper.h deleted file mode 100644 index a8bd2137..00000000 --- a/ios/include/anysdk/common/AdsWrapper.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// AdsWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import - -typedef enum -{ - RESULT_CODE_AdsReceived = 0, // The ad is received - RESULT_CODE_AdsShown, // The advertisement shown - RESULT_CODE_AdsDismissed, // The advertisement - // dismissed - RESULT_CODE_PointsSpendSucceed, // The points - // spend succeed - RESULT_CODE_PointsSpendFailed, // The points - // spend failed - RESULT_CODE_NetworkError, // Network error - RESULT_CODE_UnknownError, // Unknown error - RESULT_CODE_OfferWallOnPointsChanged, // Change the point of offerwall - RESULT_CODE_RewardedVideoWithReward,//the callback of receiving the reward of rewardedvideo - RESULT_CODE_InAppPurchaseFinished,////the callback of finishing IAP ad - RESULT_CODE_AdsClicked, //the callback of the advertisement clicked - RESULT_CODE_ADSEXTENSION = 40000 //ads extension code - -}AD_RET_CODE; - -typedef enum -{ - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL, /**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED/**< enum value is Native advanced ads . */ -} ADS_TYPE; -typedef enum -{ - POS_CENTER = 0,/**< enum the toolbar is at center. */ - POS_TOP,/**< enum the toolbar is at top. */ - POS_TOP_LEFT,/**< enum the toolbar is at topleft. */ - POS_TOP_RIGHT,/**< enum the toolbar is at topright. */ - POS_BOTTOM,/**< enum the toolbar is at bottom. */ - POS_BOTTOM_LEFT,/**< enum the toolbar is at bottomleft. */ - POS_BOTTOM_RIGHT/**< enum the toolbar is at bottomright. */ - -}AD_POS; - -@interface AdsWrapper : NSObject - -/** - * get current RootViewController - * - * @return RootViewController - */ -+ (UIViewController *)getCurrentRootViewController; - -/** - * get top window - * - * @return return top window - */ -+ (UIWindow*) getTopWindow; - -/** - * The callback interface of pay system - * - * @param pPlugin the pay plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onAdsResult:(id)target retCode:(int)code msg:(NSString*)msg; - -/** - * add ad view - * - * @param view view - * @param pos position - */ -+ (void) addAdView:(UIView*) view atPos:(AD_POS) pos; - -/** - * get the name of the advertising types - * - * @param adType the type of the advertising - * - * @return the name of the advertising types - */ -+ (NSString*)getAdNameWithType:(int)adType; - -@end diff --git a/ios/include/anysdk/common/AgentManager.h b/ios/include/anysdk/common/AgentManager.h deleted file mode 100644 index 092a9eaf..00000000 --- a/ios/include/anysdk/common/AgentManager.h +++ /dev/null @@ -1,245 +0,0 @@ -/** @file AgentManager.h - */ - - -#ifndef __CCX_AGENTMANAGER_H__ -#define __CCX_AGENTMANAGER_H__ - -#include "PluginManager.h" -#include "ProtocolIAP.h" -#include "ProtocolAnalytics.h" -#include "ProtocolShare.h" -#include "ProtocolAds.h" -#include "ProtocolSocial.h" -#include "ProtocolUser.h" -#include "ProtocolPush.h" -#include "ProtocolCrash.h" -#include "ProtocolREC.h" -#include "ProtocolCustom.h" -#include "ProtocolAdTracking.h" -#include -#include -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum { - kPluginAds = 16,/**< enum value is the type of Ads. */ - kPluginAnalytics = 1,/**< enum value is the type of Analytics. */ - kPluginIAP = 8,/**< enum value is the type of IAP. */ - kPluginShare = 2,/**< enum value is the type of Share. */ - kPluginUser = 32,/**< enum value is the type of User. */ - kPluginSocial = 4,/**< enum value is the type of Social. */ - kPluginPush = 64,/**< enum value is the type of Push. */ - kPluginCrash = 128,/**< enum value is the type of Crash. */ - kPluginCustom = 256,/**< enum value is the type of Custom. */ - kPluginREC = 512,/**< enum value is the type of REC. */ - kPluginAdTracking = 1024,/**< enum value is the type of AdTracking. */ -}Plugin_type; -/**    - *  @class  AgentManager   - */ -class AgentManager -{ -public: - virtual ~AgentManager(); - /** - @brief Get singleton of AgentManager - */ - - static AgentManager* getInstance(); - /** - @brief Destory the instance of AgentManager - */ - static void end(); - - /** - @breif the init of AgentManager - @param the appKey of anysdk - @param the appSecret of anysdk - @param the privateKey of anysdk - @param the url of oauthLoginServer - @warning Must invoke this interface before loadAllPlugins - */ - void init(std::string appKey,std::string appSecret,std::string privateKey,std::string oauthLoginServer); - - /** - @brief load the plugins - */ - CC_DEPRECATED_ATTRIBUTE void loadALLPlugin(); - /** - @brief unload the plugins - */ - CC_DEPRECATED_ATTRIBUTE void unloadALLPlugin(); - - /** - @brief load the plugins - */ - void loadAllPlugins(); - - /** - @brief unload the plugins - */ - void unloadAllPlugins(); - - /** - @brief Get Analytics plugin - @return if Analytics plugin exist ,return value is Analytics plugin. - else return value is null pointer. - */ - ProtocolAnalytics* getAnalyticsPlugin(){return _pAnalytics;}; - - /** - @brief Get User plugin - @return if User plugin exist ,return value is User plugin. - else return value is null pointer. - */ - ProtocolUser* getUserPlugin(){return _pUser;}; - - /** - @brief Get IAP plugin - @return if IAP plugin exist ,return value is IAP plugin. - else return value is null pointer. - */ - std::map* getIAPPlugin(){return &_pluginsIAPMap;}; - - /** - @brief Get Share plugin - @return if Share plugin exist ,return value is Share plugin. - else return value is null pointer. - */ - ProtocolShare* getSharePlugin(){return _pShare;}; - - /** - @brief Get Social plugin - @return if Social plugin exist ,return value is Social plugin. - else return value is null pointer. - */ - ProtocolSocial* getSocialPlugin(){return _pSocial;}; - - /** - @brief Get Ads plugin - @return if Ads plugin exist ,return value is Ads plugin. - else return value is null pointer. - */ - ProtocolAds* getAdsPlugin(){return _pAds;}; - - /** - @brief Get Push plugin - @return if Push plugin exist ,return value is Push plugin. - else return value is null pointer. - */ - ProtocolPush* getPushPlugin(){return _pPush;}; - - /** - @brief Get Crash plugin - @return if Crash plugin exist ,return value is Crash plugin. - else return value is null pointer. - */ - ProtocolCrash* getCrashPlugin(){return _pCrash;}; - - /** - @brief Get Custom plugin - @return if Crash plugin exist ,return value is Custom plugin. - else return value is null pointer. - */ - ProtocolCustom* getCustomPlugin(){return _pCustom;}; - - - /** - @brief Get REC plugin - @return if REC plugin exist ,return value is REC plugin. - else return value is null pointer. - */ - ProtocolREC* getRECPlugin(){return _pREC;}; - - /** - @brief Get AdTracking plugin - @return if AdTracking plugin exist ,return value is AdTracking plugin. - else return value is null pointer. - */ - ProtocolAdTracking* getAdTrackingPlugin(){return _pAdTracking;}; - - /** - @brief Get channel ID - @return return value is channel ID. - */ - std::string getChannelId(); - - /** - @brief Get custom param - @return return value is custom param for channel. - */ - std::string getCustomParam(); - - /** - @brief Get framework version - @return return value is the version of AnySDKFramework. - */ - std::string getFrameworkVersion(); - - /** - @Title: setIsAnaylticsEnabled - @Description: choose to open or close - @param @param enabled true or false - @return void - */ - void setIsAnaylticsEnabled(bool value){bIsAnaylticsEnabled = value;}; - /** - @Title: isAnaylticsEnabled - @Description: the status of Anayltics - @param @return true or false - @return boolean - */ - bool isAnaylticsEnabled(){return bIsAnaylticsEnabled;}; - - - void loadPlugin(const char* nodeName,int type); -protected: - void setDebugMode(bool flag); - std::string getSupportPlugin(); - void release(); - - -private: - AgentManager(void); - - // Analytics plugin - ProtocolAnalytics* _pAnalytics; - - // user plugin - ProtocolUser* _pUser; - - // IAP plugins - // ProtocolIAP* _pIAP; - std::map _pluginsIAPMap; - - // Share plugin - ProtocolShare* _pShare; - - // Social plugin - ProtocolSocial* _pSocial; - - // Ads plugin - ProtocolAds* _pAds; - - // Push plugin - ProtocolPush* _pPush; - - // Crash plugin - ProtocolCrash* _pCrash; - - // Custom plugin - ProtocolCustom* _pCustom; - - // REC plugin - ProtocolREC* _pREC; - - // AdTracking plugin - ProtocolAdTracking* _pAdTracking; - - bool bIsAnaylticsEnabled; - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_AGENTMANAGER_H__ */ diff --git a/ios/include/anysdk/common/AnalyticsWrapper.h b/ios/include/anysdk/common/AnalyticsWrapper.h deleted file mode 100644 index c20d2d5b..00000000 --- a/ios/include/anysdk/common/AnalyticsWrapper.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// AnalyticsWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum { - ACCOUNT_TYPE_ANONYMOUS,/**< enum value is anonymous typek. */ - ACCOUNT_TYPE_REGISTED,/**< enum value is registed type. */ - ACCOUNT_TYPE_SINA_WEIBO,/**< enum value is sineweibo type. */ - ACCOUNT_TYPE_TENCENT_WEIBO,/**< enum value is tecentweibo type */ - ACCOUNT_TYPE_QQ,/**< enum value is qq type */ - ACCOUNT_TYPE_ND91,/**< enum value is nd91 type. */ -} ANALYTICS_ACCOUNT_TYPE; - -typedef enum { - ACCOUNT_OPERATE_LOGIN,/**< enum value is the login operate. */ - ACCOUNT_OPERATE_LOGOUT,/**< enum value is the logout operate. */ - ACCOUNT_OPERATE_REGISTER,/**< enum value is the register operate. */ -}ANALYTICS_ACCOUNT_OPERATE; - -typedef enum { - ACCOUNT_GENDER_MALE,/**< enum value is male. */ - ACCOUNT_GENDER_FEMALE,/**< enum value is female. */ - ACCOUNT_GENDER_UNKNOWN,/**< enum value is unknow. */ - -} ANALYTICS_ACCOUNT_GENDER; - -typedef enum { - TASK_TYPE_GUIDE_LINE,/**< enum value is the guideline type.. */ - TASK_TYPE_MAIN_LINE,/**< enum value is the mainline type.. */ - TASK_TYPE_BRANCH_LINE,/** - -@protocol CocosRuntimeSDKDelegate - -- (NSMutableArray*)getSupportForPlugins; -- (NSMutableDictionary*)getPluginParams; -- (NSString*)getDevelopInfo; - -@end - -#endif /* __CRT_SDK_DELEGATE_H */ diff --git a/ios/include/anysdk/common/CustomWrapper.h b/ios/include/anysdk/common/CustomWrapper.h deleted file mode 100644 index 2eaf6195..00000000 --- a/ios/include/anysdk/common/CustomWrapper.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// CustomWrapper.h -// PluginProtocol -// -// - -#import - -typedef enum -{ - CUSTOMRESULT_CUSTOMEXTENSION = 80000 /**< enum value is extension code . */ -} CUSTOM_RET_CODE; - -@interface CustomWrapper : NSObject - -/** - * The callback interface of Custom system - * - * @param pPlugin the Custom plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onCustomResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/common/IAPWrapper.h b/ios/include/anysdk/common/IAPWrapper.h deleted file mode 100644 index 05e55385..00000000 --- a/ios/include/anysdk/common/IAPWrapper.h +++ /dev/null @@ -1,86 +0,0 @@ -// -// IAPWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -typedef enum -{ - PAYRESULT_SUCCESS = 0,/**< enum value is callback of succeeding in paying . */ - PAYRESULT_FAIL,/**< enum value is callback of failing to pay . */ - PAYRESULT_CANCEL,/**< enum value is callback of canceling to pay . */ - PAYRESULT_NETWORK_ERROR,/**< enum value is callback of network error . */ - PAYRESULT_PRODUCTIONINFOR_INCOMPLETE,/**< enum value is callback of incompleting info . */ - PAYRESULT_INIT_SUCCESS,/**< enum value is callback of succeeding in initing sdk . */ - PAYRESULT_INIT_FAIL,/**< enum value is callback of failing to init sdk . */ - PAYRESULT_NOW_PAYING,/**< enum value is callback of paying now . */ - PAYRESULT_PAYEXTENSION = 30000 /**< enum value is extension code . */ -} PAY_RET_CODE; - -typedef enum -{ - REQUESTRESULT_SUCCESS = 31000,/**< enum value is callback of succeeding in paying . */ - REQUESTRESULT_FAIL/**< enum value is callback of failing to pay . */ -} REQUEST_RET_CODE; - -@interface IAPWrapper : NSObject - -/** - * get the identifier of order - * - * @param orderInfo payment info - * @param target callback object - * @param action callback function - */ -+ (void)getPayOrderId:(NSMutableDictionary*)orderInfo target:(id)target action:(SEL)action; - -/** - * get order info - * - * @param productInfo product info - * @param user identifier of user - * - * @return order info - */ -+ (NSMutableDictionary*) getOrderInfo:(NSMutableDictionary*)productInfo userID:(NSString*)user; - /** - * The callback interface of pay system - * - * @param pPlugin the pay plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onPayResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -/** - * The callback interface of social system - * - * @param pPlugin the social plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void)onPayResult:(id)pPlugin retCode:(int)ret products:(NSMutableDictionary*)products; - -/** - * process the notify url - * - * @param class1 plugin - * @param url the source url - * - * @return the destination url - */ -+ (NSString*) replaceNotifyURL:(Class)class1 url:(NSString*)url; - -/** - * process the EE Domain - * - * @param domain - * - * @return void - */ -+ (void)replaceEEDomain:(NSString*)domain; - -@end diff --git a/ios/include/anysdk/common/InterfaceAdTracking.h b/ios/include/anysdk/common/InterfaceAdTracking.h deleted file mode 100644 index 1ec881cf..00000000 --- a/ios/include/anysdk/common/InterfaceAdTracking.h +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAdTracking - -@required -/** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userInfo user identifier - * @return void - */ -- (void) onRegister: (NSString*) userId; - -/** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ -- (void) onLogin: (NSMutableDictionary*) userInfo; - -/** - * - * @Title: onPay - * @Description: Call this method if you want to track pay events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ -- (void) onPay: (NSMutableDictionary*) productInfo; - -/** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events as happening during a section. - * @param eventId The custom event name. - * @return void - */ -- (void) trackEvent: (NSString*) eventId; - -/** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ -- (void) trackEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - -@end diff --git a/ios/include/anysdk/common/InterfaceAds.h b/ios/include/anysdk/common/InterfaceAds.h deleted file mode 100644 index da8fba35..00000000 --- a/ios/include/anysdk/common/InterfaceAds.h +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAds - -@required -/** - * show advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) showAds: (NSMutableDictionary*) info; - -/** - * hide advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) hideAds: (NSMutableDictionary*) info; - -/** - * preload advertising - * - * @param info the parameters of the advertising - key:Param1 value:the type of advertising - key:Param2 value:the order of advertising - */ -- (void) preloadAds: (NSMutableDictionary*) info; - -/** - * query the points - * - * @return points - */ -- (float) queryPoints; - -/** - * spend user`s points - * - * @param points the points of spending - */ -- (void) spendPoints: (int) points; - -/** - * Description - * - * @param adType the type of advertising - * - * @return if the type is supported ,return true - or if the type is supported ,return false - */ -- (BOOL) isAdTypeSupported: (int)adType; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/common/InterfaceAnalytics.h b/ios/include/anysdk/common/InterfaceAnalytics.h deleted file mode 100644 index 230e4c5a..00000000 --- a/ios/include/anysdk/common/InterfaceAnalytics.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceAnalytics - -@required -/** - * start session analytics - */ -- (void) startSession; - -/** - * stop session analytics - */ -- (void) stopSession; - -/** - * Set the timeout for expiring a session. - * - * @param millis In milliseconds as the unit of time. - * @note It must be invoked before calling startSession. - */ -- (void) setSessionContinueMillis: (long) millis; - -/** - * Whether to catch uncaught exceptions to server. - * - * @warning This interface only worked on android. - */ -- (void) setCaptureUncaughtException: (BOOL) isEnabled; - -/** - * log an error - * - * @param errorId The identity of event - * @param message message for the error - */ -- (void) logError: (NSString*) errorId withMsg:(NSString*) message; - -/** - * log an event - * - * @param eventId The identity of event - */ -- (void) logEvent: (NSString*) eventId; - -/** - * log an event - * - * @param eventId The identity of event - * @param paramMap Extern parameters of the event - */ -- (void) logEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap; - -/** - * Track an event begin - * - * @param eventId The identity of event - */ -- (void) logTimedEventBegin: (NSString*) eventId; - -/** - * Track an event end. - * - * @param eventId The identity of event - */ -- (void) logTimedEventEnd: (NSString*) eventId; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - - -@end diff --git a/ios/include/anysdk/common/InterfaceCrash.h b/ios/include/anysdk/common/InterfaceCrash.h deleted file mode 100644 index 669cdd1f..00000000 --- a/ios/include/anysdk/common/InterfaceCrash.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012+2013 cocos2d+x.org - - http://www.cocos2d+x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -@protocol InterfaceCrash - -@required - -/** - * set user identifier - * - * @param userInfo - */ -- (void) setUserIdentifier: (NSString*)identifier ; - -/** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ -- (void) reportException: (NSString*)message exception:(NSString*)exception; - -/** - * customize logging - * - * @param string Custom log - */ -- (void) leaveBreadcrumb: (NSString*)breadcrumb; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - -@end diff --git a/ios/include/anysdk/common/InterfaceCustom.h b/ios/include/anysdk/common/InterfaceCustom.h deleted file mode 100644 index ea99750d..00000000 --- a/ios/include/anysdk/common/InterfaceCustom.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceCustom - -@required -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - - - -@end diff --git a/ios/include/anysdk/common/InterfaceIAP.h b/ios/include/anysdk/common/InterfaceIAP.h deleted file mode 100644 index 2157caf6..00000000 --- a/ios/include/anysdk/common/InterfaceIAP.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#import - -@protocol InterfaceIAP - -@required -/** - * pay for product - * - * @param profuctInfo the information of the product - key:Product_Id value: the identifier of product - key:Product_Name value: the name of product - key:Product_Price value: the price of product, denominated as the yuan. - key:Product_Count value: the count of product - key:Role_Id value:the identifier of role - key:Role_Name value: the name of role - key:Role_Grade value: the grade of role - key:Role_Balance value: the virtual currency amount of role - key:Server_Id value: the identifier of paying server - key:EXT value: Extended Parameters - * @note the rule of production maybe changes,please the description is subject to the wiki(http://docs.anysdk.com/IAPSystem#.E6.94.AF.E4.BB.98) - */ -- (void) payForProduct: (NSMutableDictionary*) productInfo; - -/** - * get the order identifier - * - * @return the order identifier - */ -- (NSString*) getOrderId; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * get the identifier of plugin - * - * @return the identifier of plugin - */ -- (NSString*) getPluginId; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/common/InterfacePush.h b/ios/include/anysdk/common/InterfacePush.h deleted file mode 100644 index 346bd863..00000000 --- a/ios/include/anysdk/common/InterfacePush.h +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfacePush - -@required -/** - * start push service - */ -- (void) startPush; - -/** - * close push service - */ -- (void) closePush; - -/** - * set alias - * - * @param alias the value of alias - */ -- (void) setAlias: (NSString*)alias; - -/** - * delete alias - * - * @param alias the value of alias - */ -- (void) delAlias: (NSString*)alias; - -/** - * set tags - * - * @param tags the content of tags - */ -- (void) setTags: (NSMutableArray*)tags; - -/** - * delete tags - * - * @param tags the content of tags - */ -- (void) delTags: (NSMutableArray*)tags; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/common/InterfaceREC.h b/ios/include/anysdk/common/InterfaceREC.h deleted file mode 100644 index 43cb4635..00000000 --- a/ios/include/anysdk/common/InterfaceREC.h +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceREC - -@required - -/** - * - * @Title: startRecording - * @Description: Start to record video - * @param @return None - * @return void - * @throws - */ -- (void) startRecording; - -/** - * - * @Title: stopRecording - * @Description: Stop to record video - * @param @return None - * @return void - * @throws - */ -- (void) stopRecording; - -/** - * - * @Title: share - * @Description: share video - * @param @param info the info of video - * @return void - * @throws - */ -- (void) share:(NSMutableDictionary *) info; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - - - - -@end diff --git a/ios/include/anysdk/common/InterfaceShare.h b/ios/include/anysdk/common/InterfaceShare.h deleted file mode 100644 index dd88eea8..00000000 --- a/ios/include/anysdk/common/InterfaceShare.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceShare - -@required -/** - * share - * - * @param shareInfo the content of share - * @note the description is subject to the wiki(http://docs.anysdk.com/IAPSystem#.E6.94.AF.E4.BB.98) - */ -- (void) share: (NSMutableDictionary*) shareInfo; -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/common/InterfaceSocial.h b/ios/include/anysdk/common/InterfaceSocial.h deleted file mode 100644 index 6f0a4e71..00000000 --- a/ios/include/anysdk/common/InterfaceSocial.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceSocial - -/** - * login in socail system - */ -- (void) signIn; - -/** - * logout in socail system - */ -- (void) signOut; -/** - * submit the socre for leaderboard - * - * @param leaderboardID the identifier of leaderboard - * @param score the score - */ -- (void) submitScore: (NSString*) leaderboardID withScore: (long) score; - -/** - * show the leaderboard - * - * @param leaderboardID the identifier of leaderboard - */ -- (void) showLeaderboard: (NSString*) leaderboardID; - -/** - * unlock achievements of game - * - * @param achInfo the content of achievement - */ -- (void) unlockAchievement: (NSMutableDictionary*) achInfo; - -/** - * show achievements of game - */ -- (void) showAchievements; -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - - -@end diff --git a/ios/include/anysdk/common/InterfaceUser.h b/ios/include/anysdk/common/InterfaceUser.h deleted file mode 100644 index f415e364..00000000 --- a/ios/include/anysdk/common/InterfaceUser.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -@protocol InterfaceUser - -@required -/** - * user login - */ -- (void) login; - -/** - * get the status of login - * - * @return status of login - */ -- (BOOL) isLogined; - -/** - * get user identifier - * - * @return user identifier - */ -- (NSString*) getUserID; - -/** - * get the version of SDK - * - * @return the version of SDK - */ -- (NSString*) getSDKVersion; - -/** - * get the version of plugin - * - * @return the version of plugin - */ -- (NSString*) getPluginVersion; - -/** - * get the identifier of plugin - * - * @return the identifier of plugin - */ -- (NSString*) getPluginId; - -/** - * whether function is supported - * - * @param functionName the name of function - * - * @return return If the function is supported, return true - or if the function is not supported, return false - */ -- (BOOL) isFunctionSupported : (NSString*) functionName; - -@optional -/** - * init SDK - * - * @param cpInfo the parameters of SDK - */ -- (void) configDeveloperInfo : (NSMutableDictionary*) cpInfo; - -/** - * set debug mode true or false - * - * @param debug the status of debug - */ -- (void) setDebugMode: (BOOL) debug; - - -@end diff --git a/ios/include/anysdk/common/JSBRelation.h b/ios/include/anysdk/common/JSBRelation.h deleted file mode 100644 index 7775b0dc..00000000 --- a/ios/include/anysdk/common/JSBRelation.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file JSBRelation.h - */ -#ifndef __CCX_JSBRELATION_H__ -#define __CCX_JSBRELATION_H__ - -#include "PluginProtocol.h" -#include -#include -#include - -using namespace std; - -namespace anysdk { namespace framework { - -/**    - *  @class  JSBRelation   - */ -class JSBRelation -{ -public: - static string getMethodsOfPlugin(PluginProtocol* plugin); - - - - -private: -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_JSBRELATION_H__ */ diff --git a/ios/include/anysdk/common/JsonParser.h b/ios/include/anysdk/common/JsonParser.h deleted file mode 100644 index c9f4b127..00000000 --- a/ios/include/anysdk/common/JsonParser.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// JsonParser.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-17. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -@interface JsonParser : NSObject - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key __attribute__((deprecated)); - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key key2:(NSString*)key2 __attribute__((deprecated)); - -+(NSString*)parseJsonForNSKey:(NSString*)data key:(NSString*)key key2:(NSString*)key2 key3:(NSString*)key3 __attribute__((deprecated)); - - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key __attribute__((deprecated)); - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key key2:(const char*)key2 __attribute__((deprecated)); - -+(const char*)parseJsonForKey:(const char*)data key:(const char*)key key2:(const char*)key2 key3:(const char*)key3 __attribute__((deprecated)); - -@end diff --git a/ios/include/anysdk/common/PluginApplicationDelegate.h b/ios/include/anysdk/common/PluginApplicationDelegate.h deleted file mode 100644 index c714a50b..00000000 --- a/ios/include/anysdk/common/PluginApplicationDelegate.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012+2013 cocos2d+x.org - -http://www.cocos2d+x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#import -@protocol PluginApplicationDelegate - -@optional -//about user system - -- (void)applicationDidEnterBackground:(UIApplication *)application ; -- (void)applicationWillEnterForeground:(UIApplication *)application ; - - -//about iap system -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation ; - -- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url; - - -//about push system -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken ; - -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; - -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler ; - - - -@end \ No newline at end of file diff --git a/ios/include/anysdk/common/PluginFactory.h b/ios/include/anysdk/common/PluginFactory.h deleted file mode 100644 index 79922c97..00000000 --- a/ios/include/anysdk/common/PluginFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGIN_FACTORY_H__ -#define __CCX_PLUGIN_FACTORY_H__ - -namespace anysdk { namespace framework { - -class PluginProtocol; -class PluginManager; -/**    - *  @class  PluginFactory   - */ -class PluginFactory -{ -public: - virtual ~PluginFactory(); - /** - @brief Get singleton of PluginFactory - */ - static PluginFactory* getInstance(); - - /** - @brief Destory the instance of PluginFactory - */ - static void purgeFactory(); - -private: - friend class PluginManager; - PluginFactory(void); - - /** - @brief create the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* createPlugin(const char* name, int pluginType); -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_FACTORY_H__ */ diff --git a/ios/include/anysdk/common/PluginHelper.h b/ios/include/anysdk/common/PluginHelper.h deleted file mode 100644 index 406fc278..00000000 --- a/ios/include/anysdk/common/PluginHelper.h +++ /dev/null @@ -1,130 +0,0 @@ -// -// PluginHelper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import - -@interface PluginHelper : NSObject - -/** - * get the parameters of SDK - * - * @return the parameters of SDK - */ -+ (NSMutableDictionary*) getParamsInfo; - -/** - * - * @Title: getDebugModeStatus - * @Description: get the status of DebugMode - * @param @return status - * @return BOOL yes or no - */ -+ (BOOL) getDebugModeStatus; - -/** - * - * @Title: getLogLevel - * @Description: get the level of log - * @param @return level - * @return "verbose" "debug" "info" "warning" "error" - */ -+ (NSString*) getLogLevel; - -/** - * get the status of network - * - * @return if the network is reachable ,return true - or if the network is reachable,return false - */ -+ (BOOL) networkReachable; - -/** - * get current RootViewController - * - * @return RootViewController - */ -+ (UIViewController *)getCurrentRootViewController; - -/** - * network transmission in plugin - * - * @param data content transmitted over the network - * @param target callback object - * @param sel callback function - * @note the content must contain the value that key is "server_url" - * @note http use post - */ -+ (void) pluginHttp:(NSMutableDictionary*)data target:(id)target sel:(SEL)sel; - -/** - * log output ,the lever is verbose - * - * @param message the message about this log - */ -+ (void) logVerbose:(NSString*)format,...; - -/** - * log output ,the lever is error - * - * @param message the message about this log - */ -+ (void) logError:(NSString*)format,...; - - -/** - * log output ,the lever is debug - * - * @param message the message about this log - */ -+ (void) logDebug:(NSString*)format,...; - -/** - * log output ,the lever is info - * - * @param message the message about this log - */ -+ (void) logInfo:(NSString*)format,...; - -/** - * get the game identifier - * - * @return name - */ -+ (NSString*) getGameId; - -/** - * get the application name - * - * @return name - */ -+ (NSString*) getApplicationName; - -/** - * get the application orientation - * - * @return multiple orientation - */ -+ (NSArray*) getApplicationOrientation; - - -/** - * get the application version - * - * @return version - */ -+ (NSString*) getApplicationVersion; - -/** - * Parsing XML file - * @param the name of XML file - * @return NSMutableDictionary the content of XML file - */ -+ (NSMutableDictionary*) getXMLInfoByFileName:(NSString*)fileName; - -@end \ No newline at end of file diff --git a/ios/include/anysdk/common/PluginManager.h b/ios/include/anysdk/common/PluginManager.h deleted file mode 100644 index 93282ae7..00000000 --- a/ios/include/anysdk/common/PluginManager.h +++ /dev/null @@ -1,51 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PLUGINMANAGER_H__ -#define __CCX_PLUGINMANAGER_H__ - -#include "PluginProtocol.h" -#include "PluginFactory.h" -#include -#include - -namespace anysdk { namespace framework { - -/**    - *  @class  PluginManager   - */ -class PluginManager -{ -public: - virtual ~PluginManager(); - /** - @brief Get singleton of PluginManager - */ - static PluginManager* getInstance(); - /** - @brief Destory the instance of PluginManager - */ - static void end(); - - /** - @brief load the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - PluginProtocol* loadPlugin(const char* name, int pluginType); - /** - @brief unload the plugin by name and type - @param the name of plugin - @param the type of plugin - */ - void unloadPlugin(const char* name, int pluginType = 0); - - -private: - PluginManager(void); - std::map _pluginsMap; -// bool _isDebug; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGINMANAGER_H__ */ diff --git a/ios/include/anysdk/common/PluginParam.h b/ios/include/anysdk/common/PluginParam.h deleted file mode 100644 index 1f35d4a7..00000000 --- a/ios/include/anysdk/common/PluginParam.h +++ /dev/null @@ -1,126 +0,0 @@ -/** @file PluginParam.h - */ -#ifndef __CCX_PLUGIN_PARAM_H__ -#define __CCX_PLUGIN_PARAM_H__ - -#include -#include -/// \typedef std::map StringMap -/// typedef YString. -typedef std::map StringMap; - -namespace anysdk { namespace framework { - -class PluginProtocol; -/**    - *  @class  PluginParam   - */ -class PluginParam -{ -public: - /** - @brief the default constructor of PluginParam - */ - PluginParam(); - - virtual ~PluginParam(); - /** - @brief the constructor of PluginParam - @param the value is Integer - */ - PluginParam(int nValue); - /** - @brief the constructor of PluginParam - @param the value is float - */ - PluginParam(float fValue); - /** - @brief the constructor of PluginParam - @param the value is boolean - */ - PluginParam(bool bValue); - /** - @brief the default constructor of PluginParam - @param the value is char - */ - PluginParam(const char* strValue); - /** - @brief the default constructor of PluginParam - @param the value is StringMap - */ - PluginParam(StringMap strMapValue); - - typedef enum{ - kParamTypeNull = 0, - kParamTypeInt, - kParamTypeFloat, - kParamTypeBool, - kParamTypeString, - kParamTypeStringMap, - kParamTypeMap, - } ParamType; - /** - @brief get the ParamType of value - */ - inline ParamType getCurrentType() { - return _type; - } - /** - @brief get the int value - */ - inline int getIntValue() { - return _intValue; - } - /** - @brief get the float value - */ - inline float getFloatValue() { - return _floatValue; - } - /** - @brief get the boolean value - */ - inline bool getBoolValue() { - return _boolValue; - } - /** - @brief get the char value - */ - inline const char* getStringValue() { - return _strValue.c_str(); - } - /** - @brief get the map of value - */ - inline std::map getMapValue() { - return _mapValue; - } - /** - @brief get the StringMap value - */ - inline StringMap getStrMapValue() { - return _strMapValue; - } - -private: - friend class PluginProtocol; - /** - @brief the constructor of PluginParam - @param the map of value - */ - PluginParam(std::map mapValue); - -private: - ParamType _type; - - int _intValue; - float _floatValue; - bool _boolValue; - std::string _strValue; - std::map _mapValue; - StringMap _strMapValue; -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_PLUGIN_PARAM_H__ */ diff --git a/ios/include/anysdk/common/PluginProtocol.h b/ios/include/anysdk/common/PluginProtocol.h deleted file mode 100644 index 95cf706d..00000000 --- a/ios/include/anysdk/common/PluginProtocol.h +++ /dev/null @@ -1,144 +0,0 @@ -/** @file PluginProtocol.h - */ -#ifndef __CCX_IPLUGIN_H__ -#define __CCX_IPLUGIN_H__ - -#include "PluginParam.h" -#include - -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher -#define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else -#define CC_DEPRECATED_ATTRIBUTE -#endif - -namespace anysdk { namespace framework { - -/** - * @class PluginProtocol - * @brief The super class for all plugins. - */ -class PluginProtocol -{ -public: - virtual ~PluginProtocol() {}; - - /** - *@brief set plugin name - *@param the name of plugin - */ - virtual void setPluginName(const char* name) = 0 ; - /** - *@brief get plugin name - *@return the name of plugin - */ - virtual const char* getPluginName() = 0 ; - - /** - *@brief get the version of plugin - *@return the version of plugin - */ - virtual std::string getPluginVersion(); - /** - *@brief get the version of sdk - *@return the version of sdk - */ - virtual std::string getSDKVersion(); - - /** - *@brief switch debug plug-in on/off - *@param the value of on/off - */ - CC_DEPRECATED_ATTRIBUTE virtual void setDebugMode(bool bDebug); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return void - */ - virtual void callFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return void - */ - virtual void callFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return string - */ - virtual std::string callStringFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return int - */ - virtual int callIntFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return bool - */ - virtual bool callBoolFuncWithParam(const char* funcName, std::vector params); - - /** - *@brief methods for reflections - *@param function name - *@param PluginParam* param - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, PluginParam* param, ...); - /** - *@brief methods for reflections - *@param function name - *@param std::vector params - *@return float - */ - virtual float callFloatFuncWithParam(const char* funcName, std::vector params); - - /** - @brief Check function the plugin support or not - @param the name of plugin - @return if the function support ,return true - else retur false - */ - virtual bool isFunctionSupported(std::string functionName); - - -}; - -}} //namespace anysdk { namespace framework { - -#endif /* __CCX_IPLUGIN_H__ */ diff --git a/ios/include/anysdk/common/PluginWrapper.h b/ios/include/anysdk/common/PluginWrapper.h deleted file mode 100644 index cbdc0b34..00000000 --- a/ios/include/anysdk/common/PluginWrapper.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// PluginWrapper.h -// PluginProtocol -// -#import - -#import -#import "PluginApplicationDelegate.h" -@interface PluginWrapper : NSObject - -@property (nonatomic, strong) NSMutableArray * arrayDelegate; - -+ (PluginWrapper*) getInstance; - -- (void) setDelegate:(id)delegate; - -//about user system - -- (void)applicationDidEnterBackground:(UIApplication *)application ; -- (void)applicationWillEnterForeground:(UIApplication *)application ; - -//about iap system -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation ; - -- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url; - - -//about push system -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken ; - -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ; - -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler ; - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler; - -@end diff --git a/ios/include/anysdk/common/ProtocolAdTracking.h b/ios/include/anysdk/common/ProtocolAdTracking.h deleted file mode 100644 index 6fc557a2..00000000 --- a/ios/include/anysdk/common/ProtocolAdTracking.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file ProtocolAdTracking.h - */ -#ifndef __CCX_PROTOCOL_ADTRACKING_H__ -#define __CCX_PROTOCOL_ADTRACKING_H__ - -#include "PluginProtocol.h" -#include -namespace anysdk { namespace framework { -/**    - *@class  ProtocolAdTracking - *@brief the interface of AdTracking   - */ -class ProtocolAdTracking : public PluginProtocol -{ -public: - - /** - * - * @Title: onRegister - * @Description: Call this method if you want to track register events as happening during a section. - * @param userId user identifier - * @return void - */ - virtual void onRegister(const char* userId) = 0; - - /** - * - * @Title: onLogin - * @Description:Call this method if you want to track login events as happening during a section. - * @param userInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onLogin(std::map userInfo) = 0; - - /** - * - * @Title: onPay - * @Description: Call this method if you want to track pay events as happening during a section. - * @param productInfo The details of this parameters are already covered by document. - * @return void - */ - virtual void onPay(std::map productInfo) = 0; - - /** - * - * @Title: trackEvent - * @Description: Call this method if you want to track custom events with parameters as happening during a section. - * @param eventId The custom event name. - * @param paramMap The details of this parameters are already covered by document. - */ - virtual void trackEvent(const char* eventId, std::map* paramMap = NULL) = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_ADTRACKING_H__ ----- */ diff --git a/ios/include/anysdk/common/ProtocolAds.h b/ios/include/anysdk/common/ProtocolAds.h deleted file mode 100644 index 8e29987f..00000000 --- a/ios/include/anysdk/common/ProtocolAds.h +++ /dev/null @@ -1,133 +0,0 @@ -/** @file ProtocolAds.h - */ -#ifndef __CCX_PROTOCOL_ADS_H__ -#define __CCX_PROTOCOL_ADS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TAdsDeveloperInfo -/// typedef TAdsDeveloperInfo. -typedef std::map TAdsDeveloperInfo; -/// \typedef std::map TAdsInfo -/// typedef TAdsInfo. -typedef std::map TAdsInfo; -/** @brief AdsResultCode enum, with inline docs */ -typedef enum -{ - kAdsReceived = 0, /**< enum the callback: the ad is received is at center. */ - - kAdsShown, /**< enum the callback: the advertisement dismissed. */ - kAdsDismissed, /**< enum the callback: the advertisement dismissed. */ - - kPointsSpendSucceed, /**< enum the callback: the points spend succeed. */ - kPointsSpendFailed, /**< enum the callback: the points spend failed. */ - - kNetworkError, /**< enum the callback of Network error at center. */ - kUnknownError, /**< enum the callback of Unknown error. */ - kOfferWallOnPointsChanged, /**< enum the callback of Changing the point of offerwall. */ - kRewardedVideoWithReward,/**< enum the callback of receiving the reward of rewardedvideo. */ - kInAppPurchaseFinished,/**< enum the callback of finishing IAP ad. */ - kAdsClicked,/**< enum the callback of the advertisement clicked. */ - kAdsExtension = 40000 /**< enum value is extension code . */ -} AdsResultCode; -/** @brief AdsPos enum, with inline docs */ -typedef enum { - kPosCenter = 0,/**< enum the toolbar is at center. */ - kPosTop,/**< enum the toolbar is at top. */ - kPosTopLeft,/**< enum the toolbar is at topleft. */ - kPosTopRight,/**< enum the toolbar is at topright. */ - kPosBottom,/**< enum the toolbar is at bottom. */ - kPosBottomLeft,/**< enum the toolbar is at bottomleft. */ - kPosBottomRight,/**< enum the toolbar is at bottomright. */ -} AdsPos; -/** @brief AdsType enum, with inline docs */ -typedef enum { - AD_TYPE_BANNER = 0,/**< enum value is banner ads . */ - AD_TYPE_FULLSCREEN,/**< enum value is fullscreen ads . */ - AD_TYPE_MOREAPP,/**< enum value is moreapp ads . */ - AD_TYPE_OFFERWALL,/**< enum value is offerwall ads . */ - AD_TYPE_REWARDEDVIDEO,/**< enum value is rewarded video ads . */ - AD_TYPE_NATIVEEXPRESS,/**< enum value is Native express ads . */ - AD_TYPE_NATIVEADVANCED,/**< enum value is Native advanced ads . */ -} AdsType; - -class ProtocolAds; -class AdsListener -{ -public: - /** - *@brief The advertisement request result - *@param the id of callback - *@param the information of callback - */ - virtual void onAdsResult(AdsResultCode code, const char* msg) = 0; -}; - -class ProtocolAds : public PluginProtocol -{ -public: - - - - /** - @brief show adview - @param the type of ads - @param the idx of ads - */ - virtual void showAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief Hide the adview - @param the type of ads - @param the idx of ads - */ - virtual void hideAds(AdsType adsType, int idx = 1) = 0; - - /** - @brief preload the adview - @param the type of ads - @param the idx of ads - */ - virtual void preloadAds(AdsType adsType, int idx = 1)= 0; - - /** - *@brief Query the points of player - *@return the point - */ - virtual float queryPoints() = 0; - - /** - *@brief Spend the points. - Use this method to notify server spend points. - *@param points Need spend number of points - */ - virtual void spendPoints(int points) = 0; - - /** - @brief set the Ads listener - @param pListener The callback object for Ads result - */ - virtual void setAdsListener(AdsListener* listener) = 0; - - /** - @brief get pListener The callback object for Ads result - @return the listener - */ - virtual AdsListener* getAdsListener() = 0; - - /** - @brief Is it supportive of this type of ads - @param the type of ads - @return if it is supportive ,return true - else retur false - */ - virtual bool isAdTypeSupported(AdsType adType) = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_ADS_H__ */ diff --git a/ios/include/anysdk/common/ProtocolAnalytics.h b/ios/include/anysdk/common/ProtocolAnalytics.h deleted file mode 100644 index ce3372d6..00000000 --- a/ios/include/anysdk/common/ProtocolAnalytics.h +++ /dev/null @@ -1,107 +0,0 @@ -/** @file ProtocolAnalytics.h - */ -#ifndef __CCX_PROTOCOL_ANALYTICS_H__ -#define __CCX_PROTOCOL_ANALYTICS_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map LogEventParamPair -/// typedef LogEventParamPair. -typedef std::pair< std::string, std::string > LogEventParamPair; -/// \typedef std::map LogEventParamMap -/// typedef LogEventParamMap. -typedef std::map< std::string, std::string > LogEventParamMap; -typedef enum { - ANONYMOUS,/**< enum value is anonymous typek. */ - REGISTED,/**< enum value is registed type. */ - SINA_WEIBO,/**< enum value is sineweibo type. */ - TENCENT_WEIBO,/**< enum value is tecentweibo type */ - QQ,/**< enum value is qq type */ - ND91,/**< enum value is nd91 type. */ -} AccountType; -typedef enum { - LOGIN,/**< enum value is the login operate. */ - LOGOUT,/**< enum value is the logout operate. */ - REGISTER,/**< enum value is the register operate. */ -} AccountOperate; -typedef enum { - MALE,/**< enum value is male. */ - FEMALE,/**< enum value is female. */ - UNKNOWN,/**< enum value is unknow. */ - -} AccountGender; -typedef enum { - GUIDE_LINE,/**< enum value is the guideline type.. */ - MAIN_LINE,/**< enum value is the mainline type.. */ - BRANCH_LINE,/** -#include - -namespace anysdk { namespace framework { - -class ProtocolCrash : public PluginProtocol -{ -public: - /** - * set user identifier - * - * @param userInfo - */ - virtual void setUserIdentifier(const char* identifier) = 0; - - /** - * The uploader captured in exception information - * - * @param message Set the custom information - * @param exception The exception - */ - virtual void reportException(const char* message, const char* exception) = 0; - - /** - * customize logging - * - * @param string Custom log - */ - virtual void leaveBreadcrumb(const char* breadcrumb) = 0; - - - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_CRASH_H__ */ diff --git a/ios/include/anysdk/common/ProtocolCustom.h b/ios/include/anysdk/common/ProtocolCustom.h deleted file mode 100644 index dc92558e..00000000 --- a/ios/include/anysdk/common/ProtocolCustom.h +++ /dev/null @@ -1,50 +0,0 @@ -/** @file ProtocolCustom.h - */ -#ifndef __CCX_PROTOCOL_CUSTOM_H__ -#define __CCX_PROTOCOL_CUSTOM_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -typedef enum -{ - kCustomExtension = 80000 /**< enum value is extension code . */ -} CustomResultCode; -/**    - *@class  CustomResultListener - *@brief the interface of share callback   - */ -class CustomResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onCustomResult(CustomResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolCustom - *@brief the interface of custom   - */ -class ProtocolCustom : public PluginProtocol -{ -public: - - /** - @breif set the result listener - @param pListener The callback object for custom result - @wraning Must invoke this interface before custom - */ - virtual void setResultListener(CustomResultListener* pListener) = 0; - - virtual CustomResultListener* getCustomListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_Custom_H__ ----- */ diff --git a/ios/include/anysdk/common/ProtocolIAP.h b/ios/include/anysdk/common/ProtocolIAP.h deleted file mode 100644 index 4a875b32..00000000 --- a/ios/include/anysdk/common/ProtocolIAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file ProtocolIAP.h - */ -#ifndef __CCX_PROTOCOL_IAP_H__ -#define __CCX_PROTOCOL_IAP_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TIAPDeveloperInfo -/// typedef TIAPDeveloperInfo. -typedef std::map TIAPDeveloperInfo; -/// \typedef std::map TProductInfo -/// typedef TProductInfo. -typedef std::map TProductInfo; -/// typedef TProductsInfo. -typedef std::map AllProductsInfo; -/** @brief PayResultCode enum, with inline docs */ -typedef enum -{ - kPaySuccess = 0,/**< enum value is callback of succeeding in paying . */ - kPayFail,/**< enum value is callback of failing to pay . */ - kPayCancel,/**< enum value is callback of canceling to pay . */ - kPayNetworkError,/**< enum value is callback of network error . */ - kPayProductionInforIncomplete,/**< enum value is callback of incompleting info . */ - kPayInitSuccess,/**< enum value is callback of succeeding in initing sdk . */ - kPayInitFail,/**< enum value is callback of failing to init sdk . */ - kPayNowPaying,/**< enum value is callback of paying now . */ - kPayRechargeSuccess,/**< enum value is callback of succeeding in recharging. */ - kPayExtension = 30000 /**< enum value is extension code . */ -} PayResultCode; -/** @brief RequestResultCode enum, with inline docs */ -typedef enum -{ - kRequestSuccess = 31000,/**< enum value is callback of succeeding in paying . */ - kRequestFail/**< enum value is callback of failing to pay . */ -} RequestResultCode; -/**    - *@class  PayResultListener - *@brief the interface of pay callback   - */ -class PayResultListener -{ -public: - /**    - *@brief the interface of pay callback  - *@param the id of callback - *@param the information of callback - *@param the info of pay - */ - virtual void onPayResult(PayResultCode ret, const char* msg, TProductInfo info) = 0; - /** - *@brief the interface of request callback - *@param the id of callback - *@param the information of callback - *@param the info of request product - */ - virtual void onRequestResult(RequestResultCode ret, const char* msg, AllProductsInfo info) {} -}; -/**    - *@class  ProtocolIAP - *@brief the interface of pay    - */ - -class ProtocolIAP : public PluginProtocol -{ -public: - - /** - @brief pay for product - @param info The info of product, must contains key: - productName The name of product - productPrice The price of product(must can be parse to float) - productDesc The description of product - @warning For different plugin, the parameter should have other keys to pay. - Look at the manual of plugins. - */ - virtual void payForProduct(TProductInfo info) = 0; - /** - @brief get order id - @return the order id - */ - virtual std::string getOrderId() = 0; - - /** - @breif set the result listener - @param pListener The callback object for pay result - @wraning Must invoke this interface before payForProduct. - */ - virtual void setResultListener(PayResultListener* pListener) = 0; - - virtual PayResultListener* getPayListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - /** - @brief change the state of paying - @param the state - */ - - static void resetPayState() - { - _paying = false; - } - static bool _paying; - - - -}; - - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_IAP_H__ */ diff --git a/ios/include/anysdk/common/ProtocolPush.h b/ios/include/anysdk/common/ProtocolPush.h deleted file mode 100644 index e9e2fac8..00000000 --- a/ios/include/anysdk/common/ProtocolPush.h +++ /dev/null @@ -1,104 +0,0 @@ -/** @file PluginFactory.h - */ -#ifndef __CCX_PROTOCOL_PUSH_H__ -#define __CCX_PROTOCOL_PUSH_H__ - -#include "PluginProtocol.h" -#include -#include -#include -using namespace std; - -namespace anysdk { namespace framework { -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kPushReceiveMessage = 0,/**value is callback of Receiving Message . */ - kPushExtensionCode = 60000 /**< enum value is extension code . */ - - -} PushActionResultCode; -class ProtocolPush; -/**    - *@class  PushActionListener - *@brief the interface of Push callback   - */ -class PushActionListener -{ -public: - /**    - *@brief the interface of Push callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolPush* pPlugin, PushActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolPush   - */ -class ProtocolPush : public PluginProtocol -{ -public: - - - /** - *@brief start/register Push services - *@return void - */ - virtual void startPush() = 0 ; - - - /** - *@brief close Push services - *@return void - */ - virtual void closePush() = 0 ; - - - /** - *@brief set alias - *@param tags - *@return void - */ - virtual void setAlias(string alias) = 0; - - /** - *@brief del alias - *@param tags - *@return void - */ - virtual void delAlias(string alias) = 0; - - /** - *@brief set tag - *@param tags - *@return void - */ - virtual void setTags(list tags) = 0; - - /** - *@brief delete tag - *@param tags - *@return void - */ - virtual void delTags(list tags) = 0; - - /** - @brief set the result listener - @param pListener The callback object for push result - */ - virtual void setActionListener(PushActionListener* listener) = 0 ; - - /** - @brief get pListener The callback object for Push result - @return the listener - */ - virtual PushActionListener* getActionListener() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_PUSH_H__ */ diff --git a/ios/include/anysdk/common/ProtocolREC.h b/ios/include/anysdk/common/ProtocolREC.h deleted file mode 100644 index b0db2c0d..00000000 --- a/ios/include/anysdk/common/ProtocolREC.h +++ /dev/null @@ -1,83 +0,0 @@ -/** @file ProtocolREC.h - */ -#ifndef __CCX_PROTOCOL_REC_H__ -#define __CCX_PROTOCOL_REC_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { - -typedef std::map TVideoInfo; - -/** @brief RECResultCode enum, with inline docs */ -typedef enum -{ - kRECInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk . */ - kRECInitFail,/**< enum value is callback of failing to init sdk. */ - kRECStartRecording,/**< enum value is callback of starting to record. */ - kRECStopRecording,/**< enum value is callback of stoping to record. */ - kRECPauseRecording,/**< enum value is callback of pausing to record. */ - kRECResumeRecording,/**< enum value is callback of resuming to record. */ - kRECEnterSDKPage,/**< enum value is callback of entering SDK`s page. */ - kRECQuitSDKPage,/**< enum value is callback of quiting SDK`s page. */ - kRECShareSuccess,/**< enum value is callback of succeeding in sharing. */ - kRECShareFail,/**< enum value is callback of failing to share. */ - kRECExtension = 90000 /**< enum value is extension code . */ -} RECResultCode; -/**    - *@class  RECResultListener - *@brief the interface of REC callback   - */ -class RECResultListener -{ -public: - /**    - *@brief the interface of REC callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onRECResult(RECResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolREC - *@brief the interface of REC   - */ -class ProtocolREC : public PluginProtocol -{ -public: - - /** - * @Description: Start to record video - */ - virtual void startRecording() = 0; - - /** - * @Description: Stop to record video - */ - virtual void stopRecording() = 0; - - /** - * @Description: share video - * @Param info The info of share - */ - virtual void share(TVideoInfo info) = 0; - - - - /** - @breif set the result listener - @param pListener The callback object for REC result - @wraning Must invoke this interface before REC - */ - virtual void setResultListener(RECResultListener* pListener) = 0; - - virtual RECResultListener* getRECListener() = 0; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/ios/include/anysdk/common/ProtocolShare.h b/ios/include/anysdk/common/ProtocolShare.h deleted file mode 100644 index 2215a4ff..00000000 --- a/ios/include/anysdk/common/ProtocolShare.h +++ /dev/null @@ -1,72 +0,0 @@ -/** @file ProtocolShare.h - */ -#ifndef __CCX_PROTOCOL_SHARE_H__ -#define __CCX_PROTOCOL_SHARE_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TShareDeveloperInfo -/// typedef TShareDeveloperInfo. -typedef std::map TShareDeveloperInfo; -/// \typedef std::map TShareInfo -/// typedef TShareInfo. -typedef std::map TShareInfo; -/** @brief ShareResultCode enum, with inline docs */ -typedef enum -{ - kShareSuccess = 0,/**< enum value is callback of failing to sharing . */ - kShareFail,/**< enum value is callback of failing to share . */ - kShareCancel,/**< enum value is callback of canceling to share . */ - kShareNetworkError,/**< enum value is callback of network error . */ - kShareExtension = 10000 /**< enum value is extension code . */ -} ShareResultCode; -/**    - *@class  ShareResultListener - *@brief the interface of share callback   - */ -class ShareResultListener -{ -public: - /**    - *@brief the interface of share callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onShareResult(ShareResultCode ret, const char* msg) = 0; -}; -/**    - *@class  ProtocolShare - *@brief the interface of share   - */ -class ProtocolShare : public PluginProtocol -{ -public: - - - - /** - @brief share information - @param info The info of share, contains key: - SharedText The text need to share - SharedImagePath The full path of image file need to share (optinal) - @warning For different plugin, the parameter should have other keys to share. - Look at the manual of plugins. */ - virtual void share(TShareInfo info) = 0; - - /** - @breif set the result listener - @param pListener The callback object for share result - @wraning Must invoke this interface before share - */ - virtual void setResultListener(ShareResultListener* pListener) = 0; - - virtual ShareResultListener* getShareListener() = 0; - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SHARE_H__ ----- */ diff --git a/ios/include/anysdk/common/ProtocolSocial.h b/ios/include/anysdk/common/ProtocolSocial.h deleted file mode 100644 index 3fa5639b..00000000 --- a/ios/include/anysdk/common/ProtocolSocial.h +++ /dev/null @@ -1,105 +0,0 @@ -/** @file ProtocolSocial.h - */ -#ifndef __CCX_PROTOCOL_SOCIAL_H__ -#define __CCX_PROTOCOL_SOCIAL_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TSocialDeveloperInfo -/// typedef TSocialDeveloperInfo. -typedef std::map TSocialDeveloperInfo; -/// \typedef std::map TAchievementInfo -/// typedef TAchievementInfo. -typedef std::map TAchievementInfo; -/** @brief SocialRetCode enum, with inline docs */ -typedef enum -{ - // code for leaderboard feature - kScoreSubmitSucceed =1,/**< enum value is callback of succeeding in submiting. */ - kScoreSubmitfail,/**< enum value is callback of failing to submit . */ - - // code for achievement feature - kAchUnlockSucceed,/**< enum value is callback of succeeding in unlocking. */ - kAchUnlockFail,/**< enum value is callback of failing to unlock. */ - - kSocialSignInSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignInFail,/**< enum value is callback of failing to login. */ - - kSocialSignOutSucceed,/**< enum value is callback of succeeding to login. */ - kSocialSignOutFail,/**< enum value is callback of failing to login. */ - kSocialGetGameFriends,/**< enum value is callback of getGameFriends. */ - kSocialExtensionCode = 20000 /**< enum value is extension code . */ - -} SocialRetCode; -/**    - *@class  SocialListener - *@brief the interface of social callback   - */ -class SocialListener -{ -public: - /**    - *@brief the interface of social callback  - *@param the id of callback - *@param the information of callback - */ - virtual void onSocialResult(SocialRetCode code, const char* msg) = 0; -}; - -/**    - *@class  ProtocolSocial - *@brief the interface of social   - */ -class ProtocolSocial : public PluginProtocol -{ -public: - - /** - @brief user signIn - */ - virtual void signIn() = 0; - - /** - @brief user signOut - */ - virtual void signOut() = 0; - - /** - @brief submit the score - @param leaderboardID - @param the score - */ - virtual void submitScore(const char* leadboardID, long score) = 0; - /** - @brief show the id of Leaderboard page - @param leaderboardID - */ - virtual void showLeaderboard(const char* leaderboardID) = 0; - - /** - @brief methods of achievement feature - @param the info of achievement - */ - virtual void unlockAchievement(TAchievementInfo achInfo) = 0; - /** - @brief show the page of achievements - */ - virtual void showAchievements() = 0; - /** - @brief set pListener The callback object for social result - @param the listener - */ - virtual void setListener(SocialListener* listener) = 0; - /** - @brief get pListener The callback object for social result - @return the listener - */ - virtual SocialListener* getListener() = 0; -}; - -}} // namespace anysdk { namespace framework { - -#endif /* ----- #ifndef __CCX_PROTOCOL_SOCIAL_H__ ----- */ diff --git a/ios/include/anysdk/common/ProtocolUser.h b/ios/include/anysdk/common/ProtocolUser.h deleted file mode 100644 index 387fb9e8..00000000 --- a/ios/include/anysdk/common/ProtocolUser.h +++ /dev/null @@ -1,135 +0,0 @@ -/** @file ProtocolUser.h - */ -#ifndef __CCX_PROTOCOL_USER_H__ -#define __CCX_PROTOCOL_USER_H__ - -#include "PluginProtocol.h" -#include -#include - -namespace anysdk { namespace framework { -/// \typedef std::map TUserDeveloperInfo -/// typedef TUserDeveloperInfo. -typedef std::map TUserDeveloperInfo; -/** @brief Plugin_type enum, with inline docs */ -typedef enum -{ - kInitSuccess = 0,/**< enum value is callback of succeeding in initing sdk. */ - kInitFail,/**< enum value is callback of failing to init sdk. */ - kLoginSuccess,/**< enum value is callback of succeeding in login.*/ - kLoginNetworkError,/**< enum value is callback of network error*/ - kLoginNoNeed,/**< enum value is callback of no need login.*/ - kLoginFail,/**< enum value is callback of failing to login. */ - kLoginCancel,/**< enum value is callback of canceling to login. */ - kLogoutSuccess,/**< enum value is callback of succeeding in logout. */ - kLogoutFail,/**< enum value is callback of failing to logout. */ - kPlatformEnter,/**< enum value is callback after enter platform. */ - kPlatformBack,/**< enum value is callback after exit antiAddiction. */ - kPausePage,/**< enum value is callback after exit pause page. */ - kExitPage,/**< enum value is callback after exit exit page. */ - kAntiAddictionQuery,/**< enum value is callback after querying antiAddiction. */ - kRealNameRegister,/**< enum value is callback after registering realname. */ - kAccountSwitchSuccess,/**< enum value is callback of succeeding in switching account. */ - kAccountSwitchFail,/**< enum value is callback of failing to switch account. */ - kOpenShop,/**< enum value is callback of open the shop. */ - kAccountSwitchCancel,/**< enum value is callback of canceling to switch account. */ - kGameExitPage,/**< enum value is callback of no channel exit page. */ - kUserExtension = 50000 /**< enum value is extension code . */ - - -} UserActionResultCode; -/** @brief ToolBarPlace enum, with inline docs */ -typedef enum -{ - kToolBarTopLeft = 1,/**< enum the toolbar is at topleft. */ - kToolBarTopRight,/**< enum the toolbar is at topright. */ - kToolBarMidLeft,/**< enum the toolbar is at midleft. */ - kToolBarMidRight,/**< enum the toolbar is at midright. */ - kToolBarBottomLeft,/**< enum the toolbar is at bottomleft. */ - kToolBarBottomRight,/**< enum the toolbar is at bottomright. */ -} ToolBarPlace; - -class ProtocolUser; -/**    - *@class  UserActionListener - *@brief the interface of user callback   - */ -class UserActionListener -{ -public: - /**    - *@brief the interface of user callback  - *@param the adatper of plugin - *@param the id of callback - *@param the information of callback - */ - virtual void onActionResult(ProtocolUser* pPlugin, UserActionResultCode code, const char* msg) = 0; -}; -/**    - *  @class  ProtocolUser   - */ -class ProtocolUser : public PluginProtocol -{ -public: - - - /** - @brief User login - */ - virtual void login() = 0 ; - - /** - @brief User login - if the process of logining need to know the param of server_id , - you can use the function - and if you must change oauthloginserver, you can add the param of oauthLoginServer - @param server_id - @param oauthLoginServer - */ - - CC_DEPRECATED_ATTRIBUTE virtual void login(std::string server_id, std::string oauthLoginServer = "") = 0 ; - - /** - @brief User login - if the process of logining need to know the parameters , - you can use the function - @param the parameters - */ - virtual void login(std::map info) = 0 ; - - /** - @brief Check whether the user logined or not - @return If user logined, return value is true; - else return value is false. - */ - virtual bool isLogined() = 0 ; - - /** - @brief Get USER ID - @return If user logined, return value is userID; - else return value is empty string. - */ - virtual std::string getUserID() = 0 ; - /** - @brief set the result listener - @param pListener The callback object for user result - */ - virtual void setActionListener(UserActionListener* listener) = 0 ; - /** - @brief get pListener The callback object for user result - @return the listener - */ - virtual UserActionListener* getActionListener() = 0 ; - - /** - @brief get plugin id - @return the plugin id - */ - virtual std::string getPluginId() = 0 ; - - -}; - -}} // namespace anysdk { namespace framework { - -#endif /* __CCX_PROTOCOL_USER_H__ */ diff --git a/ios/include/anysdk/common/PushWrapper.h b/ios/include/anysdk/common/PushWrapper.h deleted file mode 100644 index f2d53fe2..00000000 --- a/ios/include/anysdk/common/PushWrapper.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PushWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum -{ - ACTION_RET_RECEIVEMESSAGE = 0,/**value is callback of Receiving Message . */ - ACTION_RET_PUSHEXTENSION = 60000 /**value is extension code . */ -} PUSH_RET_CODE; - -@interface PushWrapper : NSObject - -/** - * the callback interface of push system - * - * @param pPlugin the push plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onActionResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/common/RECWrapper.h b/ios/include/anysdk/common/RECWrapper.h deleted file mode 100644 index f6243a05..00000000 --- a/ios/include/anysdk/common/RECWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// RECWrapper.h -// PluginProtocol -// - - -#import -typedef enum -{ - RECRESULT_RECINITSUCCESSS = 0,/**< enum value is callback of succeeding in initing sdk . */ - RECRESULT_RECINITFAIL,/**< enum value is callback of failing to init sdk. */ - RECRESULT_RECSTARTRECORDING,/**< enum value is callback of starting to record. */ - RECRESULT_RECSTOPRECORDING,/**< enum value is callback of stoping to record. */ - RECRESULT_RECPAUSEECORDING,/**< enum value is callback of pausing to record. */ - RECRESULT_RECRESUMERECORDING,/**< enum value is callback of resuming to record. */ - RECRESULT_RECENTERSDKPAGE,/**< enum value is callback of entering SDK`s page. */ - RECRESULT_RECQUITSDKPAGE,/**< enum value is callback of quiting SDK`s page. */ - RECRESULT_RECSHARESUCCESS,/**< enum value is callback of succeeding in sharing. */ - RECRESULT_RECSHAREFAIL,/**< enum value is callback of failing to share. */ - RECRESULT_RECEXTENSION = 90000 /**< enum value is extension code . */ -} REC_RET_CODE; - -@interface RECWrapper : NSObject - -/** - * The callback interface of REC system - * - * @param pPlugin the REC plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onRECResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/common/SdkHttpListener.h b/ios/include/anysdk/common/SdkHttpListener.h deleted file mode 100644 index 43945413..00000000 --- a/ios/include/anysdk/common/SdkHttpListener.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// SdkHttpListener.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -//@protocol -@protocol SdkHttpListener - -/** - * network response - * - * @param response the response message - */ -- (void) onResponse:(NSString*)response; - -/** - * network return error - */ -- (void) onError; - -@end diff --git a/ios/include/anysdk/common/ShareWrapper.h b/ios/include/anysdk/common/ShareWrapper.h deleted file mode 100644 index 00009774..00000000 --- a/ios/include/anysdk/common/ShareWrapper.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// ShareWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-11-12. -// Copyright (c) 2014年 zhangbin. All rights reserved. -// - -#import - -typedef enum -{ - SHARERESULT_SUCCESS = 0,/**< enum value is callback of failing to sharing . */ - SHARERESULT_FAIL,/**< enum value is callback of failing to share . */ - SHARERESULT_CANCEL,/**< enum value is callback of canceling to share . */ - SHARERESULT_NETWORK_ERROR, /**< enum value is callback of network error . */ - SHARERESULT_SHAREEXTENSION = 10000 /**< enum value is extension code . */ -} SHARE_RET_CODE; - -@interface ShareWrapper : NSObject - -/** - * The callback interface of share system - * - * @param pPlugin the share plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onShareResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/common/SocialWrapper.h b/ios/include/anysdk/common/SocialWrapper.h deleted file mode 100644 index 1eb2ea84..00000000 --- a/ios/include/anysdk/common/SocialWrapper.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// SocialWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-10-9. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import - -typedef enum -{ - // code for leaderboard feature - SOCIAL_SUBMITSCORE_SUCCEED = 0,/**< enum value is callback of succeeding in submiting. */ - SOCIAL_SUBMITSCORE_FAIL,/**< enum value is callback of failing to submit . */ - // code for achievement feature - SOCIAL_UNLOCKACH_SUCCEED,/**< enum value is callback of succeeding in unlocking. */ - SOCIAL_UNLOCKACH_FAIL,/**< enum value is callback of failing to unlock. */ - SOCIAL_SIGNIN_SUCCEED,/**< enum value is callback of succeeding to login. */ - SOCIAL_SIGNIN_FAIL,/**< enum value is callback of failing to login. */ - SOCIAL_SIGNOUT_SUCCEED,/**< enum value is callback of succeeding to login. */ - SOCIAL_SIGNOUT_FAIL ,/**< enum value is callback of failing to login. */ - SOCIAL_GET_GAME_FRIENDS,/**< enum value is callback of getGameFriends. */ - SOCIAL_SOCIALEXTENSION = 20000/**< enum value is extension code . */ -} SOCIAL_RET_CODE; - -@interface SocialWrapper : NSObject - -/** - * The callback interface of social system - * - * @param pPlugin the social plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onSocialResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -@end diff --git a/ios/include/anysdk/common/UserWrapper.h b/ios/include/anysdk/common/UserWrapper.h deleted file mode 100644 index a31f9f81..00000000 --- a/ios/include/anysdk/common/UserWrapper.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// UserWrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-9-4. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import "InterfaceUser.h" - - -typedef enum -{ - ACTION_RET_INIT_SUCCESS = 0,/**< enum value is callback of succeeding in initing sdk. */ - ACTION_RET_INIT_FAIL,/**< enum value is callback of failing to init sdk. */ - ACTION_RET_LOGIN_SUCCESS,/**< enum value is callback of succeeding in login.*/ - ACTION_RET_LOGIN_TIMEOUT,/**< enum value is callback of network error*/ - ACTION_RET_LOGIN_NO_NEED,/**< enum value is callback of no need login.*/ - ACTION_RET_LOGIN_FAIL,/**< enum value is callback of failing to login. */ - ACTION_RET_LOGIN_CANCEL,/**< enum value is callback of canceling to login. */ - ACTION_RET_LOGOUT_SUCCESS,/**< enum value is callback of succeeding in logout. */ - ACTION_RET_LOGOUT_FAIL,/**< enum value is callback of failing to logout. */ - ACTION_RET_PLATFORM_ENTER,/**< enum value is callback after enter platform. */ - ACTION_RET_PLATFORM_BACK,/**< enum value is callback after exit antiAddiction. */ - ACTION_RET_PAUSE_PAGE,/**< enum value is callback after exit pause page. */ - ACTION_RET_EXIT_PAGE,/**< enum value is callback after exit exit page. */ - ACTION_RET_ANTIADDICTIONQUERY,/**< enum value is callback after querying antiAddiction. */ - ACTION_RET_REALNAMEREGISTER,/**< enum value is callback after registering realname. */ - ACTION_RET_ACCOUNTSWITCH_SUCCESS,/**< enum value is callback of succeeding in switching account. */ - ACTION_RET_ACCOUNTSWITCH_FAIL,/**< enum value is callback of failing to switch account. */ - ACTION_RET_OPENSHOP,/**< enum value is callback of open the shop. */ - ACTION_RET_ACCOUNTSWITCH_CANCEL,/**< enum value is callback of canceling to switch account. */ - ACTION_RET_GAME_EXIT_PAGE,/**< enum value is callback of no channel exit page. */ - ACTION_RET_USEREXTENSION = 50000 /**< enum value is extension code . */ - -} USER_RET_CODE; - -@interface UserWrapper : NSObject -/** - * The callback interface of user system - * - * @param pPlugin the user plugin - * @param ret the code of callback - * @param msg the message of callback - */ -+ (void) onActionResult:(id)pPlugin retCode:(int)ret retMsg:(NSString*)msg; - -/** - * The login authentication - * - * @param data the parameters - * @param target target description - * @param sel sel description - */ -+ (void) getAccessToken:(NSMutableDictionary*)data target:(id)target sel:(SEL)sel; - -/** - * - * @Title: relaceLoginOauthURL - * @Description:According to server,it changes login oauth url http://changed_host/ - * @return replace url - */ -+ (NSString*)replaceLoginOauthURL:url; - - -@end - diff --git a/ios/include/anysdk/common/Wrapper.h b/ios/include/anysdk/common/Wrapper.h deleted file mode 100644 index cc4d410b..00000000 --- a/ios/include/anysdk/common/Wrapper.h +++ /dev/null @@ -1,110 +0,0 @@ -// -// Wrapper.h -// PluginProtocol -// -// Created by cocos2dx on 14-8-29. -// Copyright (c) 2014年 cocos2dx. All rights reserved. -// - -#import -#import "CocosRuntimeDelegate.h" - -@interface Wrapper : NSObject - -/** - * init developer.xml - */ -+ (void) analysisDeveloperInfo; - -/** - * check application - * - * @param appKey the value of appkey from AnySDK Client - * @param appSeceret the value of appSeceret from AnySDK Client - * @param privateKey the value of privateKey from AnySDK Client - * @param oauthLoginServer the value of appkey from AnySDK Client - */ -+ (void) setAppParam:(const char*)appKey AppSecret:(const char*)appSeceret PrivateKey:(const char*)privateKey OauthLoginServer:(const char*)oauthLoginServer; - -/** - * get the parameters of SDK - * - * @return the parameters of SDK - */ -+ (NSMutableDictionary*) getDeveloperInfo; - -/** - * get the information of channel - * - * @return the information of channel - */ -+ (NSMutableDictionary*) getChannelInfo; - -/** - * get the information of game - * - * @return the information of game - */ -+ (NSMutableDictionary*) getGameInfo; - -/** - * get the information of plugin - * - * @return the information of plugin - */ -+ (NSMutableDictionary*) getPluginInfo; - -/** - * get the information of tool - * - * @return the information of tool - */ -+ (NSMutableDictionary*) getToolInfo; - -/** - * get support for plug-ins - * - * @return support for plug-ins - */ -+ (NSMutableArray*) getSupportForPlugins; - -/** - * NSMutableDictionary change to NSString - * - * @param dict NSMutableDictionary value - * - * @return NSString value - */ -+ (NSString*)dictToNSString:(NSMutableDictionary*)dict; - -/** - * get the identifier of value - * - * @return the identifier of value - */ -+ (NSString*)getChannelId; - -/** - * get custom parameter from AnySDK Client - * - * @return return value description - */ -+ (NSString*) getCustomParam; - -+ (BOOL)networkReachable; - -+ (NSString*) replaceNotifyURL:(Class)class1 url:(NSString*)url; - -+ (void)reset; - -//about cocos runtime -+ (id)getCocosRuntimeSDKProxy; - -+ (void)setCocosRuntimeSDKProxy:(id)runtimeProxy; - -+ (int)getCocosRuntimeSDKVersionCode; - -+ (void)setCocosRuntimeSDKVersionCode:(int)sdkVersionCode; - - -@end diff --git a/ios/include/cocos-analytics/CAAccount.h b/ios/include/cocos-analytics/CAAccount.h deleted file mode 100644 index ab73ccc1..00000000 --- a/ios/include/cocos-analytics/CAAccount.h +++ /dev/null @@ -1,22 +0,0 @@ -#import - -typedef NS_ENUM(NSUInteger, Gender) { - Gender_Unknown, - Gender_Male, - Gender_Female -}; - -@interface CAAccount : NSObject - -+ (void)loginStart; -+ (void)loginSuccess:(NSString*)uid; -+ (void)loginFailed; -+ (void)logout; -+ (void)setAccountType:(NSString*)accountType; -+ (void)setAge:(int)age; -+ (void)setGender:(int)gender; -+ (void)createRole:(NSString*)roleID userName:(NSString*)userName race:(NSString*)race - roleClass:(NSString*)roleClass gameServer:(NSString*)gameServer; -+ (void)setLevel:(int)level; - -@end diff --git a/ios/include/cocos-analytics/CAAgent.h b/ios/include/cocos-analytics/CAAgent.h deleted file mode 100644 index 526b4580..00000000 --- a/ios/include/cocos-analytics/CAAgent.h +++ /dev/null @@ -1,14 +0,0 @@ -#import - -@interface CAAgent : NSObject - -+ (void)init:(NSString*)channelID appID:(NSString*)appID appSecret:(NSString*)appSecret; - -+ (void)onResume; -+ (void)onPause; -+ (void)onDestroy; -+ (void)enableDebug:(BOOL)enable; - -+ (BOOL)isInited; - -@end diff --git a/ios/include/cocos-analytics/CAEvent.h b/ios/include/cocos-analytics/CAEvent.h deleted file mode 100644 index e7791b5f..00000000 --- a/ios/include/cocos-analytics/CAEvent.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface CAEvent : NSObject - -+ (void)onEvent:(NSString*)eventName; -+ (void)onEventStart:(NSString*)eventName; -+ (void)onEventEnd:(NSString*)eventName; - -@end diff --git a/ios/include/cocos-analytics/CAItem.h b/ios/include/cocos-analytics/CAItem.h deleted file mode 100644 index 290a606e..00000000 --- a/ios/include/cocos-analytics/CAItem.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface CAItem : NSObject - -+ (void)buy:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount virtualCoin:(int)virtualCoin -virtualType:(NSString*)virtualType consumePoint:(NSString*)consumePoint; -+ (void)get:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason; -+ (void)consume:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason; - -@end diff --git a/ios/include/cocos-analytics/CALevels.h b/ios/include/cocos-analytics/CALevels.h deleted file mode 100644 index c97d99a8..00000000 --- a/ios/include/cocos-analytics/CALevels.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface CALevels : NSObject - -+ (void)begin:(NSString*)level; -+ (void)complete:(NSString*)level; -+ (void)failed:(NSString*)level reason:(NSString*)reason; - -@end diff --git a/ios/include/cocos-analytics/CAPeiment.h b/ios/include/cocos-analytics/CAPeiment.h deleted file mode 100644 index 542d8012..00000000 --- a/ios/include/cocos-analytics/CAPeiment.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface CAPeiment : NSObject - -+ (void)peiBegin:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType; -+ (void)peiSuccess:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType; -+ (void)peiFailed:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType; -+ (void)peiCanceled:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType; - -@end diff --git a/ios/include/cocos-analytics/CATask.h b/ios/include/cocos-analytics/CATask.h deleted file mode 100644 index bfc50ef7..00000000 --- a/ios/include/cocos-analytics/CATask.h +++ /dev/null @@ -1,23 +0,0 @@ -#import - -@interface CATask : NSObject - -@property (readonly) int GuideLine; // 新手任务 -@property (readonly) int MainLine; // 主线任务 -@property (readonly) int BranchLine; // 分支任务 -@property (readonly) int Daily; // 日常任务 -@property (readonly) int Activity; // 活动任务 -@property (readonly) int Other; // 其他任务,默认值 - -+ (void)begin:(NSString*)taskID taskType:(int)taskType; -+ (void)complete:(NSString*)taskID; -+ (void)failed:(NSString*)taskID reason:(NSString*)reason; - -+ (int)GuideLine; -+ (int)MainLine; -+ (int)BranchLine; -+ (int)Daily; -+ (int)Activity; -+ (int)Other; - -@end diff --git a/ios/include/cocos-analytics/CAVirtual.h b/ios/include/cocos-analytics/CAVirtual.h deleted file mode 100644 index 3311718f..00000000 --- a/ios/include/cocos-analytics/CAVirtual.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface CAVirtual : NSObject - -+ (void)setVirtualNum:(NSString*)type count:(long)count; -+ (void)get:(NSString*)type count:(long)count reason:(NSString*)reason; -+ (void)consume:(NSString*)type count:(long)count reason:(NSString*)reason; - -@end diff --git a/ios/libs/anysdk/appstore/libPluginProtocol.a b/ios/libs/anysdk/appstore/libPluginProtocol.a deleted file mode 100644 index 9d82431a..00000000 Binary files a/ios/libs/anysdk/appstore/libPluginProtocol.a and /dev/null differ diff --git a/ios/libs/anysdk/common/libPluginProtocol.a b/ios/libs/anysdk/common/libPluginProtocol.a deleted file mode 100644 index 88b49c0d..00000000 Binary files a/ios/libs/anysdk/common/libPluginProtocol.a and /dev/null differ diff --git a/ios/libs/libcocosanalytics.a b/ios/libs/libcocosanalytics.a deleted file mode 100644 index b32a322e..00000000 Binary files a/ios/libs/libcocosanalytics.a and /dev/null differ