Ejemplo n.º 1
0
 public void DoHasLicenseRequest(
     string appId,
     string callbackID,
     GameroomFacebook.OnComplete completeDelegate)
 {
     // Stub
 }
        public void DoAppRequestRequest(
            string appId,
            string message,
            string actionType,
            string objectId,
            string to,
            string filters,
            string excludeIDs,
            string maxRecipients,
            string data,
            string title,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new AppRequestRequest(
                appId,
                message,
                actionType,
                objectId,
                to,
                filters,
                excludeIDs,
                maxRecipients,
                data,
                title);

            this.HandleRequest <AppRequestRequest, AppRequestResponse>(
                request,
                callbackId,
                completeDelegate);
        }
Ejemplo n.º 3
0
 public void DoPayPremiumRequest(
     string appId,
     string callbackID,
     GameroomFacebook.OnComplete completeDelegate)
 {
     // Stub
 }
        public void DoFeedShareRequest(
            string appId,
            string toId,
            string link,
            string linkName,
            string linkCaption,
            string linkDescription,
            string pictureLink,
            string mediaSource,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new FeedShareRequest(
                appId,
                toId,
                link,
                linkName,
                linkCaption,
                linkDescription,
                pictureLink,
                mediaSource);

            this.HandleRequest <FeedShareRequest, FeedShareResponse>(
                request,
                callbackId,
                completeDelegate);
        }
        public void DoPayRequest(
            string appId,
            string method,
            string action,
            string product,
            string productId,
            string quantity,
            string quantityMin,
            string quantityMax,
            string requestId,
            string pricepointId,
            string testCurrency,
            string developerPayload,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new PayRequest(
                appId,
                method,
                action,
                product,
                productId,
                quantity,
                quantityMin,
                quantityMax,
                requestId,
                pricepointId,
                testCurrency,
                developerPayload);

            this.HandleRequest <PayRequest, PayResponse>(
                request,
                callbackId,
                completeDelegate);
        }
Ejemplo n.º 6
0
        public void DoLoginRequest(
            string appID,
            string permissions,
            string callbackID,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var result = MockResults.GetLoginResult(int.Parse(callbackID), permissions, this.ResultExtras);

            completeDelegate(new ResultContainer(result));
        }
Ejemplo n.º 7
0
        private IEnumerator WaitForPipeResponse(
            GameroomFacebook.OnComplete onCompleteDelegate,
            string callbackId)
        {
            while (!this.GameroomFacebookImpl.HaveReceivedPipeResponse())
            {
                yield return(null);
            }

            onCompleteDelegate(new ResultContainer(this.GameroomFacebookImpl.GetPipeResponse(callbackId)));
        }
 private void HandleRequest <T, R>(
     T request,
     string callbackId,
     GameroomFacebook.OnComplete completeDelegate)
     where T : PipePacketRequest
     where R : PipePacketResponse
 {
     this.clientPipe.SendRequest <R>(request);
     this.facebookGameObject.WaitForResponse(
         completeDelegate,
         callbackId);
 }
        public void DoHasLicenseRequest(
            string appId,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new HasLicenseRequest(appId);

            this.HandleRequest <HasLicenseRequest, HasLicenseResponse>(
                request,
                callbackId,
                completeDelegate);
        }
        public void DoPayPremiumRequest(
            string appId,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new PayPremiumRequest(appId);

            this.HandleRequest <PayPremiumRequest, PayResponse>(
                request,
                callbackId,
                completeDelegate);
        }
Ejemplo n.º 11
0
 public void DoFeedShareRequest(
     string appId,
     string toId,
     string link,
     string linkName,
     string linkCaption,
     string linkDescription,
     string pictureLink,
     string mediaSource,
     string callbackID,
     GameroomFacebook.OnComplete completeDelegate)
 {
     // Stub
 }
        public void DoLoginRequest(
            string appID,
            string permissions,
            string callbackId,
            GameroomFacebook.OnComplete completeDelegate)
        {
            var request = new LoginRequest(
                appID,
                permissions);

            this.HandleRequest <LoginRequest, LoginResponse>(
                request,
                callbackId,
                completeDelegate);
        }
        public void Init(GameroomFacebook.OnComplete completeDelegate)
        {
            string accessTokenInfo;

            Utilities.CommandLineArguments.TryGetValue("/access_token", out accessTokenInfo);
            if (accessTokenInfo != null)
            {
                accessTokenInfo = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(accessTokenInfo));
                completeDelegate(new ResultContainer(accessTokenInfo));
            }
            else
            {
                completeDelegate(new ResultContainer(string.Empty));
            }
        }
Ejemplo n.º 14
0
        public void DoAppRequestRequest(
            string appId,
            string message,
            string actionType,
            string objectId,
            string to,
            string filters,
            string excludeIDs,
            string maxRecipients,
            string data,
            string title,
            string callbackID,
            GameroomFacebook.OnComplete completeDelegate)
        {
            int cbid = Convert.ToInt32(callbackID);

            completeDelegate(new ResultContainer(MockResults.GetGenericResult(cbid, this.ResultExtras)));
        }
Ejemplo n.º 15
0
 public void DoPayRequest(
     string appId,
     string method,
     string action,
     string product,
     string productId,
     string quantity,
     string quantityMin,
     string quantityMax,
     string requestId,
     string pricepointId,
     string testCurrency,
     string developerPayload,
     string callbackID,
     GameroomFacebook.OnComplete completeDelegate)
 {
     // Stub
 }
Ejemplo n.º 16
0
        public void Init(GameroomFacebook.OnComplete completeDelegate)
        {
            // Handle testing of init returning access token. It would be nice
            // to not have init return the access token but this could be
            // a breaking change for people who read the raw result
            ResultContainer resultContainer;
            IDictionary <string, object> resultExtras = this.ResultExtras;

            if (resultExtras != null)
            {
                var result = MockResults.GetGenericResult(0, resultExtras);
                resultContainer = new ResultContainer(result);
            }
            else
            {
                resultContainer = new ResultContainer(string.Empty);
            }

            completeDelegate(resultContainer);
        }
Ejemplo n.º 17
0
 public void WaitForResponse(
     GameroomFacebook.OnComplete onCompleteDelegate,
     string callbackId)
 {
     this.StartCoroutine(this.WaitForPipeResponse(onCompleteDelegate, callbackId));
 }