public void GetCaptureCapabilities(Action <ResponseStatus, VideoCapabilities> callback)
        {
            Misc.CheckNotNull(callback);
            callback = CallbackUtils.ToOnGameThread(callback);
            mManager.GetCaptureCapabilities(
                response => {
                var status = ConversionUtils.ConvertResponseStatus(response.GetStatus());

                if (!response.RequestSucceeded())
                {
                    callback(status, null);
                }
                else
                {
                    callback(status, FromNativeVideoCapabilities(response.GetData()));
                }
            });
        }
        public void IsCaptureAvailable(VideoCaptureMode captureMode, Action <ResponseStatus, bool> callback)
        {
            Misc.CheckNotNull(callback);
            callback = CallbackUtils.ToOnGameThread(callback);
            mManager.IsCaptureAvailable(ConversionUtils.ConvertVideoCaptureMode(captureMode),
                                        response => {
                var status = ConversionUtils.ConvertResponseStatus(response.GetStatus());

                if (!response.RequestSucceeded())
                {
                    callback(status, false);
                }
                else
                {
                    callback(status, response.IsCaptureAvailable());
                }
            });
        }
Esempio n. 3
0
        public void Fetch(DataSource source, string questId, Action <ResponseStatus, IQuest> callback)
        {
            Misc.CheckNotNull(questId);
            Misc.CheckNotNull(callback);
            callback = CallbackUtils.ToOnGameThread(callback);
            mManager.Fetch(ConversionUtils.AsDataSource(source), questId,
                           response =>
            {
                var status = ConversionUtils.ConvertResponseStatus(response.ResponseStatus());

                if (!response.RequestSucceeded())
                {
                    callback(status, null);
                }
                else
                {
                    callback(status, response.Data());
                }
            });
        }
Esempio n. 4
0
        public void FetchAllEvents(DataSource source, Action <ResponseStatus, List <IEvent> > callback)
        {
            bubble.CheckNotNull(callback);
            callback = CallbackUtils.ToOnGameThread <ResponseStatus, List <IEvent> >(callback);

            mEventManager.FetchAll(ConversionUtils.AsDataSource(source),
                                   response =>
            {
                var responseStatus =
                    ConversionUtils.ConvertResponseStatus(response.ResponseStatus());

                if (!response.RequestSucceeded())
                {
                    callback(responseStatus, new List <IEvent>());
                }
                else
                {
                    callback(responseStatus, response.Data().Cast <IEvent>().ToList());
                }
            });
        }
Esempio n. 5
0
        public void FetchMatchingState(DataSource source, QuestFetchFlags flags,
                                       Action <ResponseStatus, List <IQuest> > callback)
        {
            Misc.CheckNotNull(callback);
            callback = CallbackUtils.ToOnGameThread(callback);

            mManager.FetchList(ConversionUtils.AsDataSource(source), (int)flags,
                               response =>
            {
                var status = ConversionUtils.ConvertResponseStatus(response.ResponseStatus());

                if (!response.RequestSucceeded())
                {
                    callback(status, null);
                }
                else
                {
                    callback(status, response.Data().Cast <IQuest>().ToList());
                }
            });
        }
Esempio n. 6
0
 public void ShowAllQuestsUI(Action <QuestUiResult, IQuest, IQuestMilestone> callback)
 {
     Misc.CheckNotNull <Action <QuestUiResult, IQuest, IQuestMilestone> >(callback);
     callback = CallbackUtils.ToOnGameThread <QuestUiResult, IQuest, IQuestMilestone>(callback);
     this.mManager.ShowAllQuestUI(NativeQuestClient.FromQuestUICallback(callback));
 }
Esempio n. 7
0
 public void ShowAllQuestsUI(Action <QuestUiResult, IQuest, IQuestMilestone> callback)
 {
     Misc.CheckNotNull(callback);
     callback = CallbackUtils.ToOnGameThread <QuestUiResult, IQuest, IQuestMilestone>(callback);
     mManager.ShowAllQuestUI(FromQuestUICallback(callback));
 }