Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Merge requests
!102
Release 1.0.0
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Release 1.0.0
development
into
main
Overview
0
Commits
1078
Pipelines
0
Changes
1
Merged
Release 1.0.0
Dariusz Rybicki
requested to merge
development
into
main
Sep 23, 2022
Overview
0
Commits
1078
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
c34548d0
Show latest version
1 file
+
23
−
11
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
c34548d0
Add Params struct to InitFileTransfer function
· c34548d0
Dariusz Rybicki
authored
Sep 19, 2022
Sources/XXClient/Functions/InitFileTransfer.swift
+
23
−
11
View file @ c34548d0
Edit in single-file editor
Open in Web IDE
Show full file
@@ -2,28 +2,40 @@ import Bindings
@@ -2,28 +2,40 @@ import Bindings
import
XCTestDynamicOverlay
import
XCTestDynamicOverlay
public
struct
InitFileTransfer
{
public
struct
InitFileTransfer
{
public
var
run
:
(
Int
,
Data
,
Data
,
ReceiveFileCallback
)
throws
->
FileTransfer
public
struct
Params
:
Equatable
{
public
init
(
e2eId
:
Int
,
e2eFileTransferParamsJSON
:
Data
=
GetE2EFileTransferParams
.
liveDefault
(),
fileTransferParamsJSON
:
Data
=
GetFileTransferParams
.
liveDefault
()
)
{
self
.
e2eId
=
e2eId
self
.
e2eFileTransferParamsJSON
=
e2eFileTransferParamsJSON
self
.
fileTransferParamsJSON
=
fileTransferParamsJSON
}
public
var
e2eId
:
Int
public
var
e2eFileTransferParamsJSON
:
Data
=
GetE2EFileTransferParams
.
liveDefault
()
public
var
fileTransferParamsJSON
:
Data
=
GetFileTransferParams
.
liveDefault
()
}
public
var
run
:
(
Params
,
ReceiveFileCallback
)
throws
->
FileTransfer
public
func
callAsFunction
(
public
func
callAsFunction
(
e2eId
:
Int
,
params
:
Params
,
e2eFileTransferParamsJSON
:
Data
=
GetE2EFileTransferParams
.
liveDefault
(),
fileTransferParamsJSON
:
Data
=
GetFileTransferParams
.
liveDefault
(),
callback
:
ReceiveFileCallback
callback
:
ReceiveFileCallback
)
throws
->
FileTransfer
{
)
throws
->
FileTransfer
{
try
run
(
e2eId
,
e2eFileTransferParamsJSON
,
fileTransferP
arams
JSON
,
callback
)
try
run
(
p
arams
,
callback
)
}
}
}
}
extension
InitFileTransfer
{
extension
InitFileTransfer
{
public
static
let
live
=
InitFileTransfer
{
public
static
let
live
=
InitFileTransfer
{
params
,
callback
in
e2eId
,
e2eFileTransferParamsJSON
,
fileTransferParamsJSON
,
callback
in
var
error
:
NSError
?
var
error
:
NSError
?
let
bindingsFileTransfer
=
BindingsInitFileTransfer
(
let
bindingsFileTransfer
=
BindingsInitFileTransfer
(
e2eId
,
params
.
e2eId
,
callback
.
makeBindingsReceiveFileCallback
(),
callback
.
makeBindingsReceiveFileCallback
(),
e2eFileTransferParamsJSON
,
params
.
e2eFileTransferParamsJSON
,
fileTransferParamsJSON
,
params
.
fileTransferParamsJSON
,
&
error
&
error
)
)
if
let
error
=
error
{
if
let
error
=
error
{
Loading