Data Structure
Unity3D
CallbackRet
LoginRet
TokenRet
eTokenType
WakeupRet
LocationRet
RelationRet
PersonInfo
ShareRet
GroupRet
QQGroupInfo
WXGroupInfo
eFlag
eQQScene
eWechatScene
ePlatform
eBuglyLogLevel
NoticeInfo
GetCountryFromIPRet
CheckULRet
eULCheckStep
GetIPInfoRet
Android
CallbackRet
LoginRet
TokenRet
eTokenType
WakeupRet
LocationRet
RelationRet
PersonInfo
ShareRet
GroupRet
QQGroupInfo
WXGroupInfo
eFlag
eQQScene
eWechatScene
ePlatform
eBuglyLogLevel
NoticeInfo
GetCountryFromIPRet
GetIPInfoRet
IOS
CallbackRet
LoginRet
TokenRet
eTokenType
WakeupRet
LocationRet
RelationRet
PersonInfo
ShareRet
GroupRet
QQGroupInfo
WXGroupInfo
eFlag
eQQScene
eWechatScene
ePlatform
eBuglyLogLevel
NoticeInfo
GetCountryFromIPRet
CheckULRet
eULCheckStep
GetIPInfoRet
Others
Data Structure
System Tools
Error code / Unity3D / CallbackRet

CallbackRet

public abstract class CallbackRet{
    public int flag=eFlag.eFlag_Error;//result
    public string desc="";
    public int platform=0;//platform type
}

LoginRet

Store the information gotten after the user logs in the game

public class LoginRet: CallbackRet{
    public string open_id=""; //the user account's unique identifier
    public string user_id=""; //the user's ID; reserved; the game doesn't need to care about it
    public string pf="";      //used for payment; call WGGetPf()to get it
    public string pf_key="";  //used for payment;     call WGGetPfKey()to get it
    public String prajna_ext;   //New fields for 3.3.7
    public List<TokenRet> token=new List<TokenRet>(); //store the token list
}

TokenRet

Token information

public class TokenRet{
        public int type=0;         //token type  eTokenType type
        public string value="";    //token value
        public long expiration=0;  //token expiration time (the game doesn't need to care about it)
}

eTokenType

token type

public class eTokenType{
    public const int eToken_QQ_Access=1;   //mobile QQ  accesstoken
    public const int eToken_QQ_Pay=2;      //mobile QQ  paytoken
    public const int eToken_WX_Access=3;   //WeChat accesstoken
    public const int eToken_WX_Code=4;     //No need to give attention to it
    public const int eToken_WX_Refresh=5;  //WeChat refreshtoken
}
platform token type token use type valid period
mobile QQ accesstoken query mobile QQ user, friends, relation chain, share and other functions eToken_QQ_Access 90 days
mobile QQ paytoken pay-related eToken_QQ_Pay 7 days
WeChat accesstoken query WeChat user, friends, relation chain, share, payment,etc. eToken_WX_Access 2 hours
WeChat refreshtoken refresh accesstoken eToken_WX_Refresh 30 days

WakeupRet

Store the information passed from the platform to the client when the game is awakened by the platform

public class WakeupRet: CallbackRet{
    /** Passed openid */
    public string open_id="";
    /** Correspond to mediaTagName in WeChat message */
    public string media_tag_name="";
    /** extended message, which is brought to the game when the game is evoked */
    public string messageExt="";
    /** language       currently available only for versions higher than WeChat 5.1 and not for mobile QQ */
    public string lang="";
    /** country     currently available only for versions higher than WeChat 5.1 and not for mobile QQ */
    public string country="";
    public List<KVPair> extInfo=new List<KVPair>();
  ...
}

LocationRet

Geographical position information

public class LocationRet : CallbackRet{
    public double longitude;
    public double latitude;
    ...
}

RelationRet

Relation chain information, that is, "a group of" friends' information

public class RelationRet : CallbackRet{
    public List<PersonInfo> persons=new List<PersonInfo>();
    public List<PersonInfo> _persons {
        get{return persons;}
        set{ persons=value;}
    }
  //...
    public RelationRet(){
    }
}

PersonInfo

Friend's information

public class PersonInfo{
    public string nickName="";
    public string openId="";
    public string gender="";
    public string pictureSmall="";
    public string pictureMiddle="";
    public string pictureLarge="";
    public string province="";
    public string city="";
    public string gpsCity="";

    public float distance=0;
    public bool isFriend=false;
    public long timestamp=0;

    public string lang="";
    public string country="";
}

