Files
ippserver/packages/ipp/keyword.go
henrik 04a4b4157f 2-add-keyword-support (#6)
More development.

More types.
Fixed attribute groups in requests.
Started on client.
Saving data to file.

More types. Printing from chromeos works a little bit.

More types.

Spelling corrections.

WIP: Fix keyword handling

Move request to a separate file and add test.

Co-authored-by: Henrik Sölver <henrik.solver@gmail.com>
Reviewed-on: #6
Co-Authored-By: henrik <henrik.solver@gmail.com>
Co-Committed-By: henrik <henrik.solver@gmail.com>
2020-12-27 09:16:32 +01:00

34 lines
508 B
Go

package ipp
type keyWord struct {
sos *setOfStrings
}
func NewKeyWord(name string, values ...string) *keyWord {
k := new(keyWord)
k.sos = NewSetOfStrings(name, keyWordValueTag, values)
return k
}
func (k keyWord) String() string {
return k.sos.String()
}
func (k *keyWord) size() int {
return k.sos.size()
}
func (k *keyWord) valueTag() tag {
return k.sos.valueTag()
}
func (k *keyWord) marshal() []byte {
return k.sos.marshal()
}
func (k *keyWord) addValue(v string) {
k.sos.AddValue(v)
}