public int SetUIViewCallback(int location, UIView.UIViewDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[UIViewCallback] UIViewCallback: " + message.ToString()); int uiviewState = message.GetInt("uiviewState"); if (uiviewState == 0) { UIViewRotation.Instance.SetAutoRotation(location); } else if (uiviewState == 1) { UIViewRotation.Instance.SetGameRotation(location); } if (null != callback) { callback((UIViewState)uiviewState); } }); return(handlerNum); }
public int SetDeepLinkCallback(AppEvents.DeepLinkDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[AppEventsCallback] DeepLinkCallback: " + message.ToString()); string uriString = message.GetString("uri"); System.Uri uri = null; if (null != uriString && uriString.Length > 0) { uri = new System.Uri(uriString); } if (null != callback) { callback(uri); } }); return(handlerNum); }
public int SetRequestMyProfileCalblack(Google.RequestMyProfileDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[GoogleCallback] RequestMyProfileCalblack: " + message.ToString()); Result result = message.GetResult(); GoogleProfile profile = null; IDictionary profileDic = message.GetDictionary("googleProfile"); if (null != profileDic) { string playerId = profileDic.GetString("playerId"); string googleId = profileDic.GetString("googleId"); string nickname = profileDic.GetString("nickname"); string profileImageUrl = profileDic.GetString("profileImageUrl"); profile = new GoogleProfile(playerId, googleId, nickname, profileImageUrl); } if (null != callback) { callback(result, profile); } }); return(handlerNum); }
public int SetRequestMyProfileCalblack(EveryNetmarble.RequestMyProfileDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[EveryNetmarbleCallback] RequestMyProfileCalblack: " + message.ToString()); Result result = message.GetResult(); EveryNetmarbleProfile profile = null; IDictionary profileDic = message.GetDictionary("everyNetmarbleProfile"); if (null != profileDic) { string playerId = profileDic.GetString("playerId"); string everyNetmarbleId = profileDic.GetString("everyNetmarbleId"); string nickname = profileDic.GetString("nickname"); string profileImageUrl = profileDic.GetString("profileImageUrl"); string profileThumbnailImageUrl = profileDic.GetString("profileThumbnailImageUrl"); string statusMessage = profileDic.GetString("statusMessage"); profile = new EveryNetmarbleProfile(playerId, everyNetmarbleId, nickname, profileImageUrl, profileThumbnailImageUrl, statusMessage); } if (null != callback) { callback(result, profile); } }); return(handlerNum); }
public int SetRequestGameCharacterDelegate(ForumGuild.RequestGameCharacterDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetRequestGameCharacterDelegate: " + message); Result result = message.GetResult(); ForumCharacterParameter character = null; IDictionary characterDic = message.GetDictionary("character"); if (null != characterDic) { character = new ForumCharacterParameter(characterDic); } if (null != callback) { callback(result, character); } }); return(handlerNum); }
public int SetInviteFriendsCallback(Facebook.InviteFriendsDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[FacebookCallback] InviteFriendsCallback: " + message); Result result = message.GetResult(); List <string> idList = null; IList facebookIdList = message.GetList("facebookIdList"); if (null != facebookIdList) { idList = new List <string>(); foreach (object id in facebookIdList) { idList.Add(System.Convert.ToString(id)); } } if (null != callback) { callback(result, idList); } }); return(handlerNum); }
public int SetRequestFriendsCallback(Facebook.RequestFriendsDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[FacebookCallback] RequestFriendsCallback: " + message); Result result = message.GetResult(); IList facebookProfileList = message.GetList("facebookProfileList"); List <FacebookProfile> profileList = null; if (facebookProfileList != null) { profileList = new List <FacebookProfile>(); foreach (IDictionary profileDic in facebookProfileList) { string playerId = profileDic.GetString("playerId"); string facebookId = profileDic.GetString("facebookId"); string name = profileDic.GetString("name"); profileList.Add(new FacebookProfile(playerId, facebookId, name)); } } if (null != callback) { callback(result, profileList); } }); return(handlerNum); }
public int SetRequestMyProfileCallback(Facebook.RequestMyProfileDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[FacebookCallback] RequestMyProfileCallback: " + message); Result result = message.GetResult(); FacebookProfile profile = null; IDictionary profileDic = message.GetDictionary("facebookProfile"); if (null != profileDic) { string playerId = profileDic.GetString("playerId"); string facebookId = profileDic.GetString("facebookId"); string name = profileDic.GetString("name"); profile = new FacebookProfile(playerId, facebookId, name); } if (null != callback) { callback(result, profile); } }); return(handlerNum); }
public int SetCopyPlayerIdWithOTPCallback(Session.CopyPlayerIdWithOTPDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] CopyPlayerIdWithOTPCallback: " + message.ToString()); Result result = message.GetResult(); RestrictOTPInput restrictOTPInput = null; IDictionary restrictOTPInputDic = message.GetDictionary("restrictOTPInput"); if (null != restrictOTPInputDic) { int failCount = restrictOTPInputDic.GetInt("failCount"); string retryDateTime = restrictOTPInputDic.GetString("retryDateTime"); restrictOTPInput = new RestrictOTPInput(failCount, retryDateTime); } if (null != callback) { callback(result, restrictOTPInput); } }); return(handlerNum); }
public int SetRequestFriendsCallback(EveryNetmarble.RequestFriendsDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[EveryNetmarbleCallback] RequestFriendsCallback: " + message.ToString()); Result result = message.GetResult(); IList appFriendProfileList = message.GetList("appFriendProfileList"); List <EveryNetmarbleProfile> appList = null; if (null != appFriendProfileList) { appList = new List <EveryNetmarbleProfile>(); foreach (IDictionary profileDic in appFriendProfileList) { string playerId = profileDic.GetString("playerId"); string everyNetmarbleId = profileDic.GetString("everyNetmarbleId"); string nickname = profileDic.GetString("nickname"); string profileImageUrl = profileDic.GetString("profileImageUrl"); string profileThumbnailImageUrl = profileDic.GetString("profileThumbnailImageUrl"); string statusMessage = profileDic.GetString("statusMessage"); appList.Add(new EveryNetmarbleProfile(playerId, everyNetmarbleId, nickname, profileImageUrl, profileThumbnailImageUrl, statusMessage)); } } IList nonAppFriendProfileList = message.GetList("nonAppFriendProfileList"); List <EveryNetmarbleProfile> nonappList = null; if (null != nonAppFriendProfileList) { nonappList = new List <EveryNetmarbleProfile>(); foreach (IDictionary profileDic in nonAppFriendProfileList) { string playerId = profileDic.GetString("playerId"); string everyNetmarbleId = profileDic.GetString("everyNetmarbleId"); string nickname = profileDic.GetString("nickname"); string profileImageUrl = profileDic.GetString("profileImageUrl"); string profileThumbnailImageUrl = profileDic.GetString("profileThumbnailImageUrl"); string statusMessage = profileDic.GetString("statusMessage"); nonappList.Add(new EveryNetmarbleProfile(playerId, everyNetmarbleId, nickname, profileImageUrl, profileThumbnailImageUrl, statusMessage)); } } if (null != callback) { callback(result, appList, nonappList); } }); return(handlerNum); }
public int SetRequestOTPInfoCallback(Session.RequestOTPInfoDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] RequestOTPInfoCallback: " + message.ToString()); Result result = message.GetResult(); IDictionary otpInfoDic = message.GetDictionary("otpInfo"); OTPInfo otpInfo = null; if (null != otpInfoDic) { string otp = otpInfoDic.GetString("otp"); string playerId = otpInfoDic.GetString("playerId"); string region = otpInfoDic.GetString("region"); List <OTPAuthenticationHistory> otpAuthenticationHistoryList = null; IList historyList = otpInfoDic["otpAuthenticationHistoryList"] as IList; if (historyList != null) { otpAuthenticationHistoryList = new List <OTPAuthenticationHistory>(); foreach (IDictionary history in historyList) { string historyGameCode = history.GetString("gameCode"); string historyPlayerId = history.GetString("playerId"); string creationDate = history.GetString("creationDate"); otpAuthenticationHistoryList.Add(new OTPAuthenticationHistory(historyGameCode, historyPlayerId, creationDate)); } } otpInfo = new OTPInfo(otp, playerId, region, otpAuthenticationHistoryList); } IDictionary restrictOTPInputDic = message.GetDictionary("restrictOTPInput"); RestrictOTPInput restrictOTPInput = null; if (null != restrictOTPInputDic) { int failCount = restrictOTPInputDic.GetInt("failCount"); string retryDateTime = restrictOTPInputDic.GetString("retryDateTime"); restrictOTPInput = new RestrictOTPInput(failCount, retryDateTime); } if (null != callback) { callback(result, otpInfo, restrictOTPInput); } }); return(handlerNum); }
public int SetGetWorldsAllowPushNotificationCallback(Push.GetWorldsAllowPushNotificationDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[PushCallback] GetWorldsAllowPushNotificationCallback: " + message); Result result = message.GetResult(); List <WorldAllowPushNotification> worldAllowPushNotificationList = null; IList worldAllowList = message.GetList("worldAllowPushNotificationList"); if (null != worldAllowList) { worldAllowPushNotificationList = new List <WorldAllowPushNotification>(); foreach (IDictionary worldAllow in worldAllowList) { string worldId = worldAllow.GetString("worldId"); int notice = worldAllow.GetInt("notice"); int game = worldAllow.GetInt("game"); int nightNotice = worldAllow.GetInt("nightNotice"); WorldAllowPushNotification worldAllowPushNotification = new WorldAllowPushNotification(worldId, (AllowPushNotification)notice, (AllowPushNotification)game, (AllowPushNotification)nightNotice); worldAllowPushNotificationList.Add(worldAllowPushNotification); } } //List<object> worldAllowList = message.GetList("worldAllowPushNotificationList"); //if (null != worldAllowList) //{ // worldAllowPushNotificationList = new List<WorldAllowPushNotification>(); // foreach (Dictionary<string, object> worldAllow in worldAllowList) // { // string worldId = System.Convert.ToString(worldAllow.GetValue("worldId")); // int notice = System.Convert.ToInt32(worldAllow.GetValue("notice")); // int game = System.Convert.ToInt32(worldAllow.GetValue("game")); // int nightNotice = System.Convert.ToInt32(worldAllow.GetValue("nightNotice")); // WorldAllowPushNotification worldAllowPushNotification = new WorldAllowPushNotification(worldId, (AllowPushNotification)notice, (AllowPushNotification)game, (AllowPushNotification)nightNotice); // worldAllowPushNotificationList.Add(worldAllowPushNotification); // } //} if (null != callback) { callback(result, worldAllowPushNotificationList); } }); return(handlerNum); }
public int SetCommonLogUpdateEventCallback(CommonLog.UpdateEventDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[CommonLogCallback] CommonLogUpdateEventCallback : " + message); if (null != callback) { callback(); } }); return(handlerNum); }
public int SetRewardCallback(AppEvents.RewardDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[AppEventsCallback] RewardCallback: " + message.ToString()); if (null != callback) { callback(); } }); return(handlerNum); }
public int SetAuthenticateCalblack(Google.AuthenticateDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[GoogleCallback] AuthenticateCalblack: " + message.ToString()); Result result = message.GetResult(); if (null != callback) { callback(result); } }); return(handlerNum); }
public int SetUpdateGamePlayerDelegate(ForumGuild.UpdateGamePlayerDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetUpdateGamePlayerDelegate: " + message); Result result = message.GetResult(); if (null != callback) { callback(result); } }); return(handlerNum); }
public int SetOfficialCafeIdDelegate(ForumGuild.OfficialCafeIdDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetOfficialCafeIdDelegate: " + message); Result result = message.GetResult(); string cafeId = message.GetString("cafeId"); if (null != callback) { callback(result, cafeId); } }); return(handlerNum); }
public int SetSelectChannelConnectOptionCallback(Session.SelectChannelConnectOptionDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] SelectChannelConnectOptionCallback: " + message.ToString()); Result result = message.GetResult(); if (null != callback) { callback(result); } }); return(handlerNum); }
public int SetSendPushNotificationCallback(Push.SendPushNotificationDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[PushCallback] SendPushNotificationCallback: " + message); Result result = message.GetResult(); if (null != callback) { callback(result); } }); return(handlerNum); }
public int SetPostStatusUpdateCallback(Facebook.PostStatusUpdateDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[FacebookCallback] PostStatusUpdateCallback: " + message); Result result = message.GetResult(); if (null != callback) { callback(result); } }); return(handlerNum); }
public int SetElementsCallback(CommonLog.ElementsDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[CommonLogCallback] ElementsCallback : " + message); string elements = message.GetString("elements"); if (null != callback) { callback(elements); } }); return(handlerNum); }
public int SetUIViewCallback(UIView.UIViewDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[UIViewCallback] UIViewCallback: " + message.ToString()); int uiviewState = message.GetInt("uiviewState"); if (null != callback) { callback((UIViewState)uiviewState); } }); return(handlerNum); }
public int SetConnectToChannelCallback(Session.ConnectToChannelDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] ConnectToChannelCallback: " + message.ToString()); Result result = message.GetResult(); List <ChannelConnectOption> channelConnectOptionList = null; IList optionList = message.GetList("channelConnectOptionList"); if (null != optionList) { channelConnectOptionList = new List <ChannelConnectOption>(); foreach (IDictionary option in optionList) { int type = option.GetInt("type"); string playerId = option.GetString("playerId"); int channelCode = option.GetInt("channelCode"); string channelId = option.GetString("channelId"); string region = option.GetString("region"); ChannelConnectOption channelConnectOption = new ChannelConnectOption((ChannelConnectOptionType)type, playerId, channelCode, channelId, region); channelConnectOptionList.Add(channelConnectOption); } } if (null != callback) { callback(result, channelConnectOptionList); } }); return(handlerNum); }
public int SetChannelSignInCallback(Session.ChannelSignInDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] ChannelSignInCallback: " + message.ToString()); Result result = message.GetResult(); int channelCode = message.GetInt("channelCode"); if (null != callback) { callback(result, channelCode); } }); return(handlerNum); }
public int SetCheckGuildExistenceDelegate(ForumGuild.CheckGuildExistenceDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetCheckGuildExistenceDelegate: " + message); Result result = message.GetResult(); bool isGuild = message.GetBool("isGuild"); if (null != callback) { callback(result, isGuild); } }); return(handlerNum); }
public int SetCreateArticleDelegate(ForumGuild.CreateArticleDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetCreateArticleDelegate: " + message); Result result = message.GetResult(); long articleId = System.Convert.ToInt64(message.GetString("articleId")); long bbsId = System.Convert.ToInt64(message.GetString("bbsId")); if (null != callback) { callback(result, articleId, bbsId); } }); return(handlerNum); }
public int SetAuthenticateCallback(NetmarblePC.AuthenticateDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[NetmarblePCCallback] AuthenticateCalblack: " + message.ToString()); Result result = message.GetResult(); string playerID = message.GetString("playerID"); string publicToken = message.GetString("publicToken"); if (null != callback) { callback(result, playerID, publicToken); } }); return(handlerNum); }
public int SetIsNesDelegate(ForumGuild.IsNewsDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[ForumCallback] SetIsNesDelegate: " + message); Result result = message.GetResult(); int count = message.GetInt("count"); bool isNews = message.GetBool("isNews"); if (null != callback) { callback(result, count, isNews); } }); return(handlerNum); }
public int SetIssueOTPCallback(Session.IssueOTPDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[SessionCallback] IssueOTPCallback: " + message.ToString()); Result result = message.GetResult(); string otp = message.GetString("otp"); List <OTPAuthenticationHistory> otpAuthenticationHistoryList = null; IList historyList = message.GetList("otpAuthenticationHistoryList"); if (historyList != null) { otpAuthenticationHistoryList = new List <OTPAuthenticationHistory>(); foreach (IDictionary history in historyList) { string gameCode = history.GetString("gameCode"); string playerId = history.GetString("playerId"); string creationDate = history.GetString("creationDate"); otpAuthenticationHistoryList.Add(new OTPAuthenticationHistory(gameCode, playerId, creationDate)); } } if (null != callback) { callback(result, otp, otpAuthenticationHistoryList); } }); return(handlerNum); }
public int SetGetAllowPushNotificationCallback(Push.GetAllowPushNotificationDelegate callback) { if (null == callback) { return(0); } int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message) { Log.Debug("[PushCallback] GetAllowPushNotificationCallback: " + message); Result result = message.GetResult(); int notice = message.GetInt("notice"); int game = message.GetInt("game"); int nightNotice = message.GetInt("nightNotice"); if (null != callback) { callback(result, (AllowPushNotification)notice, (AllowPushNotification)game, (AllowPushNotification)nightNotice); } }); return(handlerNum); }