~samwhited/xmpp

ref: d3ceddb51fa198df1449016fda7923afe83bb0f3 xmpp/iq.go -rw-r--r-- 895 bytes
d3ceddb5Sam Whited Add some new options to Config 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2016 Sam Whited.
// Use of this source code is governed by the BSD 2-clause license that can be
// found in the LICENSE file.

package xmpp

import (
	"encoding/xml"
)

// IQ ("Information Query") is used as a general request response mechanism.
// IQ's are one-to-one, provide get and set semantics, and always require a
// response in the form of a result or an error.
type IQ struct {
	stanza

	XMLName xml.Name `xml:"iq"`
}

type iqType int

const (
	// A GetIQ is used to query another entity for information.
	GetIQ iqType = iota

	// A SetIQ is used to provide data to another entity, set new values, replace
	// existing values, and other such operations.
	SetIQ

	// A ResultIQ is sent in response to a successful GetIQ or SetIQ stanza.
	ResultIQ

	// An ErrorIQ is sent to report that an error occured during the delivery or
	// processing of a GetIQ or SetIQ.
	ErrorIQ
)