RealWorldTerrainWebServiceBase.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* INFINITY CODE 2013-2019 */
  2. /* http://www.infinity-code.com */
  3. using System;
  4. using InfinityCode.RealWorldTerrain.ExtraTypes;
  5. namespace InfinityCode.RealWorldTerrain.Webservices
  6. {
  7. /// <summary>
  8. /// The base class for working with the web services.
  9. /// </summary>
  10. public abstract class RealWorldTerrainWebServiceBase
  11. {
  12. /// <summary>
  13. /// Event that occurs when the current request instance is disposed.
  14. /// </summary>
  15. public Action<RealWorldTerrainWebServiceBase> OnDispose;
  16. /// <summary>
  17. /// Event that occurs after OnComplete, when the response from webservice processed.
  18. /// </summary>
  19. public Action<RealWorldTerrainWebServiceBase> OnFinish;
  20. /// <summary>
  21. /// In this variable you can put any data that you need to work with requests.
  22. /// </summary>
  23. public object customData;
  24. protected RequestStatus _status;
  25. protected RealWorldTerrainWWW www;
  26. /// <summary>
  27. /// Gets the current status of the request to webservice.
  28. /// </summary>
  29. /// <value>
  30. /// The status.
  31. /// </value>
  32. public RequestStatus status
  33. {
  34. get { return _status; }
  35. }
  36. /// <summary>
  37. /// Destroys the current request to webservice.
  38. /// </summary>
  39. public abstract void Destroy();
  40. public enum RequestStatus
  41. {
  42. downloading,
  43. success,
  44. error,
  45. disposed
  46. }
  47. }
  48. }