Skip to content

Commit

Permalink
Update SDK to reflect changed in backend 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
byuarus authored and JonasVautherin committed Jun 4, 2019
1 parent 330c6a5 commit 0e4e3a2
Show file tree
Hide file tree
Showing 12 changed files with 1,645 additions and 613 deletions.
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
binary "https://s3.eu-central-1.amazonaws.com/dronecode-sdk/backend.json" "0.16.0"
binary "https://s3.eu-central-1.amazonaws.com/dronecode-sdk/backend.json" "0.17.0"
github "ReactiveX/RxSwift" "4.5.0"
github "grpc/grpc-swift" "0.8.1"
5 changes: 5 additions & 0 deletions Sources/Dronecode-SDK-Swift/Generated/Mission.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public class Mission {
case failedToOpenQgcPlan
case failedToParseQgcPlan
case unsupportedMissionCmd
case transferCancelled
case UNRECOGNIZED(Int)

internal var rpcResult: DronecodeSdk_Rpc_Mission_MissionResult.Result {
Expand Down Expand Up @@ -271,6 +272,8 @@ public class Mission {
return .failedToParseQgcPlan
case .unsupportedMissionCmd:
return .unsupportedMissionCmd
case .transferCancelled:
return .transferCancelled
case .UNRECOGNIZED(let i):
return .UNRECOGNIZED(i)
}
Expand Down Expand Up @@ -302,6 +305,8 @@ public class Mission {
return .failedToParseQgcPlan
case .unsupportedMissionCmd:
return .unsupportedMissionCmd
case .transferCancelled:
return .transferCancelled
case .UNRECOGNIZED(let i):
return .UNRECOGNIZED(i)
}
Expand Down
575 changes: 439 additions & 136 deletions Sources/Dronecode-SDK-Swift/Generated/action.grpc.swift

Large diffs are not rendered by default.

127 changes: 85 additions & 42 deletions Sources/Dronecode-SDK-Swift/Generated/calibration.grpc.swift

Large diffs are not rendered by default.

511 changes: 372 additions & 139 deletions Sources/Dronecode-SDK-Swift/Generated/camera.grpc.swift

Large diffs are not rendered by default.

64 changes: 46 additions & 18 deletions Sources/Dronecode-SDK-Swift/Generated/core.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
import Dispatch
import Foundation
import SwiftGRPC
import SwiftProtobuf

Expand All @@ -41,10 +41,6 @@ fileprivate final class DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStat
override class var method: String { return "/dronecode_sdk.rpc.core.CoreService/SubscribeConnectionState" }
}

class DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCallTestStub: ClientCallServerStreamingTestStub<DronecodeSdk_Rpc_Core_ConnectionStateResponse>, DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
override class var method: String { return "/dronecode_sdk.rpc.core.CoreService/SubscribeConnectionState" }
}

internal protocol DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall: ClientCallUnary {}

fileprivate final class DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCallBase: ClientCallUnaryBase<DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, DronecodeSdk_Rpc_Core_ListRunningPluginsResponse>, DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
Expand All @@ -57,55 +53,87 @@ internal protocol DronecodeSdk_Rpc_Core_CoreServiceService: ServiceClient {
/// Asynchronous. Server-streaming.
/// Send the initial message.
/// Use methods on the returned object to get streamed responses.
func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall
func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, metadata customMetadata: Metadata, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall

/// Synchronous. Unary.
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse
/// Asynchronous. Unary.
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall
@discardableResult
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall

}

internal extension DronecodeSdk_Rpc_Core_CoreServiceService {
/// Asynchronous. Server-streaming.
func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
return try self.subscribeConnectionState(request, metadata: self.metadata, completion: completion)
}

/// Synchronous. Unary.
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse {
return try self.listRunningPlugins(request, metadata: self.metadata)
}
/// Asynchronous. Unary.
@discardableResult
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
return try self.listRunningPlugins(request, metadata: self.metadata, completion: completion)
}

}

internal final class DronecodeSdk_Rpc_Core_CoreServiceServiceClient: ServiceClientBase, DronecodeSdk_Rpc_Core_CoreServiceService {
/// Asynchronous. Server-streaming.
/// Send the initial message.
/// Use methods on the returned object to get streamed responses.
internal func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
internal func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, metadata customMetadata: Metadata, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
return try DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCallBase(channel)
.start(request: request, metadata: metadata, completion: completion)
.start(request: request, metadata: customMetadata, completion: completion)
}

/// Synchronous. Unary.
internal func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse {
internal func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse {
return try DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCallBase(channel)
.run(request: request, metadata: metadata)
.run(request: request, metadata: customMetadata)
}
/// Asynchronous. Unary.
internal func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
@discardableResult
internal func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
return try DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCallBase(channel)
.start(request: request, metadata: metadata, completion: completion)
.start(request: request, metadata: customMetadata, completion: completion)
}

}

class DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCallTestStub: ClientCallServerStreamingTestStub<DronecodeSdk_Rpc_Core_ConnectionStateResponse>, DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
override class var method: String { return "/dronecode_sdk.rpc.core.CoreService/SubscribeConnectionState" }
}

class DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCallTestStub: ClientCallUnaryTestStub, DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
override class var method: String { return "/dronecode_sdk.rpc.core.CoreService/ListRunningPlugins" }
}

class DronecodeSdk_Rpc_Core_CoreServiceServiceTestStub: ServiceClientTestStubBase, DronecodeSdk_Rpc_Core_CoreServiceService {
var subscribeConnectionStateRequests: [DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest] = []
var subscribeConnectionStateCalls: [DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall] = []
func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
func subscribeConnectionState(_ request: DronecodeSdk_Rpc_Core_SubscribeConnectionStateRequest, metadata customMetadata: Metadata, completion: ((CallResult) -> Void)?) throws -> DronecodeSdk_Rpc_Core_CoreServiceSubscribeConnectionStateCall {
subscribeConnectionStateRequests.append(request)
defer { subscribeConnectionStateCalls.removeFirst() }
return subscribeConnectionStateCalls.first!
}

var listRunningPluginsRequests: [DronecodeSdk_Rpc_Core_ListRunningPluginsRequest] = []
var listRunningPluginsResponses: [DronecodeSdk_Rpc_Core_ListRunningPluginsResponse] = []
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse {
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Core_ListRunningPluginsResponse {
listRunningPluginsRequests.append(request)
defer { listRunningPluginsResponses.removeFirst() }
return listRunningPluginsResponses.first!
}
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
fatalError("not implemented")
@discardableResult
func listRunningPlugins(_ request: DronecodeSdk_Rpc_Core_ListRunningPluginsRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Core_ListRunningPluginsResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCall {
let response = try self.listRunningPlugins(request)
let callResult = CallResult(success: true, statusCode: .ok, statusMessage: "OK", resultData: nil, initialMetadata: nil, trailingMetadata: nil)
completion(response, callResult)
return DronecodeSdk_Rpc_Core_CoreServiceListRunningPluginsCallTestStub()
}

}
Expand Down
43 changes: 33 additions & 10 deletions Sources/Dronecode-SDK-Swift/Generated/gimbal.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
import Dispatch
import Foundation
import SwiftGRPC
import SwiftProtobuf

Expand All @@ -35,36 +35,59 @@ fileprivate final class DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCallB
/// Instantiate DronecodeSdk_Rpc_Gimbal_GimbalServiceServiceClient, then call methods of this protocol to make API calls.
internal protocol DronecodeSdk_Rpc_Gimbal_GimbalServiceService: ServiceClient {
/// Synchronous. Unary.
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse
/// Asynchronous. Unary.
@discardableResult
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall

}

internal extension DronecodeSdk_Rpc_Gimbal_GimbalServiceService {
/// Synchronous. Unary.
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse {
return try self.setPitchAndYaw(request, metadata: self.metadata)
}
/// Asynchronous. Unary.
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall
@discardableResult
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
return try self.setPitchAndYaw(request, metadata: self.metadata, completion: completion)
}

}

internal final class DronecodeSdk_Rpc_Gimbal_GimbalServiceServiceClient: ServiceClientBase, DronecodeSdk_Rpc_Gimbal_GimbalServiceService {
/// Synchronous. Unary.
internal func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse {
internal func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse {
return try DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCallBase(channel)
.run(request: request, metadata: metadata)
.run(request: request, metadata: customMetadata)
}
/// Asynchronous. Unary.
internal func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
@discardableResult
internal func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
return try DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCallBase(channel)
.start(request: request, metadata: metadata, completion: completion)
.start(request: request, metadata: customMetadata, completion: completion)
}

}

class DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCallTestStub: ClientCallUnaryTestStub, DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
override class var method: String { return "/dronecode_sdk.rpc.gimbal.GimbalService/SetPitchAndYaw" }
}

class DronecodeSdk_Rpc_Gimbal_GimbalServiceServiceTestStub: ServiceClientTestStubBase, DronecodeSdk_Rpc_Gimbal_GimbalServiceService {
var setPitchAndYawRequests: [DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest] = []
var setPitchAndYawResponses: [DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse] = []
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse {
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata) throws -> DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse {
setPitchAndYawRequests.append(request)
defer { setPitchAndYawResponses.removeFirst() }
return setPitchAndYawResponses.first!
}
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
fatalError("not implemented")
@discardableResult
func setPitchAndYaw(_ request: DronecodeSdk_Rpc_Gimbal_SetPitchAndYawRequest, metadata customMetadata: Metadata, completion: @escaping (DronecodeSdk_Rpc_Gimbal_SetPitchAndYawResponse?, CallResult) -> Void) throws -> DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCall {
let response = try self.setPitchAndYaw(request)
let callResult = CallResult(success: true, statusCode: .ok, statusMessage: "OK", resultData: nil, initialMetadata: nil, trailingMetadata: nil)
completion(response, callResult)
return DronecodeSdk_Rpc_Gimbal_GimbalServiceSetPitchAndYawCallTestStub()
}

}
Expand Down
Loading

0 comments on commit 0e4e3a2

Please sign in to comment.