♻️ Add L10n to FreenetRequest, WebInterface to SoneRequest
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / page / SoneRequest.kt
1 package net.pterodactylus.sone.web.page
2
3 import freenet.clients.http.*
4 import freenet.l10n.*
5 import freenet.support.api.*
6 import net.pterodactylus.sone.core.*
7 import net.pterodactylus.sone.web.*
8 import net.pterodactylus.util.web.*
9 import java.net.*
10
11 class SoneRequest(uri: URI, method: Method, httpRequest: HTTPRequest, toadletContext: ToadletContext, l10n: BaseL10n,
12                 val core: Core,
13                 val webInterface: WebInterface
14 ) : FreenetRequest(uri, method, httpRequest, toadletContext, l10n)
15
16 fun FreenetRequest.toSoneRequest(core: Core, webInterface: WebInterface) = SoneRequest(uri, method, httpRequest, toadletContext, l10n, core, webInterface)