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
125335d9
Commit
125335d9
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Rename ServiceProcessor to Processor
parent
2fc6d1a4
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/Callbacks/Processor.swift
+11
-11
11 additions, 11 deletions
Sources/ElixxirDAppsSDK/Callbacks/Processor.swift
Sources/ElixxirDAppsSDK/E2E/Functors/E2EAddService.swift
+2
-2
2 additions, 2 deletions
Sources/ElixxirDAppsSDK/E2E/Functors/E2EAddService.swift
with
13 additions
and
13 deletions
Sources/ElixxirDAppsSDK/Callbacks/
Service
Processor.swift
→
Sources/ElixxirDAppsSDK/Callbacks/Processor.swift
+
11
−
11
View file @
125335d9
import
Bindings
import
Bindings
import
XCTestDynamicOverlay
import
XCTestDynamicOverlay
public
struct
Service
Processor
{
public
struct
Processor
{
public
struct
Callback
:
Equatable
{
public
struct
Callback
:
Equatable
{
public
init
(
message
:
Data
,
receptionId
:
Data
,
ephemeralId
:
Int64
,
roundId
:
Int64
)
{
public
init
(
message
:
Data
,
receptionId
:
Data
,
ephemeralId
:
Int64
,
roundId
:
Int64
)
{
self
.
message
=
message
self
.
message
=
message
...
@@ -25,21 +25,21 @@ public struct ServiceProcessor {
...
@@ -25,21 +25,21 @@ public struct ServiceProcessor {
public
var
process
:
(
Callback
)
->
Void
public
var
process
:
(
Callback
)
->
Void
}
}
extension
Service
Processor
{
extension
Processor
{
public
static
let
unimplemented
=
Service
Processor
(
public
static
let
unimplemented
=
Processor
(
serviceTag
:
"unimplemented"
,
serviceTag
:
"unimplemented"
,
process
:
XCTUnimplemented
(
"
\(
Self
.
self
)
.process"
)
process
:
XCTUnimplemented
(
"
\(
Self
.
self
)
.process"
)
)
)
}
}
extension
Service
Processor
{
extension
Processor
{
func
makeBindingsProcessor
()
->
BindingsProcessorProtocol
{
func
makeBindingsProcessor
()
->
BindingsProcessorProtocol
{
class
Processor
:
NSObject
,
BindingsProcessorProtocol
{
class
CallbackObject
:
NSObject
,
BindingsProcessorProtocol
{
init
(
_
serviceP
rocessor
:
Service
Processor
)
{
init
(
_
p
rocessor
:
Processor
)
{
self
.
serviceP
rocessor
=
serviceP
rocessor
self
.
p
rocessor
=
p
rocessor
}
}
let
serviceP
rocessor
:
Service
Processor
let
p
rocessor
:
Processor
func
process
(
_
message
:
Data
?,
receptionId
:
Data
?,
ephemeralId
:
Int64
,
roundId
:
Int64
)
{
func
process
(
_
message
:
Data
?,
receptionId
:
Data
?,
ephemeralId
:
Int64
,
roundId
:
Int64
)
{
guard
let
message
=
message
else
{
guard
let
message
=
message
else
{
...
@@ -48,7 +48,7 @@ extension ServiceProcessor {
...
@@ -48,7 +48,7 @@ extension ServiceProcessor {
guard
let
receptionId
=
receptionId
else
{
guard
let
receptionId
=
receptionId
else
{
fatalError
(
"BindingsProcessor.process received `nil` receptionId"
)
fatalError
(
"BindingsProcessor.process received `nil` receptionId"
)
}
}
serviceP
rocessor
.
process
(
Callback
(
p
rocessor
.
process
(
Callback
(
message
:
message
,
message
:
message
,
receptionId
:
receptionId
,
receptionId
:
receptionId
,
ephemeralId
:
ephemeralId
,
ephemeralId
:
ephemeralId
,
...
@@ -57,10 +57,10 @@ extension ServiceProcessor {
...
@@ -57,10 +57,10 @@ extension ServiceProcessor {
}
}
func
string
()
->
String
{
func
string
()
->
String
{
serviceP
rocessor
.
serviceTag
p
rocessor
.
serviceTag
}
}
}
}
return
Processor
(
self
)
return
CallbackObject
(
self
)
}
}
}
}
This diff is collapsed.
Click to expand it.
Sources/ElixxirDAppsSDK/E2E/Functors/E2EAddService.swift
+
2
−
2
View file @
125335d9
...
@@ -2,10 +2,10 @@ import Bindings
...
@@ -2,10 +2,10 @@ import Bindings
import
XCTestDynamicOverlay
import
XCTestDynamicOverlay
public
struct
E2EAddService
{
public
struct
E2EAddService
{
public
var
run
:
(
Service
Processor
)
throws
->
Void
public
var
run
:
(
Processor
)
throws
->
Void
public
func
callAsFunction
(
public
func
callAsFunction
(
processor
:
Service
Processor
processor
:
Processor
)
throws
{
)
throws
{
try
run
(
processor
)
try
run
(
processor
)
}
}
...
...
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