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
5be84eb4
Commit
5be84eb4
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add E2EAddPartnerCallback functor
parent
cf1ae915
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!18
Update Bindings
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/ElixxirDAppsSDK/E2E.swift
+5
-2
5 additions, 2 deletions
Sources/ElixxirDAppsSDK/E2E.swift
Sources/ElixxirDAppsSDK/E2EAddPartnerCallback.swift
+37
-0
37 additions, 0 deletions
Sources/ElixxirDAppsSDK/E2EAddPartnerCallback.swift
with
42 additions
and
2 deletions
Sources/ElixxirDAppsSDK/E2E.swift
+
5
−
2
View file @
5be84eb4
...
...
@@ -6,6 +6,7 @@ public struct E2E {
public
var
getContact
:
E2EGetContact
public
var
payloadSize
:
E2EPayloadSize
public
var
partitionSize
:
E2EPartitionSize
public
var
addPartnerCallback
:
E2EAddPartnerCallback
// TODO:
}
...
...
@@ -17,7 +18,8 @@ extension E2E {
getReceptionId
:
.
live
(
bindingsE2E
:
bindingsE2E
),
getContact
:
.
live
(
bindingsE2E
:
bindingsE2E
),
payloadSize
:
.
live
(
bindingsE2E
:
bindingsE2E
),
partitionSize
:
.
live
(
bindingsE2E
:
bindingsE2E
)
partitionSize
:
.
live
(
bindingsE2E
:
bindingsE2E
),
addPartnerCallback
:
.
live
(
bindingsE2E
)
)
}
}
...
...
@@ -28,6 +30,7 @@ extension E2E {
getReceptionId
:
.
unimplemented
,
getContact
:
.
unimplemented
,
payloadSize
:
.
unimplemented
,
partitionSize
:
.
unimplemented
partitionSize
:
.
unimplemented
,
addPartnerCallback
:
.
unimplemented
)
}
This diff is collapsed.
Click to expand it.
Sources/ElixxirDAppsSDK/E2EAddPartnerCallback.swift
0 → 100644
+
37
−
0
View file @
5be84eb4
import
Bindings
import
XCTestDynamicOverlay
public
struct
E2EAddPartnerCallback
{
public
var
run
:
(
Data
,
AuthCallbacks
)
throws
->
Cancellable
public
func
callAsFunction
(
partnerId
:
Data
,
callbacks
:
AuthCallbacks
)
throws
->
Cancellable
{
try
run
(
partnerId
,
callbacks
)
}
}
extension
E2EAddPartnerCallback
{
public
static
func
live
(
_
bindingsE2E
:
BindingsE2e
)
->
E2EAddPartnerCallback
{
E2EAddPartnerCallback
{
partnerId
,
callbacks
in
try
bindingsE2E
.
addPartnerCallback
(
partnerId
,
cb
:
callbacks
.
makeBindingsAuthCallbacks
()
)
return
Cancellable
{
do
{
try
bindingsE2E
.
deletePartnerCallback
(
partnerId
)
}
catch
{
fatalError
(
"BindingsE2e.deletePartnerCallback returned error:
\(
error
)
"
)
}
}
}
}
}
extension
E2EAddPartnerCallback
{
public
static
let
unimplemented
=
E2EAddPartnerCallback
(
run
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
)
)
}
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