MsgPublishedInternalEvent.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 M2Mqtt.Messages;
  14. using M2Mqtt.Messages;
  15. namespace M2Mqtt.Internal
  16. {
  17. /// <summary>
  18. /// Internal event for a published message
  19. /// </summary>
  20. public class MsgPublishedInternalEvent : MsgInternalEvent
  21. {
  22. #region Properties...
  23. /// <summary>
  24. /// Message published (or failed due to retries)
  25. /// </summary>
  26. public bool IsPublished
  27. {
  28. get { return isPublished; }
  29. internal set { isPublished = value; }
  30. }
  31. #endregion
  32. // published flag
  33. bool isPublished;
  34. /// <summary>
  35. /// Constructor
  36. /// </summary>
  37. /// <param name="msg">Message published</param>
  38. /// <param name="isPublished">Publish flag</param>
  39. public MsgPublishedInternalEvent(MqttMsgBase msg, bool isPublished)
  40. : base(msg)
  41. {
  42. isPublished = isPublished;
  43. }
  44. }
  45. }