aboutsummaryrefslogblamecommitdiff
path: root/goldap/del_response.go
blob: f2e14a7c5142a3d19163a97f1799c9c03d5329c8 (plain) (tree)




























                                                                                   
package message

import "fmt"

//
//        DelResponse ::= [APPLICATION 11] LDAPResult

func (del *DelResponse) SetResultCode(code int) {
	del.resultCode = ENUMERATED(code)
}

func readDelResponse(bytes *Bytes) (ret DelResponse, err error) {
	var res LDAPResult
	res, err = readTaggedLDAPResult(bytes, classApplication, TagDelResponse)
	if err != nil {
		err = LdapError{fmt.Sprintf("readDelResponse:\n%s", err.Error())}
		return
	}
	ret = DelResponse(res)
	return
}

func (del DelResponse) write(bytes *Bytes) int {
	return LDAPResult(del).writeTagged(bytes, classApplication, TagDelResponse)
}

func (del DelResponse) size() int {
	return LDAPResult(del).sizeTagged(TagDelResponse)
}