IModelHost.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using InABox.Core;
  3. namespace InABox.Mobile
  4. {
  5. public class TransportConnectedEventArgs : EventArgs
  6. {
  7. }
  8. public delegate void TransportConnectedEvent(TransportConnectedEventArgs args);
  9. public class TransportDisconnectedEventArgs : EventArgs
  10. {
  11. }
  12. public delegate void BackgroundUpdateStatusEvent(object sender, EventArgs args);
  13. public delegate void TransportDisconnectedEvent(TransportDisconnectedEventArgs args);
  14. public interface IModelHost
  15. {
  16. bool IsConnected();
  17. event TransportDisconnectedEvent TransportDisconnected;
  18. event TransportConnectedEvent TransportConnected;
  19. bool IsBackgroundUpdateStatusActive { get; }
  20. event BackgroundUpdateStatusEvent BackgroundUpdateStatusChanged;
  21. void AddUpdateQueue<TEntity>(QueueUpdater<TEntity> queueUpdater) where TEntity : Entity, IPersistent, IRemotable, new();
  22. void RemoveUpdateQueue<TEntity>(QueueUpdater<TEntity> queueUpdater) where TEntity : Entity, IPersistent, IRemotable, new();
  23. }
  24. }