blob: 8da8603e54b1dd608ed9f078639fec23294ef35a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
import IceObjc
class PropertiesAdminI: LocalObject<ICEPropertiesAdmin>, PropertiesAdmin, NativePropertiesAdmin {
private let communicator: Communicator
init(communicator: Communicator, handle: ICEPropertiesAdmin) {
self.communicator = communicator
super.init(handle: handle)
}
func getProperty(key: Swift.String, current _: Current) throws -> Swift.String {
return try autoreleasepool {
try handle.getProperty(key)
}
}
func getPropertiesForPrefix(prefix: Swift.String, current _: Current) throws -> PropertyDict {
return try autoreleasepool {
try handle.getPropertiesForPrefix(prefix)
}
}
func setProperties(newProperties: PropertyDict, current _: Current) throws {
try autoreleasepool {
try handle.setProperties(newProperties)
}
}
func addUpdateCallback(_ cb: @escaping PropertiesAdminUpdateCallback) -> PropertiesAdminRemoveCallback {
return handle.addUpdateCallback { (props: PropertyDict) in
cb(props)
}
}
}
|