Example #1
0
        public void TransferAccountWithIdPLogin(string accountId, string accountPassword, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
 public void QueryPush(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "QueryPush",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Push.PushConfiguration> >(handle));
 }
Example #3
0
        public void QueryTransferAccount(int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.TransferAccountInfo> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #4
0
        public void RenewTransferAccount(GamebaseRequest.Auth.TransferAccountRenewConfiguration configuration, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.TransferAccountInfo> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #5
0
        public void AddMappingForcibly(string providerName, string forcingMappingKey, Dictionary <string, object> additionalInfo, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback, "AddMapping(additionalInfo)");
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #6
0
        public void RemoveMapping(string providerName, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #7
0
        public void LoginForLastLoggedInProvider(int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #8
0
        public void AddMapping(Dictionary <string, object> credentialInfo, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(this, callback, "AddMapping(credentialInfo)");
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #9
0
 public void RequestRetryTransaction(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "RequestRetryTransaction",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableRetryTransactionResult> >(handle));
 }
 public virtual void ShowAlert(string title, string message, int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "ShowAlert",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.VoidDelegate>(handle));
 }
Example #11
0
 public void RequestItemListOfNotConsumed(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "RequestItemListOfNotConsumed",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableReceipt> > >(handle));
 }
Example #12
0
 public void RequestItemListAtIAPConsole(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "RequestItemListAtIAPConsole",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableItem> > >(handle));
 }
 public void RegisterPush(GamebaseRequest.Push.PushConfiguration pushConfiguration, int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(
         this,
         "RegisterPush",
         GamebaseCallbackHandler.GetCallback <GamebaseCallback.ErrorDelegate>(handle));
 }
Example #14
0
        private void LoginWithProviderName(string providerName, int handle)
        {
            if (false == AuthAdapterManager.Instance.IsSupportedIDP(providerName))
            {
                var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);
                GamebaseErrorNotifier.FireNotSupportedAPI(
                    this,
                    callback,
                    string.Format("Login({0})", providerName));
                GamebaseCallbackHandler.UnregisterCallback(handle);
                return;
            }

            if (false == CanLogin(handle))
            {
                return;
            }

            if (GamebaseAuthProvider.GUEST == providerName)
            {
                var requestVO = AuthMessage.GetIDPLoginMessage(providerName);
                RequestGamebaseLogin(requestVO, handle);

                return;
            }

            bool hasAdapter = AuthAdapterManager.Instance.CreateIDPAdapter(providerName);

            if (false == hasAdapter)
            {
                var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);
                callback(null, new GamebaseError(GamebaseErrorCode.AUTH_IDP_LOGIN_FAILED, message: GamebaseStrings.AUTH_ADAPTER_NOT_FOUND_NEED_SETUP));
                GamebaseCallbackHandler.UnregisterCallback(handle);
            }

            AuthAdapterManager.Instance.IDPLogin((adapterError) =>
            {
                if (Gamebase.IsSuccess(adapterError))
                {
                    var IDPAccessToken = AuthAdapterManager.Instance.GetIDPData <string>(providerName, AuthAdapterManager.MethodName.GET_IDP_ACCESS_TOKEN);
                    var requestVO      = AuthMessage.GetIDPLoginMessage(providerName, IDPAccessToken);
                    RequestGamebaseLogin(requestVO, handle);

                    return;
                }

                var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);
                if (null == callback)
                {
                    return;
                }

                GamebaseCallbackHandler.UnregisterCallback(handle);
                callback(null, new GamebaseError(GamebaseErrorCode.AUTH_IDP_LOGIN_FAILED, Domain, error: adapterError));
                AuthAdapterManager.Instance.IDPLogout(providerName);
            });
        }
Example #15
0
        public void RequestTransfer(string transferKey, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(
                this,
                "RequestTransfer",
                callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #16
0
        public virtual void Login(string providerName, Dictionary <string, object> additionalInfo, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(
                this,
                "Login(additionalInfo)",
                callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #17
0
        public void IssueTransferKey(long expiresIn, int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.TransferKeyInfo> >(handle);

            GamebaseErrorNotifier.FireNotSupportedAPI(
                this,
                "IssueTransferKey",
                callback);
            GamebaseCallbackHandler.UnregisterCallback(handle);
        }
Example #18
0
        public void RequestItemListPurchasable(int handle)
        {
            var callback = GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableItem> > >(handle);

            if (IsLoggedIn() == false)
            {
                callback(null, new GamebaseError(GamebaseErrorCode.NOT_LOGGED_IN, Domain));
                return;
            }

            bool hasAdapter = PurchaseAdapterManager.Instance.CreateIDPAdapter("iapadapter");

            if (hasAdapter == false)
            {
                GamebaseErrorNotifier.FireNotSupportedAPI(
                    this,
                    "RequestItemListPurchasable",
                    GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableItem> > >(handle));

                return;
            }

            PurchaseAdapterManager.Instance.RequestItemListPurchasable((error) =>
            {
                GamebaseSystemPopup.Instance.ShowErrorPopup(error);

                if (callback == null)
                {
                    return;
                }

                if (Gamebase.IsSuccess(error))
                {
                    callback(PurchaseAdapterManager.Instance.GetPurchasableReceiptList(), null);
                    return;
                }

                error.domain = Domain;
                callback(null, error);
            });
        }
 public void ShowToast(string message, GamebaseUIToastType type)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "ShowToast");
 }
 public void ShowToast(string message, int duration)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "ShowToast");
 }
 public virtual void ShowAlert(string title, string message)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "ShowAlert");
 }
 public bool AddOnChangedStatusListener(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "AddOnChangedStatusListener");
     return(false);
 }
 public bool RemoveOnChangedStatusListener()
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "RemoveOnChangedStatusListener");
     return(false);
 }
 public virtual void IsConnected(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "IsConnected", GamebaseCallbackHandler.GetCallback <GamebaseCallback.DataDelegate <bool> >(handle));
 }
 public virtual bool IsConnected()
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "IsConnected");
     return(true);
 }
 public string GetNetworkTypeName()
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "GetTypeName");
     return("");
 }
 public GamebaseNetworkType GetNetworkType()
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "FireNotSupportedAPI");
     return(GamebaseNetworkType.TYPE_NOT);
 }
 public virtual void ShowAlert(Dictionary <string, string> parameters, GamebaseUtilAlertType alertType, int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "ShowNotice");
 }
 override public void SetSandboxMode(bool isSandbox)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, "SetSandboxMode");
 }
Example #30
0
 override public void SetPromotionIAPHandler(int handle)
 {
     GamebaseErrorNotifier.FireNotSupportedAPI(this, GamebaseCallbackHandler.GetCallback <GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableReceipt> >(handle));
 }