ShareRet

Shared information

public class ShareRet: CallbackRet{
    public string extInfo="";
    ...
}

GroupRet

Group information

public class GroupRet: CallbackRet{
        public int errorCode=0;
        public QQGroupInfo mQQGroupInfo ;
        public WXGroupInfo mWXGroupInfo ;
        ...
}

QQGroupInfo

QQ group information

public class QQGroupInfo{
    public string groupName=""; /*group name */
    public string fingerMemo="";/*the group's brief introduction */
    public string memberNum=""; /*number of group members */
    public string maxNum=""; /*The maximum number of members that the group can accommodate */
    public string ownerOpenid=""; /*group leader's openid */
    public string unionid=""; /*Guild ID bound with the QQ group */
    public string zoneid=""; /*Zone ID */
    public string adminOpenids=""; /*Administrator's openid. If there are multiple administrators, use "," to separate them, for example 0000000000000000000000002329FBEF,0000000000000000000000002329FAFF */
    public string groupOpenid="";  /*groupOpenid of the QQ group bound with the game guild ID */
    public string groupKey="";   /*the corresponding key of the QQ group needing to add */
}

WXGroupInfo

WeChat group information

public class WXGroupInfo{
    public string openIdList="";      /* group member's openID */
    public string memberNum="";       /* number of group members */
    public string chatRoomURL="";     /*such as group chat URL */
}

eFlag

Login return code

public class eFlag{
    public const int eFlag_Succ=0;
    /** QQ&QZone login fail and can't get accesstoken */
    public const int eFlag_QQ_NoAcessToken=1000;
    /** QQ&QZone user has cancelled login process */
    public const int eFlag_QQ_UserCancel=1001;

    /** QQ&QZone login fail (tencentDidNotLogin) */
    public const int eFlag_QQ_LoginFail=1002;
    /** QQ&QZone networkErr */
    public const int eFlag_QQ_NetworkErr=1003;
    /** QQ is not install */
    public const int eFlag_QQ_NotInstall=1004;
    /** QQ don't support open api */
    public const int eFlag_QQ_NotSupportApi=1005;
    /** QQ&QZone networkErr */
    public const int eFlag_QQ_AccessTokenExpired=1006;
    /** pay token expiration time  */
    public const int eFlag_QQ_PayTokenExpired=1007;

    /** Weixin is not installed */
    public const int eFlag_WX_NotInstall=2000;
    /** Weixin don't support api */
    public const int eFlag_WX_NotSupportApi=2001;
    /** Weixin user has cancelled */
    public const int eFlag_WX_UserCancel=2002;
    /** Weixin User has denys */
    public const int eFlag_WX_UserDeny=2003;
    public const int eFlag_WX_LoginFail=2004;
    /** Weixin (WeChat) refreshes the token successfully */
    public const int eFlag_WX_RefreshTokenSucc=2005;
    /** Weixin (WeChat) refreshes the token unsuccessfully */
    public const int eFlag_WX_RefreshTokenFail=2006;
    /** Weixin accessToken expires; try to use refreshtoken to refresh the token */
    public const int eFlag_WX_AccessTokenExpired=2007;
    /** Weixin refresh also expires */
    public const int eFlag_WX_RefreshTokenExpired=2008;

    public const int eFlag_Error=-1;

    /** Automatic login fails; need to reauthorize; errors include the local token expiration, refresh failure and other errors */
    public const int eFlag_Local_Invalid=-2;

    /** not in the white list */
    public const int eFlag_NotInWhiteList=-3;
    /** need to guide the user to open the location-based service(LBS) */
    public const int eFlag_LbsNeedOpenLocationService=-4;
    /** Position fails   */
    public const int eFlag_LbsLocateFail=-5;
	/** Positioning failed The positioning switch is not turned on  */
    public const int eFlag_LbsNeedOpenLocationSwitch=-6;
    /** The user has not authorized the relationship chain permission   */
    public const int eFlag_UnPermission=-9;
	/** Positioning timeout */
	public const int eFlag_LbsLocateTimeout=-11;

