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

@ -34,7 +34,7 @@ type
DosQAbstractListModel = distinct pointer DosQAbstractListModel = distinct pointer
DosStatusEventObject = distinct pointer DosStatusEventObject = distinct pointer
DosStatusOSNotificationObject = DosQObject DosStatusOSNotificationObject = DosQObject
DosParameterDefinition = object DosParameterDefinition = object
name: cstring name: cstring
metaType: cint metaType: cint
@ -348,10 +348,16 @@ proc dos_statusevent_create_osThemeEvent(engine: DosQQmlApplicationEngine): DosS
proc dos_statusevent_delete(vptr: DosStatusEventObject) {.cdecl, dynlib: dynLibName, importc.} proc dos_statusevent_delete(vptr: DosStatusEventObject) {.cdecl, dynlib: dynLibName, importc.}
# DosStatusOSNotificationObject # DosStatusOSNotificationObject
proc dos_statusosnotification_create(): DosStatusOSNotificationObject proc dos_statusosnotification_create(): DosStatusOSNotificationObject
{.cdecl, dynlib: dynLibName, importc.} {.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_show_notification(vptr: DosStatusOSNotificationObject, proc dos_statusosnotification_show_notification(vptr: DosStatusOSNotificationObject,
title: cstring, messsage: cstring, identifier: cstring) title: cstring, messsage: cstring, identifier: cstring)
{.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
{.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.} {.cdecl, dynlib: dynLibName, importc.}
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
{.cdecl, dynlib: dynLibName, importc.}