Skip to content

Commit

Permalink
code reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuth committed Dec 25, 2021
1 parent 2d8eed8 commit efcde57
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/kotlin/de/gmuth/ipp/client/IppTemplateAttributes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,41 @@ object IppTemplateAttributes {

@JvmStatic
fun documentFormat(format: String) =
IppAttribute("document-format", MimeMediaType, format)
IppAttribute("document-format", MimeMediaType, format)

@JvmStatic
fun jobName(name: String) =
IppAttribute("job-name", NameWithoutLanguage, name.toIppString())
IppAttribute("job-name", NameWithoutLanguage, name.toIppString())

// for job group

@JvmStatic
fun jobPriority(priority: Int) =
IppAttribute("job-priority", Integer, priority)
IppAttribute("job-priority", Integer, priority)

@JvmStatic
fun copies(number: Int) =
IppAttribute("copies", Integer, number)
IppAttribute("copies", Integer, number)

@JvmStatic
fun numberUp(up: Int) =
IppAttribute("number-up", Integer, up)
IppAttribute("number-up", Integer, up)

@JvmStatic
fun printerResolution(resolution: Int, unit: Unit = DPI) =
IppAttribute("printer-resolution", Resolution, IppResolution(resolution, unit))
IppAttribute("printer-resolution", Resolution, IppResolution(resolution, unit))

@JvmStatic
fun pageRanges(ranges: Collection<IntRange>) =
IppAttribute("page-ranges", RangeOfInteger, ranges)

@JvmStatic
fun media(keyword: String) =
IppAttribute("media", Keyword, keyword)
IppAttribute("media", Keyword, keyword)

@JvmStatic
fun finishings(finishings: Collection<IppFinishing>) =
IppAttribute("finishings", IppTag.Enum, finishings.map { it.code })
IppAttribute("finishings", IppTag.Enum, finishings.map { it.code })

// support vararg parameter for convenience

Expand Down

0 comments on commit efcde57

Please sign in to comment.