    /* Quick login-related return value */
    /**need to enter the login page */
    public const int eFlag_NeedLogin=3001;
    /**Use URL to log in successfully */
    public const int eFlag_UrlLogin=3002;
    /**Need to pop up the account inconsistency prompt */
    public const int eFlag_NeedSelectAccount=3003;
    /**Refresh token via the URL */
    public const int eFlag_AccountRefresh=3004;
    /*Add the logic that is checking tokens */
    public const int eFlag_Checking_Token=5001;
    /**Under logging in now. Please wait for login callback before operation */
    public const int eFlag_Logining=5002;
    /**Under logging in now. Please wait for login callback before operation */
    public const int eFlag_Login_Timeout=5003;
    /**Call interfaces too frequently */
    public const int eFlag_RequestTooFrequently=5004;
	/* built-in browser closed*/
    public const int eFlag_Webview_closed=6001;
	/**The url for opening the account cancellation page is invalid */
	public const int eFlag_Invalid_Delete_Account_URL=6002;
	/**In case of the account cancellation operation, the account is not logged in or the login channel does not support the operation */
	public const int eFlag_Invalid_Login_Channel=6003;
    /* The event that webview js passes parameters to native*/
    public const int eFlag_Webview_page_event=7000;

    /* This feature is not available under Guest pattern */
    public const int eFlag_InvalidOnGuest=-7;
    /* Guest's token is invalid */
    public const int eFlag_Guest_AccessTokenInvalid=4001;
    /* Log in the Guest pattern fails */
    public const int eFlag_Guest_LoginFailed=4002;
    /* Registration in the Guest pattern fails */
    public const int eFlag_Guest_RegisterFailed=4003;
}

eQQScene

Mobile QQ scene enumeration

public enum eQQScene{
    QQScene_None=0,
    QQScene_QZone=1, //Qzone
    QQScene_Session=2 //mobile QQ session
}

eWechatScene

WeChat scene enumeration

public enum eWechatScene{
    WechatScene_Session=0, //WeChat session
    WechatScene_Timeline=1 //WeChat Moments
}

ePlatform

Platform enumeration

public enum ePlatform{
    ePlatform_None=0, //Not login
    ePlatform_Weixin=1, //WeChat platform
    ePlatform_QQ=2, //mobile QQ platform
    ePlatform_WTLogin=3, //WTLogin login
    ePlatform_QQHall=4, //mobile QQ game hall
    ePlatform_Guest=5, //guest login
    ePlatform_Auto=6 //Automatic login; use the last platform 
}

NoticeInfo

Notice information

public class NoticeInfo{
    public string msg_id; /* notice id */
    public string open_id; /* the user's open_id */
    public string msg_url ; /* notice's hoplink */
    public int msg_type ; /* notice display type, scroll out */
    public string msg_scene ; /* notice display scene; the administration end's back-end configuration */
    public string start_time; /* notice valid period's start time */
    public string end_time ; /* notice valid period's end time */
    public string update_time ; /* notice update time */
    public int content_type;/* notice content type,eMSG_CONTENTTYPE */
    public int msg_order;/*notice priority level */

    /*text notice's special field */
    public string msg_title ; /* notice title */
    public string msg_content;/* notice content */

    /*webpage notice's special field */
    public string content_url;
    public List<PicInfo> picArray=new List<PicInfo>();

    public string msg_custom;/*User-defined parameters*/

}

Level of log reported to bugly

eBuglyLogLevel

public enum eBuglyLogLevel{
    eBuglyLogLevel_S=0, /* Silent */
    eBuglyLogLevel_E=1, /* Error */
    eBuglyLogLevel_W=2, /* Warnning */
    eBuglyLogLevel_I=3, /* Info */
    eBuglyLogLevel_D=4, /* Debug */
    eBuglyLogLevel_V=5, /* Verbose */
 }

eApiName

public enum eApiName{
    eApiName_WGSendToQQWithPhoto=0,
    eApiName_WGJoinQQGroup=1,
    eApiName_WGAddGameFriendToQQ=2,
    eApiName_WGBindQQGroup=3
}

LocalMessageIOS

public class LocalMessageIOS{
    public string fireDate { get; set; }        /*local push's triggering time, format yyyy-MM-dd HH:mm:ss */
    public string alertBody { get; set; }       /*the push content */
    public int badge { get; set; }              /*the number of the superscript*/
    public string alertAction { get; set; }     /*replace the button text content of the popup box (default to"Start") */
    public List<KVPair> userInfo { get; set; }  /*user-defined parameter, which can be used to identify push and add additional information */
    public string userInfoKey { get; set; }     /*the identifier Key of the local push in the front-end push */
    public string userInfoValue { get; set; }   /*the corresponding value of the identifier Key of the local push in the front-end push */

    public LocalMessageIOS(){
        fireDate="";
        alertBody="";
        alertAction="";
        userInfoKey="";
        userInfoValue="";
    }
}

