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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Commits
c34548d0
Commit
c34548d0
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add Params struct to InitFileTransfer function
parent
ca798aa4
No related branches found
No related tags found
2 merge requests
!122
Messenger send file
,
!102
Release 1.0.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/XXClient/Functions/InitFileTransfer.swift
+23
-11
23 additions, 11 deletions
Sources/XXClient/Functions/InitFileTransfer.swift
with
23 additions
and
11 deletions
Sources/XXClient/Functions/InitFileTransfer.swift
+
23
−
11
View file @
c34548d0
...
...
@@ -2,28 +2,40 @@ import Bindings
import
XCTestDynamicOverlay
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
(
e2eId
:
Int
,
e2eFileTransferParamsJSON
:
Data
=
GetE2EFileTransferParams
.
liveDefault
(),
fileTransferParamsJSON
:
Data
=
GetFileTransferParams
.
liveDefault
(),
params
:
Params
,
callback
:
ReceiveFileCallback
)
throws
->
FileTransfer
{
try
run
(
e2eId
,
e2eFileTransferParamsJSON
,
fileTransferP
arams
JSON
,
callback
)
try
run
(
p
arams
,
callback
)
}
}
extension
InitFileTransfer
{
public
static
let
live
=
InitFileTransfer
{
e2eId
,
e2eFileTransferParamsJSON
,
fileTransferParamsJSON
,
callback
in
public
static
let
live
=
InitFileTransfer
{
params
,
callback
in
var
error
:
NSError
?
let
bindingsFileTransfer
=
BindingsInitFileTransfer
(
e2eId
,
params
.
e2eId
,
callback
.
makeBindingsReceiveFileCallback
(),
e2eFileTransferParamsJSON
,
fileTransferParamsJSON
,
params
.
e2eFileTransferParamsJSON
,
params
.
fileTransferParamsJSON
,
&
error
)
if
let
error
=
error
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment