MessageBody.swift 507 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // MessageBody.swift
  3. // Naterade
  4. //
  5. // Created by Nathan Racklyeft on 9/4/15.
  6. // Copyright © 2015 Nathan Racklyeft. All rights reserved.
  7. //
  8. import Foundation
  9. public protocol MessageBody: CustomStringConvertible {
  10. static var length: Int {
  11. get
  12. }
  13. var txData: Data {
  14. get
  15. }
  16. }
  17. public protocol DecodableMessageBody: MessageBody {
  18. init?(rxData: Data)
  19. }
  20. public protocol DictionaryRepresentable {
  21. var dictionaryRepresentation: [String: Any] {
  22. get
  23. }
  24. }