LocalMessageAndroid

public class LocalMessageAndroid{
    public int type { get; set; }                   /* message type: 1: notification, 2: message */
    public int action_type { get; set; }            /* action type, 1 open activity or app itself, 2 open webview, 3 open Intent, 4 open app via the package name; default to 1 */
    public String title { get; set; }               /* message title: message title */
    public String content { get; set; }             /* message content: message content */
    public String custom_content { get; set; }      /* the message's user-defined content */
    public int icon_type { get; set; }              /* Is the notification bar icon an in-app icon or an uploaded icon (0 means in-app icon, 1 means uploaded icon; default to 0) */
    public int lights { get; set; }                 /* Is it a breathing light? (0 no, 1 yes; default to 1) */
    public int ring { get; set; }                   /* Is it a ring?  (0 no, 1 yes; default to 1) */
    public int vibrate { get; set; }                /* Is it a vibration?  (0 no, 1 yes; default to 1) */
    public int style_id { get; set; }               /* Do Web-end settings cover the notification style numbered build_id? default to 1, 0 no, 1 yes */
    public long builderId { get; set; }             /* message style, default to 0 or not set */
    public String activity { get; set; }            /* open the specified Activity, such as: com.qq.xgdemo.AboutActivity. When action type is 1 or 4, the action is valid */
    public String packageDownloadUrl { get; set; }
    public String packageName { get; set; }         /* launch other app's package name. When action type is 4, the action is valid */
    public String icon_res { get; set; }            /* in-app icon file name (xg.png) or downloaded icon's url, such as: xg or image url */
    public String date { get; set; }                /* date of popping up notification; the format is ”yyyyMMdd” */
    public String hour { get; set; }                /* date of popping up notification, in hours */
    public String min { get; set; }                 /* date of popping up notification, in minutes */
    public String intent { get; set; }              /* set and open intent, such as (10086 dial page ) intent: 10086#Intent;scheme=tel;action=android.intent.action.DIAL;S.key=value;end; when action type is 3, the action is valid */
    public String url { get; set; }                 /* open url, such as:http://www.qq.com. When action type is 2, the action is valid */
    public String ring_raw { get; set; }            /* specify in-app sound (ring.mp3), such as: ring */
    public String small_icon { get; set; }          /* specify the status bar's small picture (xg.png), such as:xg */

    public LocalMessageAndroid(){
        type=1;
        action_type=-1;
        icon_type=-1;
        lights=-1;
        ring=-1;
        vibrate=-1;
        style_id=-1;
        builderId=-1;
        content="";
        custom_content="";
        activity="";
        packageDownloadUrl="";
        packageName="";
        icon_res="";
        date="";
        hour="";
        intent="";
        min="";
        title="";
        url="";
        ring_raw="";
        small_icon="";
    }
}

eMSDK_SCREENDIR

Screen orientation

public enum eMSDK_SCREENDIR{
    eMSDK_SCREENDIR_SENSOR=0, /* Portrait and landscape modes */
    eMSDK_SCREENDIR_PORTRAIT=1, /* Portrait */
    eMSDK_SCREENDIR_LANDSCAPE=2 /* Landscape */
}

GetCountryFromIPRet

typedef struct
{
    int ret;                        // query result flag; 0 means success
    std::string msg;                // description
    std::string country;            // country
    bool isQueryByRequestHeader;    // indicate whether to query the request header
} GetCountryFromIPRet;

CheckULRet

public class CheckULRet 
{
    public int step;          //检查步骤
    public bool success;      // 检测是否成功
    public string errorInfo;  // 检测信息
    public string suggestion; //出错时的建议
}

eULCheckStep

public enum eULCheckStep 
{
    eULCheckStepParams=0,             // parameter check
    eULCheckStepSystemVersion=1,      // current system version check
    eULCheckStepWechatVersion=2,      // WeChat client version check
    eULCheckStepSDKInnerOperation=3,  // WeChat SDK internal operation check
    eULCheckStepLaunchWechat=4,       // App pulls up WeChat to check
    eULCheckStepBackToCurrentApp=5,   // Return current App check from WeChat
    eULCheckStepFinal=6,              // final check
} 

GetIPInfoRet

public class GetIPInfoRet : CallbackRet
{
    public int country_no;  //Country number
    public int province_no; //Province number
    public int city_no;     //City number
    public string country;  //Country
    public string province; //Province
    public string city;     //City
    public bool isQueryByRequestHeader; //A flag used to show whether to query the request header
}