MsgPublishedInternalEvent.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. Copyright (c) 2013, 2014 Paolo Patierno
  3. All rights reserved. This program and the accompanying materials
  4. are made available under the terms of the Eclipse Public License v1.0
  5. and Eclipse Distribution License v1.0 which accompany this distribution.
  6. The Eclipse Public License is available at
  7. http://www.eclipse.org/legal/epl-v10.html
  8. and the Eclipse Distribution License is available at
  9. http://www.eclipse.org/org/documents/edl-v10.php.
  10. Contributors:
  11. Paolo Patierno - initial API and implementation and/or initial documentation
  12. */
  13. using uPLibrary.Networking.M2Mqtt.Messages;
  14. namespace uPLibrary.Networking.M2Mqtt.Internal
  15. {
  16. /// <summary>
  17. /// Internal event for a published message
  18. /// </summary>
  19. public class MsgPublishedInternalEvent : MsgInternalEvent
  20. {
  21. #region Properties...
  22. /// <summary>
  23. /// Message published (or failed due to retries)
  24. /// </summary>
  25. public bool IsPublished
  26. {
  27. get { return this.isPublished; }
  28. internal set { this.isPublished = value; }
  29. }
  30. #endregion
  31. // published flag
  32. bool isPublished;
  33. /// <summary>
  34. /// Constructor
  35. /// </summary>
  36. /// <param name="msg">Message published</param>
  37. /// <param name="isPublished">Publish flag</param>
  38. public MsgPublishedInternalEvent(MqttMsgBase msg, bool isPublished)
  39. : base(msg)
  40. {
  41. this.isPublished = isPublished;
  42. }
  43. }
  44. }