MqttMsgSubscribedEventArgs.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #if (!MF_FRAMEWORK_VERSION_V4_2 && !MF_FRAMEWORK_VERSION_V4_3)
  14. using System;
  15. #else
  16. using Microsoft.SPOT;
  17. #endif
  18. namespace uPLibrary.Networking.M2Mqtt.Messages
  19. {
  20. /// <summary>
  21. /// Event Args class for subscribed topics
  22. /// </summary>
  23. public class MqttMsgSubscribedEventArgs : EventArgs
  24. {
  25. #region Properties...
  26. /// <summary>
  27. /// Message identifier
  28. /// </summary>
  29. public ushort MessageId
  30. {
  31. get { return this.messageId; }
  32. internal set { this.messageId = value; }
  33. }
  34. /// <summary>
  35. /// List of granted QOS Levels
  36. /// </summary>
  37. public byte[] GrantedQoSLevels
  38. {
  39. get { return this.grantedQosLevels; }
  40. internal set { this.grantedQosLevels = value; }
  41. }
  42. #endregion
  43. // message identifier
  44. ushort messageId;
  45. // granted QOS levels
  46. byte[] grantedQosLevels;
  47. /// <summary>
  48. /// Constructor
  49. /// </summary>
  50. /// <param name="messageId">Message identifier for subscribed topics</param>
  51. /// <param name="grantedQosLevels">List of granted QOS Levels</param>
  52. public MqttMsgSubscribedEventArgs(ushort messageId, byte[] grantedQosLevels)
  53. {
  54. this.messageId = messageId;
  55. this.grantedQosLevels = grantedQosLevels;
  56. }
  57. }
  58. }