mirror of https://github.com/status-im/nimqml.git
Merge pull request #34 from status-im/feat/download-messages
feat: expose to local file
This commit is contained in:
commit
ca381eb8a2
|
@ -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))
|
||||||
|
|
|
@ -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.}
|
|
Loading…
Reference in New Issue