aboutsummaryrefslogtreecommitdiff
path: root/goldap/filter_present.go
blob: 686b83a2c76a7d5fa38dffd7683c78990de1d140 (plain) (blame)
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
package message

import "fmt"

//             present         [7] AttributeDescription,
func readFilterPresent(bytes *Bytes) (ret FilterPresent, err error) {
	var attributedescription AttributeDescription
	attributedescription, err = readTaggedAttributeDescription(bytes, classContextSpecific, TagFilterPresent)
	if err != nil {
		err = LdapError{fmt.Sprintf("readFilterPresent:\n%s", err.Error())}
		return
	}
	ret = FilterPresent(attributedescription)
	return
}

//             present         [7] AttributeDescription,
func (f FilterPresent) write(bytes *Bytes) int {
	return AttributeDescription(f).writeTagged(bytes, classContextSpecific, TagFilterPresent)
}
func (filterAnd FilterPresent) getFilterTag() int {
	return TagFilterPresent
}

//             present         [7] AttributeDescription,
func (f FilterPresent) size() int {
	return AttributeDescription(f).sizeTagged(TagFilterPresent)
}