Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
da8ebf40
E
engine
项目概览
qq_34031325
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da8ebf40
编写于
4月 28, 2017
作者:
M
Mikkel Nygaard Ravn
提交者:
GitHub
4月 28, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Document channel message value conversions (#3633)
上级
7c699ce7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
97 addition
and
25 deletion
+97
-25
shell/platform/android/io/flutter/plugin/common/BinaryCodec.java
...latform/android/io/flutter/plugin/common/BinaryCodec.java
+8
-1
shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java
...rm/android/io/flutter/plugin/common/JSONMessageCodec.java
+9
-1
shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java
...orm/android/io/flutter/plugin/common/JSONMethodCodec.java
+7
-2
shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
...ndroid/io/flutter/plugin/common/StandardMessageCodec.java
+20
-5
shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java
...android/io/flutter/plugin/common/StandardMethodCodec.java
+5
-6
shell/platform/android/io/flutter/plugin/common/StringCodec.java
...latform/android/io/flutter/plugin/common/StringCodec.java
+4
-1
shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
+44
-9
未找到文件。
shell/platform/android/io/flutter/plugin/common/BinaryCodec.java
浏览文件 @
da8ebf40
...
...
@@ -7,7 +7,14 @@ package io.flutter.plugin.common;
import
java.nio.ByteBuffer
;
/**
* A {@link MessageCodec} using unencoded binary messages, represented as {@link ByteBuffer}s.
* A {@link MessageCodec} using unencoded binary messages, represented as
* {@link ByteBuffer}s.
*
* <p>This codec is guaranteed to be compatible with the corresponding
* <a href="https://docs.flutter.io/flutter/services/BinaryCodec-class.html">BinaryCodec</a>
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*
* <p>On the Dart side, messages are represented using {@code ByteData}.</p>
*/
public
final
class
BinaryCodec
implements
MessageCodec
<
ByteBuffer
>
{
// This codec must match the Dart codec of the same name in package flutter/services.
...
...
shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java
浏览文件 @
da8ebf40
...
...
@@ -12,7 +12,15 @@ import org.json.JSONTokener;
/**
* A {@link MessageCodec} using UTF-8 encoded JSON messages.
*
* Supports the same Java values as {@link JSONObject#wrap(Object)}.
* <p>This codec is guaranteed to be compatible with the corresponding
* <a href="https://docs.flutter.io/flutter/services/JSONMessageCodec-class.html">JSONMessageCodec</a>
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*
* <p>Supports the same Java values as {@link JSONObject#wrap(Object)}.</p>
*
* <p>On the Dart side, JSON messages are handled by the JSON facilities of the
* <a href="https://api.dartlang.org/stable/dart-convert/JSON-constant.html">dart:convert</a>
* package.</p>
*/
public
final
class
JSONMessageCodec
implements
MessageCodec
<
Object
>
{
// This codec must match the Dart codec of the same name in package flutter/services.
...
...
shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java
浏览文件 @
da8ebf40
...
...
@@ -7,8 +7,13 @@ import org.json.JSONObject;
/**
* A {@link MethodCodec} using UTF-8 encoded JSON method calls and result envelopes.
* Values supported as methods arguments and result payloads are those supported by
* {@link JSONMessageCodec}.
*
* <p>This codec is guaranteed to be compatible with the corresponding
* <a href="https://docs.flutter.io/flutter/services/JSONMethodCodec-class.html">JSONMethodCodec</a>
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*
* <p>Values supported as methods arguments and result payloads are those supported by
* {@link JSONMessageCodec}.</p>
*/
public
final
class
JSONMethodCodec
implements
MethodCodec
{
// This codec must match the Dart codec of the same name in package flutter/services.
...
...
shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
浏览文件 @
da8ebf40
...
...
@@ -18,11 +18,11 @@ import java.util.Map.Entry;
/**
* MessageCodec using the Flutter standard binary encoding.
*
*
The standard encoding is guaranteed to be compatible with the corresponding standard codec
*
for PlatformMessageChannels on the Flutter side. These parts of the Flutter SDK are evolved
*
synchronously.
*
<p>This codec is guaranteed to be compatible with the corresponding
*
<a href="https://docs.flutter.io/flutter/services/StandardMessageCodec-class.html">StandardMessageCodec</a>
*
on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*
*
Supported messages are acyclic values of these forms:
*
<p>Supported messages are acyclic values of these forms:</p>
*
* <ul>
* <li>null</li>
...
...
@@ -34,9 +34,24 @@ import java.util.Map.Entry;
* <li>Lists of supported values</li>
* <li>Maps with supported keys and values</li>
* </ul>
*
* <p>On the Dart side, these values are represented as follows:</p>
*
* <ul>
* <li>null: null</li>
* <li>Boolean: bool</li>
* <li>Byte, Short, Integer, Long, BigInteger: int</li>
* <li>Float, Double: double</li>
* <li>String: String</li>
* <li>byte[]: Uint8List</li>
* <li>int[]: Int32List</li>
* <li>long[]: Int64List</li>
* <li>double[]: Float64List</li>
* <li>List: List</li>
* <li>Map: Map</li>
* </ul>
*/
public
final
class
StandardMessageCodec
implements
MessageCodec
<
Object
>
{
// This codec must match the Dart codec of the same name in package flutter/services.
public
static
final
StandardMessageCodec
INSTANCE
=
new
StandardMessageCodec
();
private
StandardMessageCodec
()
{
...
...
shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java
浏览文件 @
da8ebf40
...
...
@@ -11,15 +11,14 @@ import java.nio.ByteOrder;
/**
* A {@link MethodCodec} using the Flutter standard binary encoding.
*
*
The standard codec is guaranteed to be compatible with the corresponding standard codec for
*
PlatformMethodChannels on the Flutter side. These parts of the Flutter SDK are evolved
*
synchronously.
*
<p>This codec is guaranteed to be compatible with the corresponding
*
<a href="https://docs.flutter.io/flutter/services/StandardMethodCodec-class.html">StandardMethodCodec</a>
*
on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*
* Values supported as method arguments and result payloads are those supported by
* {@link StandardMessageCodec}.
*
<p>
Values supported as method arguments and result payloads are those supported by
* {@link StandardMessageCodec}.
</p>
*/
public
final
class
StandardMethodCodec
implements
MethodCodec
{
// This codec must match the Dart codec of the same name in package flutter/services.
public
static
final
StandardMethodCodec
INSTANCE
=
new
StandardMethodCodec
();
private
StandardMethodCodec
()
{
...
...
shell/platform/android/io/flutter/plugin/common/StringCodec.java
浏览文件 @
da8ebf40
...
...
@@ -9,9 +9,12 @@ import java.nio.charset.Charset;
/**
* A {@link MessageCodec} using UTF-8 encoded String messages.
*
* <p>This codec is guaranteed to be compatible with the corresponding
* <a href="https://docs.flutter.io/flutter/services/StringCodec-class.html">StringCodec</a>
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.</p>
*/
public
final
class
StringCodec
implements
MessageCodec
<
String
>
{
// This codec must match the Dart codec of the same name in package flutter/services.
private
static
final
Charset
UTF8
=
Charset
.
forName
(
"UTF8"
);
public
static
final
StringCodec
INSTANCE
=
new
StringCodec
();
...
...
shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
浏览文件 @
da8ebf40
...
...
@@ -40,6 +40,12 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using unencoded binary messages, represented as
`NSData` instances.
This codec is guaranteed to be compatible with the corresponding
[BinaryCodec](https://docs.flutter.io/flutter/services/BinaryCodec-class.html)
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
On the Dart side, messages are represented using `ByteData`.
*/
FLUTTER_EXPORT
@interface
FlutterBinaryCodec
:
NSObject
<
FlutterMessageCodec
>
...
...
@@ -47,6 +53,10 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using UTF-8 encoded `NSString` messages.
This codec is guaranteed to be compatible with the corresponding
[StringCodec](https://docs.flutter.io/flutter/services/StringCodec-class.html)
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*/
FLUTTER_EXPORT
@interface
FlutterStringCodec
:
NSObject
<
FlutterMessageCodec
>
...
...
@@ -55,7 +65,16 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using UTF-8 encoded JSON messages.
Supports the same values as `NSJSONSerialization`.
This codec is guaranteed to be compatible with the corresponding
[JSONMessageCodec](https://docs.flutter.io/flutter/services/JSONMessageCodec-class.html)
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
Supports values accepted by `NSJSONSerialization` plus top-level
`nil`, `NSNumber`, and `NSString`.
On the Dart side, JSON messages are handled by the JSON facilities of the
[`dart:convert`](https://api.dartlang.org/stable/dart-convert/JSON-constant.html)
package.
*/
FLUTTER_EXPORT
@interface
FlutterJSONMessageCodec
:
NSObject
<
FlutterMessageCodec
>
...
...
@@ -64,19 +83,29 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using the Flutter standard binary encoding.
Th
e standard encoding
is guaranteed to be compatible with the corresponding
standard codec for PlatformMessageChannels on the Flutter side. These parts
of the Flutter SDK are evolved synchronously.
Th
is codec
is guaranteed to be compatible with the corresponding
[StandardMessageCodec](https://docs.flutter.io/flutter/services/StandardMessageCodec-class.html)
o
n the Dart side. These parts o
f the Flutter SDK are evolved synchronously.
Supported messages are acyclic values of these forms:
- `nil` or `NSNull`
- `NSNumber` (including their representation of Boolean values)
- `FlutterStandardBigInteger`
- `FlutterStandardTypedData`
- `NSString`
- `FlutterStandardTypedData`
- `NSArray` of supported values
- `NSDictionary` with supported keys and values
On the Dart side, these values are represented as follows:
- `nil` or `NSNull`: `null`
- `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
- `FlutterStandardBigInteger`: `int`
- `NSString`: `String`
- `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
- `NSArray`: `List`
- `NSDictionary`: `Map`
*/
FLUTTER_EXPORT
@interface
FlutterStandardMessageCodec
:
NSObject
<
FlutterMessageCodec
>
...
...
@@ -308,7 +337,13 @@ FLUTTER_EXPORT
/**
A `FlutterMethodCodec` using UTF-8 encoded JSON method calls and result
envelopes. Values supported as methods arguments and result payloads are
envelopes.
This codec is guaranteed to be compatible with the corresponding
[JSONMethodCodec](https://docs.flutter.io/flutter/services/JSONMethodCodec-class.html)
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
Values supported as methods arguments and result payloads are
those supported as top-level or leaf values by `FlutterJSONMessageCodec`.
*/
FLUTTER_EXPORT
...
...
@@ -318,9 +353,9 @@ FLUTTER_EXPORT
/**
A `FlutterMethodCodec` using the Flutter standard binary encoding.
Th
e standard
codec is guaranteed to be compatible with the corresponding
standard codec for PlatformMethodChannels on the Flutter side. These parts of
the Flutter SDK are evolved synchronously.
Th
is
codec is guaranteed to be compatible with the corresponding
[StandardMethodCodec](https://docs.flutter.io/flutter/services/StandardMethodCodec-class.html)
on the Dart side. These parts of
the Flutter SDK are evolved synchronously.
Values supported as method arguments and result payloads are those supported by
`FlutterStandardMessageCodec`.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录