Merge pull request #34 from status-im/feat/download-messages

feat: expose to local file
This commit is contained in:
Iuri Matias 2021-09-16 16:31:39 -04:00 committed by GitHub
commit ca381eb8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View File

@ -60,3 +60,9 @@ proc url_host*(host: string): string =
proc url_replaceHostAndAddPath*(url: string, newHost: string, protocol: string = "", pathPrefix: string = ""): string = proc url_replaceHostAndAddPath*(url: string, newHost: string, protocol: string = "", pathPrefix: string = ""): string =
result = $(dos_qurl_replaceHostAndAddPath(url.cstring, protocol.cstring, newHost.cstring, pathPrefix.cstring)) result = $(dos_qurl_replaceHostAndAddPath(url.cstring, protocol.cstring, newHost.cstring, pathPrefix.cstring))
proc url_toLocalFile*(fileUrl: string): string =
result = $(dos_to_local_file(fileUrl.cstring))
proc url_fromLocalFile*(filePath: string): string =
result = $(dos_from_local_file(filePath.cstring))

View File

@ -355,3 +355,9 @@ proc dos_statusosnotification_show_notification(vptr: DosStatusOSNotificationObj
{.cdecl, dynlib: dynLibName, importc.} {.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject) proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
{.cdecl, dynlib: dynLibName, importc.} {.cdecl, dynlib: dynLibName, importc.}
proc dos_to_local_file(fileUrl: cstring): cstring
{.cdecl, dynlib: dynLibName, importc.}
proc dos_from_local_file(filePath: cstring): cstring
{.cdecl, dynlib: dynLibName, importc.}