mirror of
https://github.com/flutter/packages.git
synced 2025-06-30 14:47:22 +08:00
[pigeon] transitioned compilation tests to platform tests (#387)
This commit is contained in:
2
packages/pigeon/.gitignore
vendored
2
packages/pigeon/.gitignore
vendored
@ -1,6 +1,4 @@
|
||||
build/
|
||||
platform_tests/ios_unit_tests/ios/Runner/messages.h
|
||||
platform_tests/ios_unit_tests/ios/Runner/messages.m
|
||||
xcuserdata/
|
||||
.gradle/
|
||||
.flutter-plugins
|
||||
|
@ -6,7 +6,7 @@ import 'package:pigeon/pigeon.dart';
|
||||
|
||||
@ConfigurePigeon(PigeonOptions(
|
||||
objcOptions: ObjcOptions(
|
||||
prefix: 'AC',
|
||||
prefix: 'H2F',
|
||||
),
|
||||
))
|
||||
class SearchRequest {
|
||||
|
@ -9,7 +9,7 @@ import 'package:pigeon/pigeon.dart';
|
||||
|
||||
@ConfigurePigeon(PigeonOptions(
|
||||
javaOptions: JavaOptions(
|
||||
className: 'Pigeon',
|
||||
className: 'MessagePigeon',
|
||||
package: 'dev.flutter.aaclarke.pigeon',
|
||||
),
|
||||
objcOptions: ObjcOptions(
|
||||
|
@ -0,0 +1 @@
|
||||
*.java
|
@ -1,275 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
package com.example.android_unit_tests;
|
||||
|
||||
import io.flutter.plugin.common.BasicMessageChannel;
|
||||
import io.flutter.plugin.common.BinaryMessenger;
|
||||
import io.flutter.plugin.common.StandardMessageCodec;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/** Generated class from Pigeon. */
|
||||
@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"})
|
||||
public class AllDatatypes {
|
||||
|
||||
/** Generated class from Pigeon that represents data sent in messages. */
|
||||
public static class Everything {
|
||||
private Boolean aBool;
|
||||
|
||||
public Boolean getABool() {
|
||||
return aBool;
|
||||
}
|
||||
|
||||
public void setABool(Boolean setterArg) {
|
||||
this.aBool = setterArg;
|
||||
}
|
||||
|
||||
private Long anInt;
|
||||
|
||||
public Long getAnInt() {
|
||||
return anInt;
|
||||
}
|
||||
|
||||
public void setAnInt(Long setterArg) {
|
||||
this.anInt = setterArg;
|
||||
}
|
||||
|
||||
private Double aDouble;
|
||||
|
||||
public Double getADouble() {
|
||||
return aDouble;
|
||||
}
|
||||
|
||||
public void setADouble(Double setterArg) {
|
||||
this.aDouble = setterArg;
|
||||
}
|
||||
|
||||
private String aString;
|
||||
|
||||
public String getAString() {
|
||||
return aString;
|
||||
}
|
||||
|
||||
public void setAString(String setterArg) {
|
||||
this.aString = setterArg;
|
||||
}
|
||||
|
||||
private byte[] aByteArray;
|
||||
|
||||
public byte[] getAByteArray() {
|
||||
return aByteArray;
|
||||
}
|
||||
|
||||
public void setAByteArray(byte[] setterArg) {
|
||||
this.aByteArray = setterArg;
|
||||
}
|
||||
|
||||
private int[] a4ByteArray;
|
||||
|
||||
public int[] getA4ByteArray() {
|
||||
return a4ByteArray;
|
||||
}
|
||||
|
||||
public void setA4ByteArray(int[] setterArg) {
|
||||
this.a4ByteArray = setterArg;
|
||||
}
|
||||
|
||||
private long[] a8ByteArray;
|
||||
|
||||
public long[] getA8ByteArray() {
|
||||
return a8ByteArray;
|
||||
}
|
||||
|
||||
public void setA8ByteArray(long[] setterArg) {
|
||||
this.a8ByteArray = setterArg;
|
||||
}
|
||||
|
||||
private double[] aFloatArray;
|
||||
|
||||
public double[] getAFloatArray() {
|
||||
return aFloatArray;
|
||||
}
|
||||
|
||||
public void setAFloatArray(double[] setterArg) {
|
||||
this.aFloatArray = setterArg;
|
||||
}
|
||||
|
||||
private List<Object> aList;
|
||||
|
||||
public List<Object> getAList() {
|
||||
return aList;
|
||||
}
|
||||
|
||||
public void setAList(List<Object> setterArg) {
|
||||
this.aList = setterArg;
|
||||
}
|
||||
|
||||
private Map<Object, Object> aMap;
|
||||
|
||||
public Map<Object, Object> getAMap() {
|
||||
return aMap;
|
||||
}
|
||||
|
||||
public void setAMap(Map<Object, Object> setterArg) {
|
||||
this.aMap = setterArg;
|
||||
}
|
||||
|
||||
Map<String, Object> toMap() {
|
||||
Map<String, Object> toMapResult = new HashMap<>();
|
||||
toMapResult.put("aBool", aBool);
|
||||
toMapResult.put("anInt", anInt);
|
||||
toMapResult.put("aDouble", aDouble);
|
||||
toMapResult.put("aString", aString);
|
||||
toMapResult.put("aByteArray", aByteArray);
|
||||
toMapResult.put("a4ByteArray", a4ByteArray);
|
||||
toMapResult.put("a8ByteArray", a8ByteArray);
|
||||
toMapResult.put("aFloatArray", aFloatArray);
|
||||
toMapResult.put("aList", aList);
|
||||
toMapResult.put("aMap", aMap);
|
||||
return toMapResult;
|
||||
}
|
||||
|
||||
static Everything fromMap(Map<String, Object> map) {
|
||||
Everything fromMapResult = new Everything();
|
||||
Object aBool = map.get("aBool");
|
||||
fromMapResult.aBool = (Boolean) aBool;
|
||||
Object anInt = map.get("anInt");
|
||||
fromMapResult.anInt =
|
||||
(anInt == null) ? null : ((anInt instanceof Integer) ? (Integer) anInt : (Long) anInt);
|
||||
Object aDouble = map.get("aDouble");
|
||||
fromMapResult.aDouble = (Double) aDouble;
|
||||
Object aString = map.get("aString");
|
||||
fromMapResult.aString = (String) aString;
|
||||
Object aByteArray = map.get("aByteArray");
|
||||
fromMapResult.aByteArray = (byte[]) aByteArray;
|
||||
Object a4ByteArray = map.get("a4ByteArray");
|
||||
fromMapResult.a4ByteArray = (int[]) a4ByteArray;
|
||||
Object a8ByteArray = map.get("a8ByteArray");
|
||||
fromMapResult.a8ByteArray = (long[]) a8ByteArray;
|
||||
Object aFloatArray = map.get("aFloatArray");
|
||||
fromMapResult.aFloatArray = (double[]) aFloatArray;
|
||||
Object aList = map.get("aList");
|
||||
fromMapResult.aList = (List<Object>) aList;
|
||||
Object aMap = map.get("aMap");
|
||||
fromMapResult.aMap = (Map<Object, Object>) aMap;
|
||||
return fromMapResult;
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated class from Pigeon that represents Flutter messages that can be called from Java. */
|
||||
public static class FlutterEverything {
|
||||
private final BinaryMessenger binaryMessenger;
|
||||
|
||||
public FlutterEverything(BinaryMessenger argBinaryMessenger) {
|
||||
this.binaryMessenger = argBinaryMessenger;
|
||||
}
|
||||
|
||||
public interface Reply<T> {
|
||||
void reply(T reply);
|
||||
}
|
||||
|
||||
public void giveMeEverything(Reply<Everything> callback) {
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger,
|
||||
"dev.flutter.pigeon.FlutterEverything.giveMeEverything",
|
||||
new StandardMessageCodec());
|
||||
channel.send(
|
||||
null,
|
||||
channelReply -> {
|
||||
Map outputMap = (Map) channelReply;
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
Everything output = Everything.fromMap(outputMap);
|
||||
callback.reply(output);
|
||||
});
|
||||
}
|
||||
|
||||
public void echo(Everything argInput, Reply<Everything> callback) {
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger,
|
||||
"dev.flutter.pigeon.FlutterEverything.echo",
|
||||
new StandardMessageCodec());
|
||||
Map<String, Object> inputMap = argInput.toMap();
|
||||
channel.send(
|
||||
inputMap,
|
||||
channelReply -> {
|
||||
Map outputMap = (Map) channelReply;
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
Everything output = Everything.fromMap(outputMap);
|
||||
callback.reply(output);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
|
||||
public interface HostEverything {
|
||||
Everything giveMeEverything();
|
||||
|
||||
Everything echo(Everything arg);
|
||||
|
||||
/** Sets up an instance of `HostEverything` to handle messages through the `binaryMessenger`. */
|
||||
static void setup(BinaryMessenger binaryMessenger, HostEverything api) {
|
||||
{
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger,
|
||||
"dev.flutter.pigeon.HostEverything.giveMeEverything",
|
||||
new StandardMessageCodec());
|
||||
if (api != null) {
|
||||
channel.setMessageHandler(
|
||||
(message, reply) -> {
|
||||
Map<String, Object> wrapped = new HashMap<>();
|
||||
try {
|
||||
Everything output = api.giveMeEverything();
|
||||
wrapped.put("result", output.toMap());
|
||||
} catch (Error | RuntimeException exception) {
|
||||
wrapped.put("error", wrapError(exception));
|
||||
}
|
||||
reply.reply(wrapped);
|
||||
});
|
||||
} else {
|
||||
channel.setMessageHandler(null);
|
||||
}
|
||||
}
|
||||
{
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger,
|
||||
"dev.flutter.pigeon.HostEverything.echo",
|
||||
new StandardMessageCodec());
|
||||
if (api != null) {
|
||||
channel.setMessageHandler(
|
||||
(message, reply) -> {
|
||||
Map<String, Object> wrapped = new HashMap<>();
|
||||
try {
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
Everything input = Everything.fromMap((Map<String, Object>) message);
|
||||
Everything output = api.echo(input);
|
||||
wrapped.put("result", output.toMap());
|
||||
} catch (Error | RuntimeException exception) {
|
||||
wrapped.put("error", wrapError(exception));
|
||||
}
|
||||
reply.reply(wrapped);
|
||||
});
|
||||
} else {
|
||||
channel.setMessageHandler(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Map<String, Object> wrapError(Throwable exception) {
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", exception.toString());
|
||||
errorMap.put("code", exception.getClass().getSimpleName());
|
||||
errorMap.put("details", null);
|
||||
return errorMap;
|
||||
}
|
||||
}
|
@ -1,181 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
|
||||
package com.example.android_unit_tests;
|
||||
|
||||
import io.flutter.plugin.common.BasicMessageChannel;
|
||||
import io.flutter.plugin.common.BinaryMessenger;
|
||||
import io.flutter.plugin.common.StandardMessageCodec;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Generated class from Pigeon. */
|
||||
@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"})
|
||||
public class Pigeon {
|
||||
|
||||
public enum LoadingState {
|
||||
loading(0),
|
||||
complete(1);
|
||||
|
||||
private int index;
|
||||
|
||||
private LoadingState(final int index) {
|
||||
this.index = index;
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated class from Pigeon that represents data sent in messages. */
|
||||
public static class NestedRequest {
|
||||
private String context;
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String setterArg) {
|
||||
this.context = setterArg;
|
||||
}
|
||||
|
||||
private SetRequest request;
|
||||
|
||||
public SetRequest getRequest() {
|
||||
return request;
|
||||
}
|
||||
|
||||
public void setRequest(SetRequest setterArg) {
|
||||
this.request = setterArg;
|
||||
}
|
||||
|
||||
Map<String, Object> toMap() {
|
||||
Map<String, Object> toMapResult = new HashMap<>();
|
||||
toMapResult.put("context", context);
|
||||
toMapResult.put("request", request.toMap());
|
||||
return toMapResult;
|
||||
}
|
||||
|
||||
static NestedRequest fromMap(Map<String, Object> map) {
|
||||
NestedRequest fromMapResult = new NestedRequest();
|
||||
Object context = map.get("context");
|
||||
fromMapResult.context = (String) context;
|
||||
Object request = map.get("request");
|
||||
fromMapResult.request = SetRequest.fromMap((Map) request);
|
||||
return fromMapResult;
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated class from Pigeon that represents data sent in messages. */
|
||||
public static class SetRequest {
|
||||
private Long value;
|
||||
|
||||
public Long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Long setterArg) {
|
||||
this.value = setterArg;
|
||||
}
|
||||
|
||||
private LoadingState state;
|
||||
|
||||
public LoadingState getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(LoadingState setterArg) {
|
||||
this.state = setterArg;
|
||||
}
|
||||
|
||||
Map<String, Object> toMap() {
|
||||
Map<String, Object> toMapResult = new HashMap<>();
|
||||
toMapResult.put("value", value);
|
||||
toMapResult.put("state", state.index);
|
||||
return toMapResult;
|
||||
}
|
||||
|
||||
static SetRequest fromMap(Map<String, Object> map) {
|
||||
SetRequest fromMapResult = new SetRequest();
|
||||
Object value = map.get("value");
|
||||
fromMapResult.value =
|
||||
(value == null) ? null : ((value instanceof Integer) ? (Integer) value : (Long) value);
|
||||
Object state = map.get("state");
|
||||
fromMapResult.state = LoadingState.values()[(int) state];
|
||||
return fromMapResult;
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
|
||||
public interface NestedApi {
|
||||
void setValueWithContext(NestedRequest arg);
|
||||
|
||||
/** Sets up an instance of `NestedApi` to handle messages through the `binaryMessenger`. */
|
||||
static void setup(BinaryMessenger binaryMessenger, NestedApi api) {
|
||||
{
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger,
|
||||
"dev.flutter.pigeon.NestedApi.setValueWithContext",
|
||||
new StandardMessageCodec());
|
||||
if (api != null) {
|
||||
channel.setMessageHandler(
|
||||
(message, reply) -> {
|
||||
Map<String, Object> wrapped = new HashMap<>();
|
||||
try {
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
NestedRequest input = NestedRequest.fromMap((Map<String, Object>) message);
|
||||
api.setValueWithContext(input);
|
||||
wrapped.put("result", null);
|
||||
} catch (Error | RuntimeException exception) {
|
||||
wrapped.put("error", wrapError(exception));
|
||||
}
|
||||
reply.reply(wrapped);
|
||||
});
|
||||
} else {
|
||||
channel.setMessageHandler(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
|
||||
public interface Api {
|
||||
void setValue(SetRequest arg);
|
||||
|
||||
/** Sets up an instance of `Api` to handle messages through the `binaryMessenger`. */
|
||||
static void setup(BinaryMessenger binaryMessenger, Api api) {
|
||||
{
|
||||
BasicMessageChannel<Object> channel =
|
||||
new BasicMessageChannel<>(
|
||||
binaryMessenger, "dev.flutter.pigeon.Api.setValue", new StandardMessageCodec());
|
||||
if (api != null) {
|
||||
channel.setMessageHandler(
|
||||
(message, reply) -> {
|
||||
Map<String, Object> wrapped = new HashMap<>();
|
||||
try {
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
SetRequest input = SetRequest.fromMap((Map<String, Object>) message);
|
||||
api.setValue(input);
|
||||
wrapped.put("result", null);
|
||||
} catch (Error | RuntimeException exception) {
|
||||
wrapped.put("error", wrapError(exception));
|
||||
}
|
||||
reply.reply(wrapped);
|
||||
});
|
||||
} else {
|
||||
channel.setMessageHandler(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Map<String, Object> wrapError(Throwable exception) {
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", exception.toString());
|
||||
errorMap.put("code", exception.getClass().getSimpleName());
|
||||
errorMap.put("details", null);
|
||||
return errorMap;
|
||||
}
|
||||
}
|
@ -7,12 +7,18 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0D50126D23FF759100CD5B95 /* messages.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D50126B23FF759100CD5B95 /* messages.m */; };
|
||||
0D50127523FF75B100CD5B95 /* RunnerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D50127423FF75B100CD5B95 /* RunnerTests.m */; };
|
||||
0D8C35E825D45A3000B76435 /* async_handlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D8C35E725D45A3000B76435 /* async_handlers.m */; };
|
||||
0D8C35EB25D45A7900B76435 /* AsyncHandlersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D8C35EA25D45A7900B76435 /* AsyncHandlersTest.m */; };
|
||||
0DD2E690266FDB7000A7D764 /* enum.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E68F266FDB7000A7D764 /* enum.m */; };
|
||||
0DF4E5C3266ECF0400AEA855 /* all_datatypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4E5C2266ECF0400AEA855 /* all_datatypes.m */; };
|
||||
0DD2E6BA2684031300A7D764 /* void_arg_host.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6A62684031200A7D764 /* void_arg_host.gen.m */; };
|
||||
0DD2E6BB2684031300A7D764 /* list.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6A72684031200A7D764 /* list.gen.m */; };
|
||||
0DD2E6BC2684031300A7D764 /* host2flutter.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6AB2684031300A7D764 /* host2flutter.gen.m */; };
|
||||
0DD2E6BD2684031300A7D764 /* async_handlers.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6AF2684031300A7D764 /* async_handlers.gen.m */; };
|
||||
0DD2E6BE2684031300A7D764 /* message.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B02684031300A7D764 /* message.gen.m */; };
|
||||
0DD2E6BF2684031300A7D764 /* enum.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B12684031300A7D764 /* enum.gen.m */; };
|
||||
0DD2E6C02684031300A7D764 /* all_datatypes.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B22684031300A7D764 /* all_datatypes.gen.m */; };
|
||||
0DD2E6C12684031300A7D764 /* voidhost.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B52684031300A7D764 /* voidhost.gen.m */; };
|
||||
0DD2E6C22684031300A7D764 /* voidflutter.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B62684031300A7D764 /* voidflutter.gen.m */; };
|
||||
0DD2E6C32684031300A7D764 /* void_arg_flutter.gen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD2E6B82684031300A7D764 /* void_arg_flutter.gen.m */; };
|
||||
0DF4E5C5266ECF4A00AEA855 /* AllDatatypesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4E5C4266ECF4A00AEA855 /* AllDatatypesTest.m */; };
|
||||
0DF4E5C8266ED80900AEA855 /* EchoMessenger.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4E5C7266ED80900AEA855 /* EchoMessenger.m */; };
|
||||
0DF4E5CB266FDAE300AEA855 /* EnumTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DF4E5CA266FDAE300AEA855 /* EnumTest.m */; };
|
||||
@ -49,18 +55,30 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0D50126B23FF759100CD5B95 /* messages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = messages.m; sourceTree = "<group>"; };
|
||||
0D50126C23FF759100CD5B95 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = messages.h; sourceTree = "<group>"; };
|
||||
0D50127223FF75B100CD5B95 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0D50127423FF75B100CD5B95 /* RunnerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RunnerTests.m; sourceTree = "<group>"; };
|
||||
0D50127623FF75B100CD5B95 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
0D8C35E625D45A3000B76435 /* async_handlers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = async_handlers.h; sourceTree = "<group>"; };
|
||||
0D8C35E725D45A3000B76435 /* async_handlers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = async_handlers.m; sourceTree = "<group>"; };
|
||||
0D8C35EA25D45A7900B76435 /* AsyncHandlersTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AsyncHandlersTest.m; sourceTree = "<group>"; };
|
||||
0DD2E68E266FDB7000A7D764 /* enum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = enum.h; sourceTree = "<group>"; };
|
||||
0DD2E68F266FDB7000A7D764 /* enum.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = enum.m; sourceTree = "<group>"; };
|
||||
0DF4E5C1266ECF0400AEA855 /* all_datatypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = all_datatypes.h; sourceTree = "<group>"; };
|
||||
0DF4E5C2266ECF0400AEA855 /* all_datatypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = all_datatypes.m; sourceTree = "<group>"; };
|
||||
0DD2E6A62684031200A7D764 /* void_arg_host.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = void_arg_host.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6A72684031200A7D764 /* list.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = list.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6A82684031200A7D764 /* host2flutter.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = host2flutter.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6A92684031200A7D764 /* voidhost.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = voidhost.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6AA2684031300A7D764 /* all_datatypes.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = all_datatypes.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6AB2684031300A7D764 /* host2flutter.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = host2flutter.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6AC2684031300A7D764 /* void_arg_flutter.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = void_arg_flutter.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6AD2684031300A7D764 /* list.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = list.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6AE2684031300A7D764 /* async_handlers.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = async_handlers.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6AF2684031300A7D764 /* async_handlers.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = async_handlers.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B02684031300A7D764 /* message.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = message.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B12684031300A7D764 /* enum.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = enum.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B22684031300A7D764 /* all_datatypes.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = all_datatypes.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B32684031300A7D764 /* voidflutter.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = voidflutter.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6B42684031300A7D764 /* message.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6B52684031300A7D764 /* voidhost.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = voidhost.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B62684031300A7D764 /* voidflutter.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = voidflutter.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B72684031300A7D764 /* enum.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = enum.gen.h; sourceTree = "<group>"; };
|
||||
0DD2E6B82684031300A7D764 /* void_arg_flutter.gen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = void_arg_flutter.gen.m; sourceTree = "<group>"; };
|
||||
0DD2E6B92684031300A7D764 /* void_arg_host.gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = void_arg_host.gen.h; sourceTree = "<group>"; };
|
||||
0DF4E5C4266ECF4A00AEA855 /* AllDatatypesTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AllDatatypesTest.m; sourceTree = "<group>"; };
|
||||
0DF4E5C6266ED80900AEA855 /* EchoMessenger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EchoMessenger.h; sourceTree = "<group>"; };
|
||||
0DF4E5C7266ED80900AEA855 /* EchoMessenger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EchoMessenger.m; sourceTree = "<group>"; };
|
||||
@ -146,14 +164,26 @@
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0DD2E68E266FDB7000A7D764 /* enum.h */,
|
||||
0DD2E68F266FDB7000A7D764 /* enum.m */,
|
||||
0DF4E5C1266ECF0400AEA855 /* all_datatypes.h */,
|
||||
0DF4E5C2266ECF0400AEA855 /* all_datatypes.m */,
|
||||
0D8C35E625D45A3000B76435 /* async_handlers.h */,
|
||||
0D8C35E725D45A3000B76435 /* async_handlers.m */,
|
||||
0D50126C23FF759100CD5B95 /* messages.h */,
|
||||
0D50126B23FF759100CD5B95 /* messages.m */,
|
||||
0DD2E6AA2684031300A7D764 /* all_datatypes.gen.h */,
|
||||
0DD2E6B22684031300A7D764 /* all_datatypes.gen.m */,
|
||||
0DD2E6AE2684031300A7D764 /* async_handlers.gen.h */,
|
||||
0DD2E6AF2684031300A7D764 /* async_handlers.gen.m */,
|
||||
0DD2E6B72684031300A7D764 /* enum.gen.h */,
|
||||
0DD2E6B12684031300A7D764 /* enum.gen.m */,
|
||||
0DD2E6A82684031200A7D764 /* host2flutter.gen.h */,
|
||||
0DD2E6AB2684031300A7D764 /* host2flutter.gen.m */,
|
||||
0DD2E6AD2684031300A7D764 /* list.gen.h */,
|
||||
0DD2E6A72684031200A7D764 /* list.gen.m */,
|
||||
0DD2E6B42684031300A7D764 /* message.gen.h */,
|
||||
0DD2E6B02684031300A7D764 /* message.gen.m */,
|
||||
0DD2E6AC2684031300A7D764 /* void_arg_flutter.gen.h */,
|
||||
0DD2E6B82684031300A7D764 /* void_arg_flutter.gen.m */,
|
||||
0DD2E6B92684031300A7D764 /* void_arg_host.gen.h */,
|
||||
0DD2E6A62684031200A7D764 /* void_arg_host.gen.m */,
|
||||
0DD2E6B32684031300A7D764 /* voidflutter.gen.h */,
|
||||
0DD2E6B62684031300A7D764 /* voidflutter.gen.m */,
|
||||
0DD2E6A92684031200A7D764 /* voidhost.gen.h */,
|
||||
0DD2E6B52684031300A7D764 /* voidhost.gen.m */,
|
||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
|
||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
@ -323,13 +353,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0DD2E6BD2684031300A7D764 /* async_handlers.gen.m in Sources */,
|
||||
0DD2E6C12684031300A7D764 /* voidhost.gen.m in Sources */,
|
||||
0DD2E6BB2684031300A7D764 /* list.gen.m in Sources */,
|
||||
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
|
||||
0D50126D23FF759100CD5B95 /* messages.m in Sources */,
|
||||
0DD2E6C32684031300A7D764 /* void_arg_flutter.gen.m in Sources */,
|
||||
0DD2E6C22684031300A7D764 /* voidflutter.gen.m in Sources */,
|
||||
0DD2E6C02684031300A7D764 /* all_datatypes.gen.m in Sources */,
|
||||
97C146F31CF9000F007C117D /* main.m in Sources */,
|
||||
0DF4E5C3266ECF0400AEA855 /* all_datatypes.m in Sources */,
|
||||
0DD2E6BC2684031300A7D764 /* host2flutter.gen.m in Sources */,
|
||||
0DD2E6BE2684031300A7D764 /* message.gen.m in Sources */,
|
||||
0DD2E6BA2684031300A7D764 /* void_arg_host.gen.m in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
0DD2E690266FDB7000A7D764 /* enum.m in Sources */,
|
||||
0D8C35E825D45A3000B76435 /* async_handlers.m in Sources */,
|
||||
0DD2E6BF2684031300A7D764 /* enum.gen.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
2
packages/pigeon/platform_tests/ios_unit_tests/ios/Runner/.gitignore
vendored
Normal file
2
packages/pigeon/platform_tests/ios_unit_tests/ios/Runner/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.gen.h
|
||||
*.gen.m
|
@ -1,41 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import <Foundation/Foundation.h>
|
||||
@protocol FlutterBinaryMessenger;
|
||||
@class FlutterError;
|
||||
@class FlutterStandardTypedData;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class Everything;
|
||||
|
||||
@interface Everything : NSObject
|
||||
@property(nonatomic, strong, nullable) NSNumber *aBool;
|
||||
@property(nonatomic, strong, nullable) NSNumber *anInt;
|
||||
@property(nonatomic, strong, nullable) NSNumber *aDouble;
|
||||
@property(nonatomic, copy, nullable) NSString *aString;
|
||||
@property(nonatomic, strong, nullable) FlutterStandardTypedData *aByteArray;
|
||||
@property(nonatomic, strong, nullable) FlutterStandardTypedData *a4ByteArray;
|
||||
@property(nonatomic, strong, nullable) FlutterStandardTypedData *a8ByteArray;
|
||||
@property(nonatomic, strong, nullable) FlutterStandardTypedData *aFloatArray;
|
||||
@property(nonatomic, strong, nullable) NSArray *aList;
|
||||
@property(nonatomic, strong, nullable) NSDictionary *aMap;
|
||||
@end
|
||||
|
||||
@interface FlutterEverything : NSObject
|
||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
|
||||
- (void)giveMeEverything:(void (^)(Everything *, NSError *_Nullable))completion;
|
||||
- (void)echo:(Everything *)input completion:(void (^)(Everything *, NSError *_Nullable))completion;
|
||||
@end
|
||||
@protocol HostEverything
|
||||
- (nullable Everything *)giveMeEverything:(FlutterError *_Nullable *_Nonnull)error;
|
||||
@end
|
||||
|
||||
extern void HostEverythingSetup(id<FlutterBinaryMessenger> binaryMessenger,
|
||||
id<HostEverything> _Nullable api);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,149 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import "all_datatypes.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
#error File requires ARC to be enabled.
|
||||
#endif
|
||||
|
||||
static NSDictionary<NSString *, id> *wrapResult(NSDictionary *result, FlutterError *error) {
|
||||
NSDictionary *errorDict = (NSDictionary *)[NSNull null];
|
||||
if (error) {
|
||||
errorDict = @{
|
||||
@"code" : (error.code ? error.code : [NSNull null]),
|
||||
@"message" : (error.message ? error.message : [NSNull null]),
|
||||
@"details" : (error.details ? error.details : [NSNull null]),
|
||||
};
|
||||
}
|
||||
return @{
|
||||
@"result" : (result ? result : [NSNull null]),
|
||||
@"error" : errorDict,
|
||||
};
|
||||
}
|
||||
|
||||
@interface Everything ()
|
||||
+ (Everything *)fromMap:(NSDictionary *)dict;
|
||||
- (NSDictionary *)toMap;
|
||||
@end
|
||||
|
||||
@implementation Everything
|
||||
+ (Everything *)fromMap:(NSDictionary *)dict {
|
||||
Everything *result = [[Everything alloc] init];
|
||||
result.aBool = dict[@"aBool"];
|
||||
if ((NSNull *)result.aBool == [NSNull null]) {
|
||||
result.aBool = nil;
|
||||
}
|
||||
result.anInt = dict[@"anInt"];
|
||||
if ((NSNull *)result.anInt == [NSNull null]) {
|
||||
result.anInt = nil;
|
||||
}
|
||||
result.aDouble = dict[@"aDouble"];
|
||||
if ((NSNull *)result.aDouble == [NSNull null]) {
|
||||
result.aDouble = nil;
|
||||
}
|
||||
result.aString = dict[@"aString"];
|
||||
if ((NSNull *)result.aString == [NSNull null]) {
|
||||
result.aString = nil;
|
||||
}
|
||||
result.aByteArray = dict[@"aByteArray"];
|
||||
if ((NSNull *)result.aByteArray == [NSNull null]) {
|
||||
result.aByteArray = nil;
|
||||
}
|
||||
result.a4ByteArray = dict[@"a4ByteArray"];
|
||||
if ((NSNull *)result.a4ByteArray == [NSNull null]) {
|
||||
result.a4ByteArray = nil;
|
||||
}
|
||||
result.a8ByteArray = dict[@"a8ByteArray"];
|
||||
if ((NSNull *)result.a8ByteArray == [NSNull null]) {
|
||||
result.a8ByteArray = nil;
|
||||
}
|
||||
result.aFloatArray = dict[@"aFloatArray"];
|
||||
if ((NSNull *)result.aFloatArray == [NSNull null]) {
|
||||
result.aFloatArray = nil;
|
||||
}
|
||||
result.aList = dict[@"aList"];
|
||||
if ((NSNull *)result.aList == [NSNull null]) {
|
||||
result.aList = nil;
|
||||
}
|
||||
result.aMap = dict[@"aMap"];
|
||||
if ((NSNull *)result.aMap == [NSNull null]) {
|
||||
result.aMap = nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
- (NSDictionary *)toMap {
|
||||
return [NSDictionary
|
||||
dictionaryWithObjectsAndKeys:(self.aBool ? self.aBool : [NSNull null]), @"aBool",
|
||||
(self.anInt ? self.anInt : [NSNull null]), @"anInt",
|
||||
(self.aDouble ? self.aDouble : [NSNull null]), @"aDouble",
|
||||
(self.aString ? self.aString : [NSNull null]), @"aString",
|
||||
(self.aByteArray ? self.aByteArray : [NSNull null]),
|
||||
@"aByteArray",
|
||||
(self.a4ByteArray ? self.a4ByteArray : [NSNull null]),
|
||||
@"a4ByteArray",
|
||||
(self.a8ByteArray ? self.a8ByteArray : [NSNull null]),
|
||||
@"a8ByteArray",
|
||||
(self.aFloatArray ? self.aFloatArray : [NSNull null]),
|
||||
@"aFloatArray", (self.aList ? self.aList : [NSNull null]),
|
||||
@"aList", (self.aMap ? self.aMap : [NSNull null]), @"aMap", nil];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface FlutterEverything ()
|
||||
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
|
||||
@end
|
||||
|
||||
@implementation FlutterEverything
|
||||
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_binaryMessenger = binaryMessenger;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)giveMeEverything:(void (^)(Everything *, NSError *_Nullable))completion {
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:@"dev.flutter.pigeon.FlutterEverything.giveMeEverything"
|
||||
binaryMessenger:self.binaryMessenger];
|
||||
[channel sendMessage:nil
|
||||
reply:^(id reply) {
|
||||
NSDictionary *outputMap = reply;
|
||||
Everything *output = [Everything fromMap:outputMap];
|
||||
completion(output, nil);
|
||||
}];
|
||||
}
|
||||
- (void)echo:(Everything *)input completion:(void (^)(Everything *, NSError *_Nullable))completion {
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:@"dev.flutter.pigeon.FlutterEverything.echo"
|
||||
binaryMessenger:self.binaryMessenger];
|
||||
NSDictionary *inputMap = [input toMap];
|
||||
[channel sendMessage:inputMap
|
||||
reply:^(id reply) {
|
||||
NSDictionary *outputMap = reply;
|
||||
Everything *output = [Everything fromMap:outputMap];
|
||||
completion(output, nil);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
void HostEverythingSetup(id<FlutterBinaryMessenger> binaryMessenger, id<HostEverything> api) {
|
||||
{
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:@"dev.flutter.pigeon.HostEverything.giveMeEverything"
|
||||
binaryMessenger:binaryMessenger];
|
||||
if (api) {
|
||||
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
FlutterError *error;
|
||||
Everything *output = [api giveMeEverything:&error];
|
||||
callback(wrapResult([output toMap], error));
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import <Foundation/Foundation.h>
|
||||
@protocol FlutterBinaryMessenger;
|
||||
@class FlutterError;
|
||||
@class FlutterStandardTypedData;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class Value;
|
||||
|
||||
@interface Value : NSObject
|
||||
@property(nonatomic, strong, nullable) NSNumber *number;
|
||||
@end
|
||||
|
||||
@interface Api2Flutter : NSObject
|
||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
|
||||
- (void)calculate:(Value *)input completion:(void (^)(Value *, NSError *_Nullable))completion;
|
||||
@end
|
||||
@protocol Api2Host
|
||||
- (void)calculate:(nullable Value *)input
|
||||
completion:(void (^)(Value *_Nullable, FlutterError *_Nullable))completion;
|
||||
- (void)voidVoid:(void (^)(FlutterError *_Nullable))completion;
|
||||
@end
|
||||
|
||||
extern void Api2HostSetup(id<FlutterBinaryMessenger> binaryMessenger, id<Api2Host> _Nullable api);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,106 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import "async_handlers.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
#error File requires ARC to be enabled.
|
||||
#endif
|
||||
|
||||
static NSDictionary<NSString *, id> *wrapResult(NSDictionary *result, FlutterError *error) {
|
||||
NSDictionary *errorDict = (NSDictionary *)[NSNull null];
|
||||
if (error) {
|
||||
errorDict = @{
|
||||
@"code" : (error.code ? error.code : [NSNull null]),
|
||||
@"message" : (error.message ? error.message : [NSNull null]),
|
||||
@"details" : (error.details ? error.details : [NSNull null]),
|
||||
};
|
||||
}
|
||||
return @{
|
||||
@"result" : (result ? result : [NSNull null]),
|
||||
@"error" : errorDict,
|
||||
};
|
||||
}
|
||||
|
||||
@interface Value ()
|
||||
+ (Value *)fromMap:(NSDictionary *)dict;
|
||||
- (NSDictionary *)toMap;
|
||||
@end
|
||||
|
||||
@implementation Value
|
||||
+ (Value *)fromMap:(NSDictionary *)dict {
|
||||
Value *result = [[Value alloc] init];
|
||||
result.number = dict[@"number"];
|
||||
if ((NSNull *)result.number == [NSNull null]) {
|
||||
result.number = nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
- (NSDictionary *)toMap {
|
||||
return [NSDictionary
|
||||
dictionaryWithObjectsAndKeys:(self.number ? self.number : [NSNull null]), @"number", nil];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface Api2Flutter ()
|
||||
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
|
||||
@end
|
||||
|
||||
@implementation Api2Flutter
|
||||
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_binaryMessenger = binaryMessenger;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)calculate:(Value *)input completion:(void (^)(Value *, NSError *_Nullable))completion {
|
||||
FlutterBasicMessageChannel *channel =
|
||||
[FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.Api2Flutter.calculate"
|
||||
binaryMessenger:self.binaryMessenger];
|
||||
NSDictionary *inputMap = [input toMap];
|
||||
[channel sendMessage:inputMap
|
||||
reply:^(id reply) {
|
||||
NSDictionary *outputMap = reply;
|
||||
Value *output = [Value fromMap:outputMap];
|
||||
completion(output, nil);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
void Api2HostSetup(id<FlutterBinaryMessenger> binaryMessenger, id<Api2Host> api) {
|
||||
{
|
||||
FlutterBasicMessageChannel *channel =
|
||||
[FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.Api2Host.calculate"
|
||||
binaryMessenger:binaryMessenger];
|
||||
if (api) {
|
||||
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
Value *input = [Value fromMap:message];
|
||||
[api calculate:input
|
||||
completion:^(Value *_Nullable output, FlutterError *_Nullable error) {
|
||||
callback(wrapResult([output toMap], error));
|
||||
}];
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
{
|
||||
FlutterBasicMessageChannel *channel =
|
||||
[FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.Api2Host.voidVoid"
|
||||
binaryMessenger:binaryMessenger];
|
||||
if (api) {
|
||||
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
[api voidVoid:^(FlutterError *_Nullable error) {
|
||||
callback(error);
|
||||
}];
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import <Foundation/Foundation.h>
|
||||
@protocol FlutterBinaryMessenger;
|
||||
@class FlutterError;
|
||||
@class FlutterStandardTypedData;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, ACState) {
|
||||
ACStatePending = 0,
|
||||
ACStateSuccess = 1,
|
||||
ACStateError = 2,
|
||||
};
|
||||
|
||||
@class ACData;
|
||||
|
||||
@interface ACData : NSObject
|
||||
@property(nonatomic, assign) ACState state;
|
||||
@end
|
||||
|
||||
@protocol ACEnumApi2Host
|
||||
- (nullable ACData *)echo:(ACData *)input error:(FlutterError *_Nullable *_Nonnull)error;
|
||||
@end
|
||||
|
||||
extern void ACEnumApi2HostSetup(id<FlutterBinaryMessenger> binaryMessenger,
|
||||
id<ACEnumApi2Host> _Nullable api);
|
||||
|
||||
@interface ACEnumApi2Flutter : NSObject
|
||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
|
||||
- (void)echo:(ACData *)input completion:(void (^)(ACData *, NSError *_Nullable))completion;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,87 +0,0 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Autogenerated from Pigeon (v0.2.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import "enum.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
#error File requires ARC to be enabled.
|
||||
#endif
|
||||
|
||||
static NSDictionary<NSString *, id> *wrapResult(NSDictionary *result, FlutterError *error) {
|
||||
NSDictionary *errorDict = (NSDictionary *)[NSNull null];
|
||||
if (error) {
|
||||
errorDict = @{
|
||||
@"code" : (error.code ? error.code : [NSNull null]),
|
||||
@"message" : (error.message ? error.message : [NSNull null]),
|
||||
@"details" : (error.details ? error.details : [NSNull null]),
|
||||
};
|
||||
}
|
||||
return @{
|
||||
@"result" : (result ? result : [NSNull null]),
|
||||
@"error" : errorDict,
|
||||
};
|
||||
}
|
||||
|
||||
@interface ACData ()
|
||||
+ (ACData *)fromMap:(NSDictionary *)dict;
|
||||
- (NSDictionary *)toMap;
|
||||
@end
|
||||
|
||||
@implementation ACData
|
||||
+ (ACData *)fromMap:(NSDictionary *)dict {
|
||||
ACData *result = [[ACData alloc] init];
|
||||
result.state = [dict[@"state"] integerValue];
|
||||
return result;
|
||||
}
|
||||
- (NSDictionary *)toMap {
|
||||
return [NSDictionary dictionaryWithObjectsAndKeys:@(self.state), @"state", nil];
|
||||
}
|
||||
@end
|
||||
|
||||
void ACEnumApi2HostSetup(id<FlutterBinaryMessenger> binaryMessenger, id<ACEnumApi2Host> api) {
|
||||
{
|
||||
FlutterBasicMessageChannel *channel =
|
||||
[FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.EnumApi2Host.echo"
|
||||
binaryMessenger:binaryMessenger];
|
||||
if (api) {
|
||||
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
ACData *input = [ACData fromMap:message];
|
||||
FlutterError *error;
|
||||
ACData *output = [api echo:input error:&error];
|
||||
callback(wrapResult([output toMap], error));
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
@interface ACEnumApi2Flutter ()
|
||||
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
|
||||
@end
|
||||
|
||||
@implementation ACEnumApi2Flutter
|
||||
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_binaryMessenger = binaryMessenger;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)echo:(ACData *)input completion:(void (^)(ACData *, NSError *_Nullable))completion {
|
||||
FlutterBasicMessageChannel *channel =
|
||||
[FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.EnumApi2Flutter.echo"
|
||||
binaryMessenger:self.binaryMessenger];
|
||||
NSDictionary *inputMap = [input toMap];
|
||||
[channel sendMessage:inputMap
|
||||
reply:^(id reply) {
|
||||
NSDictionary *outputMap = reply;
|
||||
ACData *output = [ACData fromMap:outputMap];
|
||||
completion(output, nil);
|
||||
}];
|
||||
}
|
||||
@end
|
@ -5,7 +5,7 @@
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "EchoMessenger.h"
|
||||
#import "all_datatypes.h"
|
||||
#import "all_datatypes.gen.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@interface AllDatatypesTest : XCTestCase
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "async_handlers.h"
|
||||
#import "async_handlers.gen.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@interface Value ()
|
||||
|
@ -5,7 +5,7 @@
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "EchoMessenger.h"
|
||||
#import "enum.h"
|
||||
#import "enum.gen.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@interface EnumTest : XCTestCase
|
||||
|
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "messages.h"
|
||||
#import "message.gen.h"
|
||||
|
||||
@interface ACSearchReply ()
|
||||
+ (ACSearchReply*)fromMap:(NSDictionary*)dict;
|
||||
|
@ -53,35 +53,6 @@ mktmpdir() {
|
||||
mktemp -d flutter_pigeon.XXXXXX 2>/dev/null || mktemp -d -t flutter_pigeon.
|
||||
}
|
||||
|
||||
# test_pigeon_ios(<path to pigeon file>)
|
||||
#
|
||||
# Compiles the pigeon file to a temp directory and attempts to compile the objc
|
||||
# code.
|
||||
test_pigeon_ios() {
|
||||
echo "test_pigeon_ios($1)"
|
||||
temp_dir=$(mktmpdir)
|
||||
|
||||
$run_pigeon \
|
||||
--no-dart_null_safety \
|
||||
--input $1 \
|
||||
--dart_out $temp_dir/pigeon.dart \
|
||||
--objc_header_out $temp_dir/pigeon.h \
|
||||
--objc_source_out $temp_dir/pigeon.m
|
||||
|
||||
xcrun clang \
|
||||
-arch arm64 \
|
||||
-isysroot $(xcrun --sdk iphoneos --show-sdk-path) \
|
||||
-F $framework_path/Flutter.xcframework/ios-armv7_arm64 \
|
||||
-F $framework_path/Flutter.xcframework/ios-armv7 \
|
||||
-F $framework_path/Flutter.xcframework/ios-arm64_armv7 \
|
||||
-Werror \
|
||||
-fobjc-arc \
|
||||
-c $temp_dir/pigeon.m \
|
||||
-o $temp_dir/pigeon.o
|
||||
|
||||
rm -rf $temp_dir
|
||||
}
|
||||
|
||||
# test_pigeon_android(<path to pigeon file>)
|
||||
#
|
||||
# Compiles the pigeon file to a temp directory and attempts to compile the java
|
||||
@ -158,6 +129,33 @@ flags:
|
||||
"
|
||||
}
|
||||
|
||||
gen_ios_unittests_code() {
|
||||
local input=$1
|
||||
local prefix=$2
|
||||
local filename=${input##*/}
|
||||
local name="${filename%.dart}"
|
||||
$run_pigeon \
|
||||
--input $input \
|
||||
--objc_prefix "$prefix" \
|
||||
--dart_out /dev/null \
|
||||
--objc_header_out platform_tests/ios_unit_tests/ios/Runner/$name.gen.h \
|
||||
--objc_source_out platform_tests/ios_unit_tests/ios/Runner/$name.gen.m
|
||||
}
|
||||
|
||||
gen_android_unittests_code() {
|
||||
local input=$1
|
||||
local javaName=$2
|
||||
local javaOut="platform_tests/android_unit_tests/android/app/src/main/java/com/example/android_unit_tests/$javaName.java"
|
||||
$run_pigeon \
|
||||
--input $input \
|
||||
--dart_out /dev/null \
|
||||
--java_out $javaOut \
|
||||
--java_package "com.example.android_unit_tests"
|
||||
|
||||
java -jar ci/$java_formatter --replace $javaOut
|
||||
java -jar ci/$java_linter -c "ci/$google_checks" "$javaOut"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Stages
|
||||
###############################################################################
|
||||
@ -242,74 +240,17 @@ run_dart_compilation_tests() {
|
||||
test_pigeon_dart ./pigeons/voidhost.dart
|
||||
}
|
||||
|
||||
run_java_compilation_tests() {
|
||||
# DEPRECATED: These tests are deprecated, use run_android_unittests instead.
|
||||
# Make sure the artifacts are present.
|
||||
flutter precache
|
||||
# Make sure flutter dependencies are available.
|
||||
pushd $PWD
|
||||
# We use e2e_tests/test_objc in order to get access to Flutter.
|
||||
cd e2e_tests/test_objc/
|
||||
flutter pub get
|
||||
popd
|
||||
test_pigeon_android ./pigeons/async_handlers.dart
|
||||
test_pigeon_android ./pigeons/host2flutter.dart
|
||||
test_pigeon_android ./pigeons/java_double_host_api.dart
|
||||
test_pigeon_android ./pigeons/list.dart
|
||||
test_pigeon_android ./pigeons/message.dart
|
||||
test_pigeon_android ./pigeons/void_arg_flutter.dart
|
||||
test_pigeon_android ./pigeons/void_arg_host.dart
|
||||
test_pigeon_android ./pigeons/voidflutter.dart
|
||||
test_pigeon_android ./pigeons/voidhost.dart
|
||||
}
|
||||
|
||||
run_objc_compilation_tests() {
|
||||
# DEPRECATED: These tests are deprecated, use run_ios_unittests instead.
|
||||
# Make sure the artifacts are present.
|
||||
flutter precache
|
||||
test_pigeon_ios ./pigeons/async_handlers.dart
|
||||
test_pigeon_ios ./pigeons/host2flutter.dart
|
||||
test_pigeon_ios ./pigeons/list.dart
|
||||
test_pigeon_ios ./pigeons/message.dart
|
||||
test_pigeon_ios ./pigeons/void_arg_flutter.dart
|
||||
test_pigeon_ios ./pigeons/void_arg_host.dart
|
||||
test_pigeon_ios ./pigeons/voidflutter.dart
|
||||
test_pigeon_ios ./pigeons/voidhost.dart
|
||||
}
|
||||
|
||||
run_ios_unittests() {
|
||||
$run_pigeon \
|
||||
--no-dart_null_safety \
|
||||
--input pigeons/message.dart \
|
||||
--dart_out /dev/null \
|
||||
--objc_header_out platform_tests/ios_unit_tests/ios/Runner/messages.h \
|
||||
--objc_source_out platform_tests/ios_unit_tests/ios/Runner/messages.m
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/messages.h
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/messages.m
|
||||
$run_pigeon \
|
||||
--no-dart_null_safety \
|
||||
--input pigeons/async_handlers.dart \
|
||||
--dart_out /dev/null \
|
||||
--objc_header_out platform_tests/ios_unit_tests/ios/Runner/async_handlers.h \
|
||||
--objc_source_out platform_tests/ios_unit_tests/ios/Runner/async_handlers.m
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/async_handlers.h
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/async_handlers.m
|
||||
$run_pigeon \
|
||||
--no-dart_null_safety \
|
||||
--input pigeons/all_datatypes.dart \
|
||||
--dart_out /dev/null \
|
||||
--objc_header_out platform_tests/ios_unit_tests/ios/Runner/all_datatypes.h \
|
||||
--objc_source_out platform_tests/ios_unit_tests/ios/Runner/all_datatypes.m
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/all_datatypes.h
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/all_datatypes.m
|
||||
$run_pigeon \
|
||||
--input pigeons/enum.dart \
|
||||
--objc_prefix AC \
|
||||
--dart_out /dev/null \
|
||||
--objc_header_out platform_tests/ios_unit_tests/ios/Runner/enum.h \
|
||||
--objc_source_out platform_tests/ios_unit_tests/ios/Runner/enum.m
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/enum.h
|
||||
clang-format -i platform_tests/ios_unit_tests/ios/Runner/enum.m
|
||||
gen_ios_unittests_code ./pigeons/all_datatypes.dart ""
|
||||
gen_ios_unittests_code ./pigeons/async_handlers.dart ""
|
||||
gen_ios_unittests_code ./pigeons/enum.dart "AC"
|
||||
gen_ios_unittests_code ./pigeons/host2flutter.dart ""
|
||||
gen_ios_unittests_code ./pigeons/list.dart "LST"
|
||||
gen_ios_unittests_code ./pigeons/message.dart ""
|
||||
gen_ios_unittests_code ./pigeons/void_arg_flutter.dart "VAF"
|
||||
gen_ios_unittests_code ./pigeons/void_arg_host.dart "VAH"
|
||||
gen_ios_unittests_code ./pigeons/voidflutter.dart "VF"
|
||||
gen_ios_unittests_code ./pigeons/voidhost.dart "VH"
|
||||
pushd $PWD
|
||||
cd platform_tests/ios_unit_tests
|
||||
flutter build ios --simulator
|
||||
@ -356,16 +297,17 @@ run_formatter() {
|
||||
|
||||
run_android_unittests() {
|
||||
pushd $PWD
|
||||
$run_pigeon \
|
||||
--input pigeons/android_unittests.dart \
|
||||
--dart_out /dev/null \
|
||||
--java_out platform_tests/android_unit_tests/android/app/src/main/java/com/example/android_unit_tests/Pigeon.java \
|
||||
--java_package "com.example.android_unit_tests"
|
||||
$run_pigeon \
|
||||
--input pigeons/all_datatypes.dart \
|
||||
--dart_out /dev/null \
|
||||
--java_out platform_tests/android_unit_tests/android/app/src/main/java/com/example/android_unit_tests/AllDatatypes.java \
|
||||
--java_package "com.example.android_unit_tests"
|
||||
gen_android_unittests_code ./pigeons/all_datatypes.dart AllDatatypes
|
||||
gen_android_unittests_code ./pigeons/android_unittests.dart Pigeon
|
||||
gen_android_unittests_code ./pigeons/async_handlers.dart AsyncHandlers
|
||||
gen_android_unittests_code ./pigeons/host2flutter.dart Host2Flutter
|
||||
gen_android_unittests_code ./pigeons/java_double_host_api.dart JavaDoubleHostApi
|
||||
gen_android_unittests_code ./pigeons/list.dart PigeonList
|
||||
gen_android_unittests_code ./pigeons/message.dart MessagePigeon
|
||||
gen_android_unittests_code ./pigeons/void_arg_flutter.dart VoidArgFlutter
|
||||
gen_android_unittests_code ./pigeons/void_arg_host.dart VoidArgHost
|
||||
gen_android_unittests_code ./pigeons/voidflutter.dart VoidFlutter
|
||||
gen_android_unittests_code ./pigeons/voidhost.dart VoidHost
|
||||
cd platform_tests/android_unit_tests
|
||||
if [ ! -f "android/gradlew" ]; then
|
||||
flutter build apk --debug
|
||||
@ -385,9 +327,7 @@ should_run_flutter_unittests=true
|
||||
should_run_formatter=true
|
||||
should_run_ios_e2e_tests=true
|
||||
should_run_ios_unittests=true
|
||||
should_run_java_compilation_tests=true
|
||||
should_run_mock_handler_tests=true
|
||||
should_run_objc_compilation_tests=true
|
||||
while getopts "t:l?h" opt; do
|
||||
case $opt in
|
||||
t)
|
||||
@ -398,9 +338,7 @@ while getopts "t:l?h" opt; do
|
||||
should_run_formatter=false
|
||||
should_run_ios_e2e_tests=false
|
||||
should_run_ios_unittests=false
|
||||
should_run_java_compilation_tests=false
|
||||
should_run_mock_handler_tests=false
|
||||
should_run_objc_compilation_tests=false
|
||||
case $OPTARG in
|
||||
android_unittests) should_run_android_unittests=true ;;
|
||||
dart_compilation_tests) should_run_dart_compilation_tests=true ;;
|
||||
@ -408,9 +346,7 @@ while getopts "t:l?h" opt; do
|
||||
flutter_unittests) should_run_flutter_unittests=true ;;
|
||||
ios_e2e_tests) should_run_ios_e2e_tests=true ;;
|
||||
ios_unittests) should_run_ios_unittests=true ;;
|
||||
java_compilation_tests) should_run_java_compilation_tests=true ;;
|
||||
mock_handler_tests) should_run_mock_handler_tests=true ;;
|
||||
objc_compilation_tests) should_run_objc_compilation_tests=true ;;
|
||||
*)
|
||||
echo "unrecognized test: $OPTARG"
|
||||
exit 1
|
||||
@ -425,9 +361,7 @@ while getopts "t:l?h" opt; do
|
||||
flutter_unittests - Unit tests on generated Dart code.
|
||||
ios_e2e_tests - End-to-end objc tests run on iOS Simulator
|
||||
ios_unittests - Unit tests on generated Objc code.
|
||||
java_compilation_tests - Compilation tests on generated Java code.
|
||||
mock_handler_tests - Unit tests on generated Dart mock handler code.
|
||||
objc_compilation_tests - Compilation tests on generated Objc code.
|
||||
"
|
||||
exit 1
|
||||
;;
|
||||
@ -449,7 +383,7 @@ done
|
||||
##############################################################################
|
||||
pub get
|
||||
dart --snapshot-kind=kernel --snapshot=bin/pigeon.dart.dill bin/pigeon.dart
|
||||
if [ "$should_run_java_compilation_tests" = true ]; then
|
||||
if [ "$should_run_android_unittests" = true ]; then
|
||||
get_java_linter_formatter
|
||||
fi
|
||||
test_running_without_arguments
|
||||
@ -465,12 +399,6 @@ fi
|
||||
if [ "$should_run_dart_compilation_tests" = true ]; then
|
||||
run_dart_compilation_tests
|
||||
fi
|
||||
if [ "$should_run_java_compilation_tests" = true ]; then
|
||||
run_java_compilation_tests
|
||||
fi
|
||||
if [ "$should_run_objc_compilation_tests" = true ]; then
|
||||
run_objc_compilation_tests
|
||||
fi
|
||||
if [ "$should_run_ios_unittests" = true ]; then
|
||||
run_ios_unittests
|
||||
fi
|
||||
|
Reference in New Issue
Block a user