Skip to content

Commit

Permalink
playServiceId 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jayce1116 committed Nov 28, 2023
1 parent 716ccae commit 8bcdcf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
5 changes: 2 additions & 3 deletions NuguAgents/Sources/CapabilityAgents/Image/Image+Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension ImageAgent {
let referrerDialogRequestId: String?

enum TypeInfo {
case sendImage(service: [String: AnyHashable]?, playServiceId: String?)
case sendImage(service: [String: AnyHashable]?)
}
}

Expand All @@ -46,9 +46,8 @@ extension ImageAgent.Event: Eventable {
var payload: [String: AnyHashable] {
var payload: [String: AnyHashable] = [:]
switch typeInfo {
case let .sendImage(service, playServiceId):
case let .sendImage(service):
payload["service"] = service
payload["playServiceId"] = playServiceId
default:
break
}
Expand Down
3 changes: 1 addition & 2 deletions NuguAgents/Sources/CapabilityAgents/Image/ImageAgent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public extension ImageAgent {
@discardableResult func requestSendImage(
_ image: Data,
service: [String: AnyHashable]?,
playServiceId: String?,
completion: ((StreamDataState) -> Void)? = nil
) -> String {
let eventIdentifier = EventIdentifier()
Expand All @@ -90,7 +89,7 @@ public extension ImageAgent {
guard let self = self else { return }
self.upstreamDataSender.sendStream(
Event(
typeInfo: .sendImage(service: service, playServiceId: playServiceId),
typeInfo: .sendImage(service: service),
referrerDialogRequestId: nil
).makeEventMessage(
property: self.capabilityAgentProperty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public protocol ImageAgentProtocol: CapabilityAgentable {
@discardableResult func requestSendImage(
_ image: Data,
service: [String: AnyHashable]?,
playServiceId: String?,
completion: ((StreamDataState) -> Void)?
) -> String
}
Expand All @@ -35,14 +34,6 @@ public extension ImageAgentProtocol {
_ image: Data,
completion: ((StreamDataState) -> Void)?
) -> String {
requestSendImage(image, service: nil, playServiceId: nil, completion: completion)
}

@discardableResult func requestSendImage(
_ image: Data,
service: [String: AnyHashable]?,
completion: ((StreamDataState) -> Void)?
) -> String {
requestSendImage(image, service: service, playServiceId: nil, completion: completion)
requestSendImage(image, service: nil, completion: completion)
}
}

0 comments on commit 8bcdcf4

Please sign in to comment.