// // Copyright (C) 2014 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #if UNITY_ANDROID namespace GooglePlayGames.BasicApi.Events { using System; using System.Collections.Generic; /// /// An interface for interacting with events. /// /// See online /// documentation for Events for more information. /// /// All callbacks in this interface must be invoked on the game thread. /// public interface IEventsClient { /// /// Fetches all events defined for this game. /// /// The source of the event (i.e. whether we can return stale cached /// values). /// A callback for the results of the request. The passed list will only /// be non-empty if the request succeeded. This callback will be invoked on the game thread. /// void FetchAllEvents(DataSource source, Action> callback); /// /// Fetchs the event with the specified ID. /// /// The source of the event (i.e. whether we can return stale cached /// values). /// The ID of the event. /// A callback for the result of the event. If the request failed, the /// passed event will be null. This callback will be invoked on the game thread. void FetchEvent(DataSource source, string eventId, Action callback); /// /// Increments the indicated event. /// /// The ID of the event to increment. /// The number of steps to increment by. void IncrementEvent(string eventId, uint stepsToIncrement); } } #endif