sig
  exception Bad_packet
  class type packet_base =
    object
      method get_children : unit -> Yaxpodom.content list
      method get_error : unit -> Yaxpodom.txt * Yaxpodom.txt
      method get_from : unit -> string option
      method get_id : unit -> string option
      method get_to : unit -> string option
      method set_children : Yaxpodom.content list -> unit
      method set_from : string option -> unit
      method set_id : string option -> unit
      method set_to : string option -> unit
      method to_ele : unit -> Yaxpodom.ele
    end
  type iq_type = Get | Set | Result | IQError
  class type iq =
    object
      method get_children : unit -> Yaxpodom.content list
      method get_error : unit -> Yaxpodom.txt * Yaxpodom.txt
      method get_first_query : unit -> Yaxpodom.ele
      method get_first_query_xmlns : unit -> string
      method get_from : unit -> string option
      method get_id : unit -> string option
      method get_to : unit -> string option
      method get_type : unit -> Jabber.iq_type option
      method set_children : Yaxpodom.content list -> unit
      method set_from : string option -> unit
      method set_id : string option -> unit
      method set_to : string option -> unit
      method set_type : Jabber.iq_type option -> unit
      method to_ele : unit -> Yaxpodom.ele
    end
  val mk_iq : string -> Jabber.iq
  type presence_type =
      Unavailable
    | Subscribe
    | Subscribed
    | Unsubscribe
    | Unsubscribed
    | Probe
    | PresError
  class type presence =
    object
      method get_children : unit -> Yaxpodom.content list
      method get_error : unit -> Yaxpodom.txt * Yaxpodom.txt
      method get_from : unit -> string option
      method get_id : unit -> string option
      method get_priority : unit -> string option
      method get_show : unit -> string option
      method get_status : unit -> string option
      method get_to : unit -> string option
      method get_type : unit -> Jabber.presence_type option
      method set_children : Yaxpodom.content list -> unit
      method set_from : string option -> unit
      method set_id : string option -> unit
      method set_to : string option -> unit
      method set_type : Jabber.presence_type option -> unit
      method to_ele : unit -> Yaxpodom.ele
    end
  val mk_presence : string -> Jabber.presence
  type message_type = Normal | Chat | Groupchat | Headline | Error
  class type message =
    object
      method get_body : unit -> string option
      method get_children : unit -> Yaxpodom.content list
      method get_error : unit -> Yaxpodom.txt * Yaxpodom.txt
      method get_from : unit -> string option
      method get_id : unit -> string option
      method get_subject : unit -> string option
      method get_thread : unit -> string option
      method get_to : unit -> string option
      method get_type : unit -> Jabber.message_type option
      method set_children : Yaxpodom.content list -> unit
      method set_from : string option -> unit
      method set_id : string option -> unit
      method set_to : string option -> unit
      method set_type : Jabber.message_type option -> unit
      method to_ele : unit -> Yaxpodom.ele
    end
  val mk_message : string -> Jabber.message
  type packet =
      IQ of Jabber.iq
    | Presence of Jabber.presence
    | Message of Jabber.message
  val packet_of_ele : Yaxpodom.ele -> Jabber.packet
  val packet_base_of_packet : Jabber.packet -> Jabber.packet_base
  val packet_from : Jabber.packet -> string option
  val packet_to : Jabber.packet -> string option
  val packet_id : Jabber.packet -> string option
end