What I did basically, is adding the ability to create all kinds of Acks to xmmpy.
Here's how xmmpy creates regular stanzas:
The Node class is in charge of the low level operations needed to make an stanza. The Protocol class has common operations used by the message, presence and IQ stanzas. Acks are different, so they don't need those kind of operations.
So my Acks class inherits from Node.
I tested it and it builds every Ack that are going to be needed by the client.
- <a xmlns='urn:xmpp:sm:3' h=''/>
- <r xmlns='urn:xmpp:sm:3' />
- <enable xmlns='urn:xmpp:sm:3' />
- <enable xmlns='urn:xmpp:sm:3' resume='true' />
- <resume xmlns='urn:xmpp:sm:3' h='' previd='' />
So far so good.